The CSS1 specification was aimed primarily at describing the visual
rendering of documents. Times and needs are changing, and the newer
CSS2 specification recognized that the use of different delivery
platforms and rendering devices was not only needed, but inevitable
as well. In allowing for other types of rendering devices, CSS2 has
created many properties and values which will only be applicable on
specific media types. CSS2 solves this logistics problem by allowing
style rules to be selectively applied to differing rendering devices
via the @media At-Rule and the @import At-Rule.
Using this syntax, different CSS rules can be specified and applied from
the same style sheet depending on whether the rendering device is the
printed page, a computer screen, speech synthesizer, etc.
An @media At-Rule specifies a comma separated list of case-insensitive
media types, followed by a Rule Set embedded within matching curly
braces ("{", "}".) If a browser supports a media type, it should support
all style properties applicable to that media type. If no @media rule
is specified for a Rule Set, it is applied to all media (default media = "all".)
Media Types Specified in CSS2
(This is not a definitive list - just the list of those found in CSS2;
the list may be expanded in the future.)
- If an @media media type is not understood, only the first CSS
declaration in the block is ignored. Subsequent declarations are
treated as though they apply to the current media.
4.0+:
- Currently, only the 'all', 'screen' and 'print' media types are understood.
Opera
3.5+:
- Only the 'all' and 'screen' media types are understood.