-
Notifications
You must be signed in to change notification settings - Fork 790
Expand file tree
/
Copy pathmedia.src
More file actions
259 lines (220 loc) · 9.26 KB
/
media.src
File metadata and controls
259 lines (220 loc) · 9.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang="en">
<!-- $Id: media.src,v 2.13 1998-03-21 00:36:49 ijacobs Exp $ -->
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<TITLE>Media types</TITLE>
</HEAD>
<BODY>
<H1 align="center">Media types</H1>
<!-- Are values case-sensitive? -->
<H2>Introduction to media types</H2>
One of the most important features of style sheets is that they
specify how a document is to be presented on different media: on the
screen, on paper, with a speech synthesizer, with a braille device,
etc.
<P>Certain CSS properties are only designed for certain media (e.g.,
the <span class="propinst-cue-before">'cue-before'</span> property for
aural style sheets). On occasion, however, style sheets for different
media types may share a property, but require different values for
that property. For example, the <span
class="propinst-font-size">'font-size'</span> property is useful both
for screen and print media. However, the two media are different
enough to require different values for the common property; a document
will typically need a larger font on a computer screen than on paper.
Experience also shows that sans serif fonts are easier to read on
screen, while fonts with serifs are easier to read on paper. For
these reasons, it is necessary to express that a style sheet -- or a
section of a style sheet -- applies to certain media types.
<H2>Specifying media-dependent style sheets</H2>
<P>There are currently two ways to specify media dependencies for
style sheets:</p>
<UL>
<LI>Specify the target medium from a style sheet with the <span
class="index-inst" title="@media">@media</span> or <span
class="index-inst" title="@import">@import</span> at-rules.
<div class="example"><P>
<PRE>
@import url(loudvoice.css) aural;
@media print {
/* style sheet for print goes here */
}
</PRE>
</div>
<LI>Specify the target medium within the document language. For
example, in HTML 4.0 ([[-HTML40]]), the "media" attribute on the LINK
element specifies the target medium of an external style sheet:
<div class="html-example"><P>
<PRE>
<HTML>
<HEAD>
<TITLE>Link to a target medium</TITLE>
<LINK rel="stylesheet" type="text/css"
media="print" href="foo.css">
</HEAD>
<BODY>
<P>The body...
</BODY>
</HTML>
</PRE>
</div>
</UL>
<p>The <a href="cascade.html#at-import">@media</a> rule is defined in
the <a href="cascade.html">chapter on the cascade</a>.
<H3><a name="at-media-rule">The @media rule</a></H3>
<P>An <span class="index-def" title="media">@media</span> rule lists
the <a href="#media-types">media types</a> (separated by commas)
affected by a set of rules delimited by curly braces.
<p>The <span class="index-inst" title="@media">@media</span> construct
allows style sheet rules for various media in the same style
sheet:</P>
<pre class="example">
@media print {
BODY { font-size: 10pt }
}
@media screen {
BODY { font-size: 12pt }
}
@media screen, print {
BODY { line-height: 1.2 }
}
</pre>
<H2><a name="media-types">Recognized media types</a></H2>
<P>A CSS <span class="index-def" title="media type"><dfn>media
type</dfn></span> names a set of CSS properties. A user agent that
claims to support a media type by name must implement all of the
properties that apply to that media type.
<P>The names chosen for CSS media types reflect target devices for
which the relevant properties make sense. In the list of CSS media
types, the parenthetical descriptions are not normative. They only
give a sense of what device the media type is meant to refer to.
<p>Due to rapidly changing technologies, CSS2 does not specify a
definitive list of media types that may be values for <span
class="index-inst" title="@media">@media</span>.
<dl>
<dt><strong>all</strong>
<dd>Suitable for all devices.
<dt><strong>aural</strong>
<dd>Intended for speech synthesizers. See the
section on <a href="./aural.html">aural style sheets</a> for details.
<dt><strong>braille</strong>
<dd>Intended for braille tactile feedback devices.
<dt><strong>embossed</strong>
<dd>Intended for paged braille printers.
<dt><strong>handheld</strong>
<dd>Intended for handheld devices (small
screen, monochrome, limited bandwidth).
<dt><strong>print</strong>
<dd>Intended for paged, opaque material and for documents viewed on
screen in print preview mode. Please consult the section on <a
href="page.html">paged media</a> for information about formatting
issues that are specific to paged media.
<dt><strong>projection</strong>
<dd>Intended for projected presentations, for
example projectors or print to transparencies.
Please consult the section on <a href="page.html">paged media</a> for
information about formatting issues that are specific to paged media.
<dt><strong>screen</strong>
<dd>Intended primarily for color computer screens. See the section on
<a href="#continuous-media-group">rendering to continuous
media</a> for more information.
<dt><strong>tty</strong>
<dd>Intended for media using a fixed-pitch character grid, such as
teletypes, terminals, or portable devices with limited display
capabilities. Authors should not use <a
href="syndata.html#pixel-units">pixel units</a> with the "tty" media
type.
<dt><strong>tv</strong>
<dd>Intended for television-type devices (low
resolution, color, limited-scrollability screens, sound available).
</dl>
<P>Media type names are case-insensitive.
<div class="note"><P>
<em><strong>Note.</strong>
Future versions of CSS may extend this list. Authors
should not rely on media type names that are not yet defined
by a CSS specification.
</em>
</div>
<H3><a name="media-groups">Media groups</a></H3>
<P>Each CSS property definition specifies the media types for which
the property must be implemented by a <a
href="conform.html#conformance">conforming user agent</a>. Since
properties generally apply to several media, the "Applies to media"
section of each property definition indicates a <span
class="index-def" title="media group">media group</span> rather than a
list of media types. A property applies to all media types that belong
to a given media group.
<P>CSS2 defines the following media groups: </P>
<ul>
<li>
<span class="index-def" title="'continuous' media group"><a
name="continuous-media-group"><strong>continuous</strong></a></span>
or <span class="index-def" title="'paged' media group"><a
name="paged-media-group"><strong>paged</strong></a></span>.
"Both" means that the property in question applies to both media groups.
<li><span
class="index-def" title="'visual' media group"><a
name="visual-media-group"> <strong>visual</strong></a>,</span> <span
class="index-def" title="'aural' media group"><a
name="aural-media-group"><strong>aural</strong></a>,</span> or <span
class="index-def" title="'tactile' media group"><a
name="tactile-media-group"><strong>tactile</strong></a></span>.
<li><span
class="index-def" title="'grid' media group"><a
name="grid-media-group"><strong>grid</strong></a></span> (for
character grid devices), or
<span
class="index-def" title="'bitmap' media group"><a
name="bitmap-media-group"><strong>bitmap</strong></a></span>.
"Both" means that the property in question applies to both media
groups.
<li><span
class="index-def" title="'interactive media group"><a
name="interactive-media-group"><strong>interactive</strong></a></span> (for
devices that allow user interaction), or
<span
class="index-def" title="'static' media group"><a
name="static-media-group"><strong>static</strong></a></span> (for
those that don't).
"Both" means that the property in question applies to both media
groups.
<li><span class="index-def" title="'all'
media group"> <a name="all-media-group"><strong>all</strong></a></span>
(includes all media types)
</ul>
<P>The following table shows the relationships
between media groups and media types:</P>
<TABLE border
summary="Relationship between media groups and media types">
<CAPTION>Relationship between media groups and media types</CAPTION>
<TR><TH>Media Types <TH colspan="4">Media Groups
<TR><TH>
<TH>continuous/paged
<TH>visual/aural/tactile
<TH>grid/bitmap
<TH>interactive/static
<TR><TH>aural<TD align="center">continuous<TD align="center">aural<TD align="center">N/A<TD>both</TR>
<TR><TH>braille<TD align="center">continuous<TD align="center">tactile<TD align="center">grid<TD>both</TR>
<TR><TH>emboss<TD align="center">paged<TD align="center">tactile<TD align="center">grid<TD>both</TR>
<TR><TH>handheld<TD align="center">both<TD align="center">visual<TD
align="center">both<TD>both</TR>
<TR><TH>print<TD align="center">paged<TD align="center">visual<TD
align="center">bitmap<TD align="center">static</TR>
<TR><TH>projection<TD align="center">paged<TD align="center">visual<TD align="center">bitmap<TD align="center">static</TR>
<TR><TH>screen<TD align="center">continuous<TD align="center">visual<TD align="center">bitmap<TD>both</TR>
<TR><TH>tty<TD align="center">continuous<TD align="center">visual<TD align="center">grid<TD>both</TR>
<TR><TH>tv<TD align="center">both<TD align="center">visual, aural<TD align="center">bitmap<TD>both</TR>
</TABLE>
</BODY>
</html>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-declaration:"~/SGML/HTML4.decl"
sgml-default-doctype-name:"html"
sgml-minimize-attributes:t
sgml-nofill-elements:("pre" "style" "br")
sgml-live-element-indicator:t
End:
-->