XML.com: XML From the Inside Out
oreilly.comSafari Bookshelf.Conferences.

advertisement
 Resource Guide -> XHTML, W3C Standards-in-progress, CSS -> Media queries

Media queries

Working Draft

Date: May. 17, 2001
Link: http://www.w3.org/TR/css3-mediaqueries/
Source Author or Organization: W3C

This document describes the requirements for media queries (device-specific style sheets) in Cascading Style Sheets Level 3 (CSS3). Using media queries saves authors from developing a separate version of each page for each supported client device.

A media query is comprised of the media type (for example, monitor) and expressions which are used to limit the scope of the style sheet to that device. The Media queries specification employs a vocabulary able to describe devices in detail and utilize HTML 4's reserved namespace for use with future versions of CSS and XHTML.

Although CSS3 media queries will have considerably more expressive power than current HTML 4 and CSS2 media-dependent style sheets, they have been specifically designed so as not to detract significantly from the ease-of-use or high-level of performance of their predecessors.

The specification also provides a description of the relationship between media queries and related work on Composite Capabilities/Preference Profiles (CC/PP).

A media query combines a media type (such as "aural", "print" or "screen") with one or more modifying expressions (such as "height" or "color"). Media queries will be compatible with HTML 4 and use a syntax that fits into the HTML 4 namespace. They will also be usable in future versions of CSS and XHTML.

Media queries will also bring more expressive power to style sheets, allowing parameters such as "usable on devices with viewport widths between 400 and 700 pixels", and "usable on tty devices with viewports greater than or equal to 80 characters".