Skip to content

[css-env-1] How to handle env() in descriptors not exposed as CSSOMString? #11264

@cdoublev

Description

@cdoublev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions