w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.35k stars 641 forks source link

[css-align-3] Incorrect syntax for <baseline-position> #10273

Open pyoor opened 2 months ago

pyoor commented 2 months ago

From what I can tell, baseline-position is only intended to accept the following 3 values exactly: baseline first baseline last baseline

If that's correct, the syntax should be: [ first | last ]? baseline

As opposed to using the && which allows for any order of elements. https://github.com/w3c/csswg-drafts/blob/13e83cee9d7d41054637e43bda7ac9981fade8d0/css-align-3/Overview.bs#L602

tabatkins commented 2 months ago

In general, we allow reordering of values when it doesn't otherwise cause ambiguity. first baseline is allowed, yes, but it's intended that baseline first is also allowed. That's why the grammar is written the way it is. ^_^

pyoor commented 2 months ago

That's understandable. I originally noticed because in both Firefox and Chrome it appears that neither support baseline first or baseline last.