Media Types and @-rules
Don’t get too excited yet. We aren’t talking about media types in the sense of things like audio and video authoring. Well, not exactly, anyway. We’re talking about creating rules for presentation within various kinds of media. The defined types of media thus far are:
screen, as in a computer screenprint, for things like printouts and print-preview displaysprojection, for projected presentations such as slide showsbrailleandembossed, for tactile feedback devices and printersaural, for speech generatorstv, for television-type displays (think WebTV)tty, for fixed-width character displayshandheld, for palmtop computersthe ubiquitous
all
These are all values of @media, one of several new
@-rules. Some others are:
@font-face, which is used in the definition of a font by manual means@import, which has more power than under CSS1 by allowing authors to associate media types with@importstatements; for example,@import(print.css)print;@page, which allows you to define the styles of a page when using paged-media style sheets; for example,@page{size:8.5in11in;}
Paged Media
Since I just brought up paged media, I should probably mention that there are some new properties that apply to such media. Five of them apply to page breaks and where they appear:
page-break-before page-break-after page-break-inside orphans widows
The first two are used to control whether a page break should appear before or after a given element, and the latter two are common ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access