A.1. At-Rules

The CSS2 recommendation from the W3C defines a new type of CSS rule. It's called an "at-rule" because all the rules of this type start with an "at" sign (@). This type of rule is meant to be extensible. In other words, future editions of the W3C recommendation, browser developers, and others may define new sets of rules that begin with @.

For now, there are four groups of @ rules:

  • @import

  • @media

  • @page

  • @font-face

The @import rule is discussed in Chapter 12.

The @media rule allows you to define different output options for various media in a single style sheet. Browser support is somewhat inconsistent, though it seems to be getting better with each release. Right now, support for this rule is at least usable in most modern browsers ...

Get HTML Utopia: Designing Without Tables Using CSS now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.