at-rule

@custom media — CSS reference

Names a media condition for reuse in @media (--wide). The draft alias is dropped in this Chromium; write the underlying media query directly.

Formal Syntax & Structure

css syntaxcss
@custom-media --wide (width > 0px);

Working Example

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