Adds a function that queries whether a user agent supports a selector.
Motivation
Web authors can use this feature to query whether the UA supports the selector before they actually try to apply the specified style rules matching the selector.
Demos
- The 3 tests below is for testing feature query function of css selector.
- https://github.com/web-platform-tests/wpt/blob/master/css/css-conditional/at-supports-040.html
- https://github.com/web-platform-tests/wpt/blob/master/css/css-conditional/at-supports-041.html
- https://github.com/web-platform-tests/wpt/blob/master/css/css-conditional/at-supports-042.html
Documentation
Specification
Status in Chromium
Enabled by default (tracking bug) in:
- Chrome for desktop release 83
- Chrome for Android release 83
- Android WebView release 83
Consensus & Standardization
After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.
- Shipped/Shipping
- No signal
- In development
- No signals
Owner
Search tags
feature query function, selector,Last updated on 2020-11-19