New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-fonts-4] Which font properties should be reset by the font shorthand? #1636
Comments
Yeah, I just need to add something describing exactly which properties are set by this shorthand. See also: #1349 |
Before I can make these edits, I need to run the experiment to see which properties each browser resets already. Hopefully the results of this experiment are fairly consistent across browsers and I can just document what browsers already do. Otherwise, we will need some way to resolve which properties are in the set an which are not. |
@heycam Does the canonical order matter if it can't be represented in the shorthand? The canonical order just exists to define serialization order for reorderable value components, if there's no representation then it can't be part of the order... |
I assumed you were talking about an explicit list about which properties are reset by the font shorthand. @heycam Are you talking about something else? |
Here's a slightly revised version of the test designed to trigger slightly fewer browser bugs and potentially report an orange state in the presence of others. (Firefox doesn't actually honor the "Computed value: as specified" for font-language-override, and drops things that aren't valid language tags.) |
Thanks for fixing the test, @dbaron! |
The CSSWG discussed this in #1349. (But, because this one has the test case, duping that thread to this one) |
The CSS Working Group just discussed
The full IRC log of that discussion<astearns> topic: Which font properties should be reset by the font shorthand?<astearns> github: https://github.com//issues/1636 <TabAtkins> myles: Thanks to David, we now have a bunch of correct data. <TabAtkins> myles: [presents it] <TabAtkins> myles: I think there's some consensus that 'font' can reset properties that it can't set. <TabAtkins> TabAtkins: It has some "reset-only sub-properties". <TabAtkins> myles: [explains table] <TabAtkins> dbaron: Further question: what's a subproperty of font-variant? <TabAtkins> myles: So should we look for that data too? <TabAtkins> myles: So does anyone outside of dbaron have opintions on this? <TabAtkins> TabAtkins: I think font-synthesis shouldn't be reset, everything else I don't care, probably be reset. <TabAtkins> dbaron: My pref is for 'font' to reset the font you specified, and not leave a bunch of stuff unresolved. <TabAtkins> fantasai: I agree with Firefox's group, except maybe font-kerning not being reset. <TabAtkins> myles: optical-sizing should be reset. <fantasai> s/maybe font-kerning not being reset/unsure about font-kerning/ <fantasai> s/agree/strongly agree/ <fantasai> ?^: What about the unsupported ones? <TabAtkins> dbaron: I think it's important that variation-settings and feature-setting get reset. <TabAtkins> [general agreement] <fantasai> fantasai^: don't know what optical-sizing is, but agree with resetting all of those as well <TabAtkins> astearns: Why not font-synthesis? <TabAtkins> TabAtkins: It seems like it's rarely tied to the precise font; usually if you care, you'll amke sure all your fonts have it. <TabAtkins> myles: Same probably applies to font-presentation. <TabAtkins> [general agreement] <TabAtkins> [general agreement that all the others should be; we went thru several specific examples] <TabAtkins> Florian: I'm not sure about font-variant <TabAtkins> myles: That's *set* by the 'font' shorthand, it *must* be reset. <TabAtkins> RESOLVED: All font-* properties are reset by the font shorthand, except font-presentation and font-synthesis. |
... and |
https://drafts.csswg.org/css-fonts-4/#font-prop
The canonical order of the font shorthand is defined by reference to its grammar, but that doesn't take into account properties that are reset to their initial value and can't be specified in the shorthand value (such as font-size-adjust).
The text was updated successfully, but these errors were encountered: