Skip to content

[css-variables-1] Expose pending substitution value? #11055

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
andruud opened this issue Oct 21, 2024 · 2 comments
Closed

[css-variables-1] Expose pending substitution value? #11055

andruud opened this issue Oct 21, 2024 · 2 comments
Labels
css-variables-1 Current Work

Comments

@andruud
Copy link
Member

andruud commented Oct 21, 2024

Pending-substitution values must be serialized as the empty string, if an API allows them to be observed.

https://drafts.csswg.org/css-variables/#substitution-in-shorthands

Authors do trip over this behavior sometimes (https://issues.chromium.org/issues/40804066), and it's not ideal for cases where round-tripping via text is crucial, like serializing to MHTML.

Can we somehow expose the pending-substitution value? E.g.:

border-width: shorthand(border, 1px var(--x) black);
@andruud andruud added the css-variables-1 Current Work label Oct 21, 2024
@Loirooriol
Copy link
Contributor

Duplicate of #8055 ?

@tabatkins
Copy link
Member

Technically a separate request, but close enough to be worth deduping. I'll move the comment over to there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-variables-1 Current Work
Projects
None yet
Development

No branches or pull requests

3 participants