August 2021
Intermediate to advanced
524 pages
9h 39m
English
Conditional CSS refers to CSS rules that are applied when a condition is met. A condition may be a CSS property and value combination, as with the @supports rule. A condition may test for a browser window condition such as width, as with the @media rule. Or a condition may be a device feature such as hover capability or pointer input, as with some newer features of @media. We’ll discuss all of the above in this chapter.
Both @media and @supports are described by the CSS Conditional Rules Module Level 3 specification. The @media rule—which you probably know as media queries—is fully defined by the Media Queries specification.
@mediaThe @media rule is actually a long-standing feature of ...
Read now
Unlock full access