We have an issue with a site that's been in development for nearly ten years: the default font-size
on most new elements is too small for some of the stakeholders to read, comfortably.
That's odd, you might say! Isn't the default font-size: 16px
a pretty reasonable size? Can't I just increase the root/body font-size to some reasonable default?
Ay, there's the rub!
Unfortunately this site started off following a fad of setting the root font size to 10 (!) pixels and making not just text but also element/box sizes all relative to that measure! (See CSS 62.5% why do developers use it? or https://benfrain.com/just-use-pixels/ for some retrospective.) So I guess hindsight is 20/20 — now if I simply change the "default" (root) font size, about 89% of my layout will grow with it. Imagine if all your Lego mini-figures suddenly grew to the size of Fisher-Price people… except for a random arm/leg over here that had a fixed size, or the scaling of an eyebrow that was relative to something else over there!
Is there any sort of "escape hatch" — out-of-the box CSS cleverness or some LESS compiler trick — that might let me:
- increase the default
font-size
on my page to something more accessible?
without having to:
- manually rework all existing
rem
/em
lengths through a large corpus of LESS styling rules?