← Back to release summary

at-rule: CSS Feature Detection

Category
CSS
Type
New or changed feature
Status
Proposed (Chrome Proposed)
Intent stage
None

Summary

This feature adds an `at-rule()` function to CSS `@supports` which enables authors to feature-detect support for CSS at-rules.

Motivation

Feature detection is a W3C TAG design principle and a tool that Web authors rely on for graceful degradation of their pages. Currently, the only way for web developers to detect support for CSS at-rules is to use JavaScript. This feature allows at-rule support to be detected using the same `@supports` feature used to detect support for CSS properties.

Standards & signals

Explainers: https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/AtRuleFeatureDetection/explainer.md

View on chromestatus.com