at-rule

@custom selector — CSS reference

Proposed named selector alias for repeated selector sets. This historical draft syntax is not accepted locally; use :is(button, a) or an explicit selector list.

Formal Syntax & Structure

css syntaxcss
@custom-selector :--action button, a;

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>@custom-selector</title><style>body{margin:8px;font:16px/20px sans-serif;color:black;background:white}@custom-selector :--action button, a; #a{color:green}</style><body><p id="a">Example text</p></body></html>
CSS Reference