CSS · At-rules

@media range syntax

Range syntax compares viewport features without min-width/max-width pairs.

Syntax
@media (width >= 40rem)

Example

Try it

More in this group

@charset @color-profile @counter-style @font-feature-values @namespace @page @property @scope (at-rule)

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course