ui.mantine.dev icon indicating copy to clipboard operation
ui.mantine.dev copied to clipboard

Is there any special meaning to using the rem function as in this sample code?

Open eastack opened this issue 2 years ago • 2 comments

After looking at the documentation, this function seems similar to the remainder operator (%) in JS, but here it only provides one parameter. So why don't we just write the corresponding value directly instead of using the rem function? Is there some other reason for it?

https://ui.mantine.dev/component/header-search/

image

eastack avatar Nov 04 '23 22:11 eastack

https://mantine.dev/styles/postcss-preset/#remem-functions

rtivital avatar Nov 05 '23 06:11 rtivital

Thank you so much for your help! I really appreciate you taking the time to help me with this. As a newbie, I don't have a good understanding of frontend engineering systems. But a question comes to my mind - if I want to use the original rem function in CSS, will it conflict with this feature (or can it be automatically distinguished by checking the number of arguments during preprocessing)?

eastack avatar Nov 05 '23 12:11 eastack