function
Selector() — CSS reference
Tests whether the selector syntax is supported. A positive result does not imply a particular element matches that selector. Keep the unconditioned declaration as a fallback.
Formal Syntax & Structure
css syntaxcss
@supports selector(:has(*)) { #a { color: blue; } }Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>selector()</title><style>body{margin:8px;font:16px/20px sans-serif;color:black;background:white}#a{color:green}@supports selector(:has(*)){#a{color:blue}}</style><body><p id="a">Example text</p></body></html>