Re: [csswg-drafts] [css-fonts] Clarify how the computed font-size is determined for size keyword (#3906)

This is basically a dupe of https://github.com/w3c/csswg-drafts/issues/1835 . Given that Edge uses Blink now I think we should revisit this.

Note that Chrome supports language-dependent font sizes too, the functionality is just not exposed by default.

>  I think much of that code is gone (cc @Manishearth) but I don't remember for sure.

The code is _much simpler_ now (it doesn't recascade), but it has the same effects. Basically, if a font-size is computed from a keyword value, including things like "50% of medium", or "2em on large" (or calc values), we store the origin of it as a keyword + calc. If the lang or family changes, we recompute the keyword for the new lang/family values and then apply the calc to get the new font size.

(The old code would walk up the tree and redo the cascade, which was complicated. Now we cascade additional state and the cascade code for font-size is slightly more complex)

-- 
GitHub Notification of comment by Manishearth
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3906#issuecomment-498068643 using your GitHub account

Received on Sunday, 2 June 2019 21:54:51 UTC