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
CSSFontFeatureValuesRule, which defines a read-write attribute and says: "The list of one or more font families for which a given set of feature values is defined."
CSSFontPaletteValuesRule, which defines a readonly attribute (which makes the following text useless, I think): "The fontFamily and basePalette interfaces are parsed according to the appropriate CSS property syntax."
In (1), it is not stated that we're invoking the CSS parser, so it's not clear how to handle "the list".
In (2), it is stated, but then it doesn't actually matter since the attribute is readonly.
In any case, we should probably avoid invoking the CSS parser per the consensus-ish seen in #3776.
If possible, we should just avoid the problem by making fontFamily readonly in all cases.
These attributes may contain a list of font families, not just a single family name; and therefore we need to know how that list is represented even if we're not having to parse it in a setter. This is different from the case of the FontFace constructor in #3776, as that deals with just a single family name.
So I think the statement that
The fontFamily and basePalette interfaces are parsed according to the appropriate CSS property syntax
serves to tell a reader of the attribute how to interpret the string that it gets, although maybe this could be expressed more clearly.
Yeah, talking about parsing in that case doesn't make sense. They should be talking about serialization. If you don't want to elaborate too much on the serialization, just literally doing s/parsed/serialized/ will be correct without changing the level of detail.
Making font-family readonly if possible would probably be best, if we don't want to invoke the CSS parser. Otherwise we'll have to, hmm, invoke strictly split a string, then strip whitespace on the parts, before finally interpreting them as font-family names. A lot of trouble for something incredibly low-value to do in the first place!
A few interfaces define a
fontFamily
attribute:In (1), it is not stated that we're invoking the CSS parser, so it's not clear how to handle "the list".
In (2), it is stated, but then it doesn't actually matter since the attribute is readonly.
In any case, we should probably avoid invoking the CSS parser per the consensus-ish seen in #3776.
If possible, we should just avoid the problem by making
fontFamily
readonly in all cases.@drott said to CC the following on this issue: @litherum @jfkthame @svgeesus, but given #3776 maybe @tabatkins and @emilio also care about this.
The text was updated successfully, but these errors were encountered: