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-env-1] How to handle env() in descriptors not exposed as CSSOMString? #11264

Open
cdoublev opened this issue Nov 23, 2024 · 0 comments
Open

Comments

@cdoublev
Copy link
Collaborator

env()-containing declaration values are valid at parse time (spec). If I am not mistaken, env() should be internally preserved even after substitution, and should show up in the serialization, in order to be processed whenever an environment value changes.

But env()-containing values are incompatible with font feature value descriptors and @view-transition/types, which are the only descriptors exposed as a specific value type via the CSSOM, rather than as a CSSOMString.

Now I am aware that the current browser support for env() is limited to property declarations and declarations in @page/margin rules, and that I am reporting a problem that will probably never happen because authors will never use env() for these descriptors. But it might happen for future descriptors.

If env() is here to stay for any descriptor of any rule, and should be preserved in the serialization, I think any descriptor should either be exposed as CSSOMString or not be exposed.

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