Skip to content

[css-conditional-5] Should !important be valid in a style query? #12426

Open
@cdoublev

Description

@cdoublev

(This is a follow-up of recent changes from #12401 following the resolution in #8376.)

https://drafts.csswg.org/css-conditional-5/#style-container

The syntax of a <style-feature> is either the same as for a valid declaration

But the syntax of <style-feature-plain> has recently been made explicit with <style-feature-name> : <style-feature-value>, with <style-feature-value> defined as <declaration-value>, which does not accept !.

In Chrome, it seems that style(--custom: 1 !important) evaluates to true regardless of whether the declaration of --custom: 1 for the container has a priority or not.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions