Open nt1m opened 1 year ago
cc @drott @jfkthame
I would expect <length-percentage>
.
Yeah, I also think <length-percentage>
makes sense.
@nt1m wrote:
If they are allowed to be mixed, the type should probably be
.
Agree, that would make sense. We parse as ConsumeLengthOrPercent, (impl)
Quite sure this was not intentional. Likely at the time this was written, there was no distinction between <length-percentage>
and <length> | <percentage>
. Fixed.
@fantasai You fixed the grammar, but the prose below still tries to define <length>
and <percentage>
separately, instead of <length-percentage>
.
There's a WPT testing that
text-decoration-thickness
takescalc()
mixing percentages and lengths. https://github.com/web-platform-tests/wpt/blob/b5c73fa21b/css/css-text-decor/text-decoration-thickness-valid.html#L24-L25Except the spec specifies the syntax to be:
auto | from-font | <length> | <percentage>
, which means that they can't actually be mixed? If they are allowed to be mixed, the type should probably be<length-percentage>
.It seems like the mixing is supported in Firefox / Chrome. Safari doesn't currently support percentages.
cc @kojiishi @fantasai @shivamidow