W3C home > Mailing lists > Public > public-css-archive@w3.org > June 2019

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

From: Manish Goregaokar via GitHub <sysbot+gh@w3.org>
Date: Sun, 02 Jun 2019 21:54:49 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-498068643-1559512488-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:31:10 UTC