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] Normalized attr() substitution value #10503

Open
andruud opened this issue Jun 26, 2024 · 1 comment
Open

[css-values-5] Normalized attr() substitution value #10503

andruud opened this issue Jun 26, 2024 · 1 comment

Comments

@andruud
Copy link
Member

andruud commented Jun 26, 2024

What do you get if you serialize the computed value of --x here?

<div data-x="calc(1px + 2px)">
div { --x: attr(data-x length); }

I think we expect eager simplification (3px), and generally we may need something like the equivalent token sequence (but for non-computed values)?

@andruud
Copy link
Member Author

andruud commented Jun 27, 2024

OK, I now see the attribute value needs to be a single token (surprising), which means the example in the first post was bad.

In that case, what about:

<div data-x="10.000px">
div { --x: attr(data-x length); }

Does this serialize as 10px or 10.000px?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant