-
Notifications
You must be signed in to change notification settings - Fork 715
[css-values-5] Do not make the type of *-progress()
consistent with its input calculations?
#10840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The result type should not be made consistent with its calculations (cf. w3c/csswg-drafts#10840).
I disagree. The % in the calculations needs to have a consistent source for resolving itself, and the clear answer in general is to take it from the property context (so you can do useful things with the box's size in 'width', for example). So, your example would be invalid - the (Hm, I should really capture that fact explicitly; the tip-toeing I do around percentages sometimes would be a little better if the percent hint could be non-null when it resolves against number or just as itself, so it'll fail earlier, at type-addition time, rather than later when matching the type against a grammar.) There is certainly a potential for an MQ to accept a non-trivial percentage, such that you'd actually want its value. In that case, we'll have to create some clear way to obtain it. But there's no examples of this so far. |
Actually, hm, I think I'm wrong. I need to check with @fantasai, but I suspect the intention is to evaluate the calculations entirely in the context of the MQ itself (or the CQ). If that's the case, then indeed, the types shouldn't be made consistent, as they're self-contained. ( |
Okay yup, fixed in 4da8f9f. (accidentally mistagged the issue) |
(Follow-up on this #10770 (comment))
For
container-progress()
andmedia-progress()
:There is no size/media feature accepting percentages, but if there was one, say
hypothetical-length-percentage-feature
, I thinkopacity: media-progress(hypothetical-length-percentage-feature from 0% to 100px)
should be valid.The text was updated successfully, but these errors were encountered: