Full credits to @matejlatin from whose article https://betterwebtype.com/articles/2019/06/16/5-keys-to-accessible-web-typography/ … I have learned this from. We just fixed this issue on http://v8.dev (pending deploy).
-
-
Prikaži ovu nitHvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
-
-
So, using 1.1 rem in the root is bad?
-
By doing that, you override and upscale the user's chosen default font size, which typically is 16px, to 17.6px. You can do that, but maybe only above a certain screen size (or more hand-wavily: on "big" screens).
- Još 2 druga odgovora
Novi razgovor -
-
-
I understand the rest, but I'm a bit confused about this: what's the purpose of setting :root to 100%? Isn't that the default?
-
It is the default, making it explicit mostly just makes sure you (or a CSS framework that you may include) don't set it to something else… ;-)
- Još 2 druga odgovora
Novi razgovor -
-
-
Can’t you use “rem” which is a relative value based on the browsers set font size?
-
Yes, as long as you use `:root { font-size: 1rem; }`.
Kraj razgovora
Novi razgovor -
-
-
Right. But this may cause content to overflow and you may get the ugly scrollbars
-
If someone sets their default font size to very large, ugly scrollbars may be the least of their concerns…
Kraj razgovora
Novi razgovor -
-
-
Oh wow so that's why we do that! Ty
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.
Dad-of-3. Developer Advocate at
), PhD from
), Postdoc at
).
Instead, set the font size to `100%` on the `:root {}` level and make everything a function thereof via `em` or `rem`. 