Open wezm opened 1 year ago
I think that this needs to be expanded and that "appropriate initial value" defined.
Ah, I see. In https://github.com/w3c/csswg-drafts/commit/9a6e7049b9f096a2551af0ee546241da28433c99 the initial value was "normal" for all three font-weight
, font-style
and font-width
and that would be used for font selection purposes. So "appropriate initial value" made sense. But in https://github.com/w3c/csswg-drafts/commit/36f80a0c77378ee511f1f67ecb08182be3cfeb91 that was changed to auto
because of https://github.com/w3c/csswg-drafts/issues/2485#issuecomment-431893656 so now it needs to explicitly say 'normal`, for font selection.
And for variation handling, it means no clamping is applied.
@wezm do the changes in https://github.com/w3c/csswg-drafts/commit/02251acdacffe25902d0f8618e1586016a6fde01 cover it?
@svgeesus hmm are the changes right? E.g. for font-weight normal
means 400 and if that was used with a variable font with a wght
axis ranging from 500 to 900 the new text suggests to me that that font would not be selected, whereas I think the intention of auto
is that it would be selected?
Good point, this interacts with
CSS Fonts Level 4 adds an
auto
value tofont-weight
,font-style
, andfont-stretch
in@font-face
rules and uses it as the initial value of these properties. The spec does not provide much detail on how thisauto
value works. This is the only note I could find:I think that this needs to be expanded and that "appropriate initial value" defined.
Looking over #2485 clarified some things for me that I think should be added to the spec. Specifically taking
font-weight
as an example it seems thatauto
acts as an alias fornormal
for fonts without awght
axis, matching the behaviour of CSS Fonts Level 3. For fonts with awght
axis it seems that it acts as a sort of wildcard equivalent to1 1000
.