Re:PX or REM in CSS? Just Use REM
by shortcake27 on Saturday December 03, 2022 @04:04PM
(#33847350)
Yeah this. Directly scaling margin and padding with font size causes an accessibility _problem_ because the UI becomes unusable after a couple of steps, especially on mobile.
If every unit scales with font size then you’ve basically invented zoom, which browsers already have.
Dynamic Type on iOS is the perfect example. I have bad eyesight so I bump up the text size. This only affects the font size. It doesn’t scale the entire UI.
If every unit scales with font size then you’ve basically invented zoom, which browsers already have.
Dynamic Type on iOS is the perfect example. I have bad eyesight so I bump up the text size. This only affects the font size. It doesn’t scale the entire UI.