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
According to CSS V&U, a math function can only resolve to a subset of <dimension>:
A math function resolves to <number>, <length>, <angle>, <time>, <frequency>, <resolution>, <flex>, or <percentage> according to which of those productions its type matches.
So implementations should either expand <dimension> to this restricted set when it is produced by <mf-value>, or they should skip type checking a math function matching <mf-value>, since <mf-value> must be validated against the grammar of the specified feature value anyway.
This can be clarified or, <calc-sum> could be produced instead of <number> | <dimension> | <ratio>, which would be on par with *-progress(<mf-name>, <calc-sum>, <calc-sum>), which requires validating <calc-sum> according to the grammar of the specified <mf-name> (or only its numeric type? #10802).
This would mean that queries like @media (10vw + 1rem < width) {} or @media ((10vw + 1rem) < width) {} would work.
The text was updated successfully, but these errors were encountered:
So implementations should either expand to this restricted set when it is produced by , or they should skip type checking a math function matching , since must be validated against the grammar of the specified feature value anyway.
I don't understand what you're asking for here. A math function resolves to one of those types. Those types match <number> or <dimension>, which is what <mf-value> requires. So a valid math function (per its normal validity rules) is always a valid <mf-value>.
Right, sorry, <dimension> does not expand to these types. Each of these is a <dimension>.
My point is that for an input calc(1px) < width, a CSS parser processing the grammar would first see <number> and fail to get a match, then try to replace it with a math function but fail to match its numeric type, then see <dimension> and fail to get a match and is not allowed to replace it with a math function.
A feature dimension value specified with a math function matches
<dimension>
in<mf-value>
:According to CSS V&U, a math function can only resolve to a subset of
<dimension>
:So implementations
should either expandshould skip type checking a math function matching<dimension>
to this restricted set when it is produced by<mf-value>
, or they<mf-value>
, since<mf-value>
must be validated against the grammar of the specified feature value anyway.This can be clarified or,
<calc-sum>
could be produced instead of<number> | <dimension> | <ratio>
, which would be on par with*-progress(<mf-name>, <calc-sum>, <calc-sum>)
, which requires validating<calc-sum>
according to the grammar of the specified<mf-name>
(or only its numeric type? #10802).This would mean that queries like
@media (10vw + 1rem < width) {}
or@media ((10vw + 1rem) < width) {}
would work.The text was updated successfully, but these errors were encountered: