Skip to content

[css-sizing-4] Should the contain-intrinsic-* properties allow negative lengths? #11945

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

Closed
weinig opened this issue Mar 16, 2025 · 1 comment
Closed

Comments

@weinig
Copy link
Contributor

weinig commented Mar 16, 2025

The current grammar for the contain-intrinsic-* properties is auto? [ none | <length> ], but WPT has tests that indicate a negative length is invalid, https://github.com/web-platform-tests/wpt/blob/7a9307ef9e1e88229ced4a29991270d20911669c/css/css-sizing/contain-intrinsic-size/parsing/contain-intrinsic-size-invalid.html#L22, which all browsers currently pass.

Should the grammar be updated to auto? [ none | <length [0,∞]> ]?

cc (@tabatkins, @fantasai, @jensimmons)

@Loirooriol
Copy link
Contributor

I guess negative lengths would be like having content with negative margins. But the element won't get a negative size anyways so it seems pointless. I would update to <length [0,∞]>, yes.

weinig added a commit to weinig/csswg-drafts that referenced this issue Mar 18, 2025
@weinig weinig closed this as completed Mar 19, 2025
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

2 participants