You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that the "abcd" feature has been specified twice, first with the implied value of 1, and later with an explicit value of 2.
So what is the computed value of font-feature-settings? If it's "as specified", then it should be exactly this list of three features, including both entries for "abcd".
However, the text goes on to say, a few paragraphs later,
The computed value of font-feature-settings is a map, so any duplicates in the specified value must not be preserved. If the same axis name appears more than once, the value associated with the last appearance supersedes any previous value for that axis.
Currently, of the browsers I've tried, only Safari appears to do this, returning "spqr", "abcd" 2 from getComputedStyle; both Firefox and Chrome return the list "as specified" including the first (superseded) occurrence of "abcd".
We should confirm which behavior is wanted ("as specified" or "with duplicates removed"), and adjust the spec accordingly. (My inclination is to require the duplicate-removal behavior, as implemented in Safari, so that would imply Firefox and Chrome should fix their bugs here.)
Computed value: the keyword 'normal' or a list, each item a string paired with a number
It then has similar text confirming that duplicates should be removed:
If the same axis name appears more than once, the value associated with the last appearance supersedes any previous value for that axis. This deduplication is observable by accessing the computed value of this property.
So maybe a similar computed value description should be used for font-feature-settings, instead of "as specified".)
The text was updated successfully, but these errors were encountered:
I agree that dups should be removed, as the spec says, so the fix here is to change "as specified" to "as specified, with duplicates removed as described below".
Does "a list" imply that the as-specified order is retained?
Does "a list" imply that the as-specified order is retained?
I don't think it necessarily does (and the order should be unimportant).
In practice, a UA might want to sort the list (e.g. by binary value of tag) as part of its de-duplicating operation. I'm inclined to think it should be allowed (but not required) to do so.
the fix here is to change "as specified" to "as specified, with duplicates removed as described below"
While we're here, is the UA allowed/expected to normalize feature settings such that tags with the value 1 or on are serialized without an explicit value, and off is normalized to 0? That would be consistent with using the shortest form; but it means these aren't quite "as specified" in such cases.
By the way, when you get to editing this, there's another issue with the existing text where it says:
However, the text goes on to say, a few paragraphs later,
The computed value of font-feature-settings is a map, so any duplicates in the specified value must not be preserved. If the same axis name appears more than once, the value associated with the last appearance supersedes any previous value for that axis.
This looks like it was copy/pasted from the corresponding text about font-variation-settings, but it's not appropriate to refer to "...the same axis name..." and "...value for that axis" here. The term "axis" is specific to variations, not features.
So this should read something like "...the same feature tag..." and "...value for that feature" instead.
The current text of CSS Fonts 4 seems to contradict itself here.
On the one hand, 6.12 says
Suppose the specified value is
Note that the "abcd" feature has been specified twice, first with the implied value of
1
, and later with an explicit value of2
.So what is the computed value of
font-feature-settings
? If it's "as specified", then it should be exactly this list of three features, including both entries for "abcd".However, the text goes on to say, a few paragraphs later,
Currently, of the browsers I've tried, only Safari appears to do this, returning
"spqr", "abcd" 2
from getComputedStyle; both Firefox and Chrome return the list "as specified" including the first (superseded) occurrence of"abcd"
.We should confirm which behavior is wanted ("as specified" or "with duplicates removed"), and adjust the spec accordingly. (My inclination is to require the duplicate-removal behavior, as implemented in Safari, so that would imply Firefox and Chrome should fix their bugs here.)
(Note that the similarly-structured
font-variation-settings
property defines its computed value differently:It then has similar text confirming that duplicates should be removed:
So maybe a similar computed value description should be used for
font-feature-settings
, instead of "as specified".)The text was updated successfully, but these errors were encountered: