Skip to content

Add @supports at-rule #7166

@Schweinepriester

Description

@Schweinepriester

https://www.bram.us/2024/07/11/feature-detect-css-starting-style-support/:

While in theory you could use @supports at-rule() for this, in practice you can't because it has no browser support (😭).

https://www.bram.us/2022/01/20/detect-at-rule-support-with-the-at-rule-function/:

the CSS Working Group just decided to introduce a new function that be used in conjunction with @supportsat-rule().

With it, we can feature detect at-rule support as follows:

@supports at-rule(@foo) {
  /* @foo is supported */
}

I feel like it's very likely that this will come via MDN, but as usual just keeping track 🤓

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions