#Why Scale and not regular em/rem?

7 messages · Page 1 of 1 (latest)

plucky yoke
#

I'm curious to why the scale feature is being used in mantine and not just regular em/rem scaling.

With the regular font-size based scaling i can scale parts of my application by simply changing the font-size, while the scale feature locks the whole application to 1 scale (because nested mantine providers is no longer supported).

It seems to me the regular em/rem scaling is far more versatile and fits many use-cases, while the scale feature limits this immensly?

Whats the reason for doing this instead?

south slate
#

You can use regular rem scaling

#

To do that, set font-size on html element.

plucky yoke
#

Then just skip using your rem/em functions and ignore the scale prop on the theme?
I could do that, but i would rather keep to the mantine way of doing things, so I minimize the local customizations and make the upgrades easier

#

I was just curious to why this feature was implemented instead of the v. 6 way

south slate
#
  • There was no way to do anything like that in v6.
  • theme.scale is designed for cases when you have no control over html font-size to allow normalize Mantine sizes to normal.
plucky yoke
#

Ok thanks 🙂

(By the v 6. way i just meant normal em sizing because there wasn't the calc(size * scale) everywhere)