Skip to content
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

[css-values-5] Clarify how to determine the type of <percentage> in container-progress() and media-progress() #10801

Closed
cdoublev opened this issue Aug 29, 2024 · 1 comment

Comments

@cdoublev
Copy link
Collaborator

In container-progress() and media-progress(), I think the type of <percentage> should be determined according to the size/media feature instead of "the context":

<percentage>

If, in the context in which the math function containing this calculation is placed, <percentage>s are resolved relative to another type of value (such as in width, where <percentage> is resolved against a <length>), and that other type is not <number>, the type is determined as the other type, but with a percent hint set to that other type.

For example, width: calc(1px * container-progress(width from 0px to 100%)) should be invalid because the width size feature does not accept <percentage>.

Note: there is currently no container/media feature accepting <percentage>, if I am not mistaken.

@cdoublev
Copy link
Collaborator Author

cdoublev commented Oct 8, 2024

Fixed in 4da8f9f.

Units in the progress start value and progress end value are interpreted as specified for the media feature (rather than as specified by the context the function is used in).

@cdoublev cdoublev closed this as completed Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant