Experimental: Check browser support before using this in production.

The CSS @custom-media at-rule allows creating aliases for media queries. This is particularly valuable if you have long or complex media queries that you use multiple times across your codebase. The feature is similar in nature to a media query version of CSS custom properties (CSS variables).

Syntax

The syntax for defining an alias is:

@media (<dashed-ident>) [<media-query-list> | true | false ];