-
Notifications
You must be signed in to change notification settings - Fork 791
Expand file tree
/
Copy pathOverview.html
More file actions
executable file
·2300 lines (1736 loc) · 79.7 KB
/
Overview.html
File metadata and controls
executable file
·2300 lines (1736 loc) · 79.7 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
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang=en>
<head profile="http://dublincore.org/documents/2008/08/04/dc-html/ ">
<meta content="text/html;charset=utf-8" http-equiv=Content-Type>
<title>CSS Device Adaptation</title>
<link href="http://purl.org/dc/terms/" rel=schema.dcterms>
<link href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright"
rel=dcterms.rights>
<meta content="CSS Device Adaptation" name=dcterms.title>
<meta content=text name=dcterms.type>
<meta content=2012-11-01 name=dcterms.issued>
<meta content="Rune Lillesveen" name=dcterms.creator>
<meta content="Øyvind Stenhaug" name=dcterms.creator>
<meta content="Florian Rivoal" name=dcterms.creator>
<meta content="Ryan Betts" name=dcterms.creator>
<meta content=W3C name=dcterms.publisher>
<meta content="http://www.w3.org/TR/2012/ED-css-device-adapt-20121101/"
name=dcterms.identifier>
<link href=default.css rel=stylesheet type="text/css">
<link href="../default.css" rel=stylesheet type="text/css">
<link href="http://www.w3.org/StyleSheets/TR/W3C-ED" rel=stylesheet
type="text/css">
<body class=draft>
<div class=head> <!--begin-logo-->
<p><a href="http://www.w3.org/"><img alt=W3C height=48
src="http://www.w3.org/Icons/w3c_home" width=72></a> <!--end-logo-->
<h1>CSS Device Adaptation</h1>
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 1 November
2012</h2>
<dl>
<dt>This version:
<dd>$Date$ (editor's draft)
<!--<dd><a href="http://www.w3.org/TR/2012/ED-css-device-adapt-20121101/">http://www.w3.org/TR/2012/WD-css-device-adapt-20121101/</a></dd>-->
<dt>Latest version:
<dd><a
href="http://www.w3.org/TR/css-device-adapt/">http://www.w3.org/TR/css-device-adapt/</a>
<dt>Latest editor's draft:
<dd><a
href="http://dev.w3.org/csswg/css3-device-adapt/">http://dev.w3.org/csswg/css-device-adapt/</a>
<dt>Previous version:
<dd><a href="http://www.w3.org/TR/2011/WD-css-device-adapt-20110915/">
http://www.w3.org/TR/2011/WD-css-device-adapt-20110915/</a>
<dt>Issues List:
<dd><a
href="http://www.w3.org/Style/CSS/Tracker/products/38">http://www.w3.org/Style/CSS/Tracker/products/38</a>
<dt>Discussion:
<dd><a
href="http://lists.w3.org/Archives/Public/www-style/">www-style@w3.org</a>
with subject line “<kbd>[css-device-adapt] <var>… message topic
…</var></kbd>”
<dt>Editor:
<dd><a href="mailto:rune@opera.com">Rune Lillesveen</a> (<a
href="http://www.opera.com/">Opera Software</a>)
<dd><a href="mailto:oyvinds@opera.com">Øyvind Stenhaug</a> (<a
href="http://www.opera.com/">Opera Software</a>)
<dd><a href="mailto:florianr@opera.com">Florian Rivoal</a> (<a
href="http://www.opera.com/">Opera Software</a>)
<dd><a href="mailto:rbetts@adobe.com">Ryan Betts</a> (<a
href="http://www.adobe.com/">Adobe Systems</a>)
</dl>
<!--begin-copyright-->
<p class=copyright><a
href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright"
rel=license>Copyright</a> © 2012 <a href="http://www.w3.org/"><abbr
title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a
href="http://www.csail.mit.edu/"><abbr
title="Massachusetts Institute of Technology">MIT</abbr></a>, <a
href="http://www.ercim.eu/"><abbr
title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>,
<a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a
href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
<a
href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>
and <a
href="http://www.w3.org/Consortium/Legal/copyright-documents">document
use</a> rules apply.</p>
<!--end-copyright-->
<hr title="Separator for header">
</div>
<h2 class="no-num no-toc" id=abstract>Abstract</h2>
<p>This specification provides a way for an author to specify, in CSS, the
size, zoom factor, and orientation of the viewport that is used as the
base for the initial containing block.
<h2 class="no-num no-toc" id=status-of-this-document>Status of this
document</h2>
<!--begin-status-->
<p>This is a public copy of the editors' draft. It is provided for
discussion only and may change at any moment. Its publication here does
not imply endorsement of its contents by W3C. Don't cite this document
other than as work in progress.
<p>The (<a
href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) public
mailing list <a
href="mailto:www-style@w3.org?Subject=%5Bcss-device-adapt%5D%20PUT%20SUBJECT%20HERE">
www-style@w3.org</a> (see <a
href="http://www.w3.org/Mail/Request">instructions</a>) is preferred for
discussion of this specification. When sending e-mail, please put the text
“css-device-adapt” in the subject, preferably like this:
“[<!---->css-device-adapt<!---->] <em>…summary of comment…</em>”
<p>This document was produced by the <a href="/Style/CSS/members">CSS
Working Group</a> (part of the <a href="/Style/">Style Activity</a>).
<p>This document was produced by a group operating under the <a
href="/Consortium/Patent-Policy-20040205/">5 February 2004 W3C Patent
Policy</a>. W3C maintains a <a href="/2004/01/pp-impl/32061/status"
rel=disclosure>public list of any patent disclosures</a> made in
connection with the deliverables of the group; that page also includes
instructions for disclosing a patent. An individual who has actual
knowledge of a patent which the individual believes contains <a
href="/Consortium/Patent-Policy-20040205/#def-essential">Essential
Claim(s)</a> must disclose the information in accordance with <a
href="/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the
W3C Patent Policy</a>.</p>
<!--end-status-->
<h2 class="no-num no-toc" id=table-of-contents>Table of Contents</h2>
<!--begin-toc-->
<ul class=toc>
<li><a href="#introduction"><span class=secno>1. </span>Introduction</a>
<li><a href="#values"><span class=secno>2. </span>Values</a>
<li><a href="#the-viewport"><span class=secno>3. </span>The viewport</a>
<li><a href="#the-atviewport-rule"><span class=secno>4. </span>The <code
class=css>@viewport</code> rule</a>
<ul class=toc>
<li><a href="#syntax"><span class=secno>4.1. </span>Syntax</a>
</ul>
<li><a href="#viewport-descriptors"><span class=secno>5. </span>Viewport
descriptors</a>
<ul class=toc>
<li><a href="#the-lsquomin-widthrsquo-and-lsquomax-wid"><span
class=secno>5.1. </span>The ‘<code
class=descriptor>min-width</code>’ and ‘<code
class=descriptor>max-width</code>’ descriptors</a>
<li><a href="#the-lsquowidthrsquo-shorthand-descriptor"><span
class=secno>5.2. </span>The ‘<code class=descriptor>width</code>’
shorthand descriptor</a>
<li><a href="#the-lsquomin-heightrsquo-and-lsquomax-he"><span
class=secno>5.3. </span>The ‘<code
class=descriptor>min-height</code>’ and ‘<code
class=descriptor>max-height</code>’ descriptor</a>
<li><a href="#the-lsquoheightrsquo-shorthand-descripto"><span
class=secno>5.4. </span>The ‘<code class=descriptor>height</code>’
shorthand descriptor</a>
<li><a href="#the-lsquozoomrsquo-descriptor"><span class=secno>5.5.
</span>The ‘<code class=descriptor
title="zoom!!descriptor">zoom</code>’ descriptor</a>
<li><a href="#the-lsquomin-zoomrsquo-descriptor"><span class=secno>5.6.
</span>The ‘<code class=descriptor>min-zoom</code>’ descriptor</a>
<li><a href="#the-lsquomax-zoomrsquo-descriptor"><span class=secno>5.7.
</span>The ‘<code class=descriptor>max-zoom</code>’ descriptor</a>
<li><a href="#the-lsquouser-zoomrsquo-descriptor"><span class=secno>5.8.
</span>The ‘<code class=descriptor>user-zoom</code>’ descriptor</a>
<li><a href="#the-lsquoorientationrsquo-descriptor"><span
class=secno>5.9. </span>The ‘<code
class=descriptor>orientation</code>’ descriptor</a>
</ul>
<li><a href="#constraining-viewport-descriptor-values"><span
class=secno>6. </span>Constraining viewport descriptor values</a>
<ul class=toc>
<li><a href="#definitions"><span class=secno>6.1. </span>Definitions</a>
<li><a href="#constraining-procedure"><span class=secno>6.2. </span>The
procedure</a>
</ul>
<li><a href="#media-queries"><span class=secno>7. </span>Media Queries</a>
<li><a href="#cssom"><span class=secno>8. </span>CSSOM</a>
<li><a href="#dom-interfaces"><span class=secno>9. </span>DOM
Interfaces</a>
<li><a href="#conformance"><span class=secno>10. </span>Conformance</a>
<li><a href="#viewport-meta"><span class=secno>11. </span>Viewport <code
class=html>META</code> element</a>
<ul class=toc>
<li><a href="#meta-properties"><span class=secno>11.1.
</span>Properties</a>
<li><a href="#parsing-algorithm"><span class=secno>11.2. </span>Parsing
algorithm</a>
<li><a href="#translation-into-atviewport-descriptors"><span
class=secno>11.3. </span>Translation into <code
class=css>@viewport</code> descriptors</a>
</ul>
<li><a href="#handling-auto-zoom"><span class=secno>12. </span>Handling
‘<code class=css title="auto!!zoom">auto</code>’ for ‘<code
class=descriptor title="zoom!!descriptor">zoom</code>’</a>
<li><a href="#ua-stylesheets"><span class=secno>13. </span>UA stylesheets
</a>
<ul class=toc>
<li><a href="#desktop-ua-styles-"><span class=secno>13.1. </span>Desktop
UA styles </a>
<li><a href="#small-screen-ua-styles"><span class=secno>13.2.
</span>Small screen UA styles</a>
</ul>
<li class=no-num><a href="#acknowledgments">Acknowledgments</a>
<li class=no-num><a href="#references">References</a>
<ul class=toc>
<li class=no-num><a href="#normative-references">Normative
references</a>
<li class=no-num><a href="#other-references">Other references</a>
</ul>
<li class=no-num><a href="#descriptor-index">Descriptor index</a>
<li class=no-num><a href="#index">Index</a>
</ul>
<!--end-toc-->
<h2 id=introduction><span class=secno>1. </span>Introduction</h2>
<p><em>This section is not normative.</em>
<p>CSS 2.1 <a href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
specifies an <a
href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details">
initial containing block</a> for continuous media that has the dimensions
of the <a href="http://www.w3.org/TR/CSS21/visuren.html#viewport">
viewport</a>. Mobile/handheld device browsers have a viewport that is
generally a lot narrower than a desktop browser window at a zoom level
that gives a CSS pixel size <a
href="http://www.w3.org/TR/CSS21/syndata.html#length-units">recommended
</a> by CSS 2.1.
<p>The narrow viewport is a problem for documents designed to look good in
desktop browsers. The result is that mobile browser vendors use a fixed
initial containing block size that is different from the viewport size,
and close to that of a typical desktop browser window. In addition to
scrolling or panning, zooming is often used to change between an overview
of the document and zoom in on particular areas of the document to read
and interact with.
<p>Certain DOCTYPEs (for instance XHTML Mobile Profile) are used to
recognize mobile documents which are assumed to be designed for handheld
devices, hence using the viewport size as the initial containing block
size.
<p>Additionally, an HTML <code class=html>META</code> tag has been
introduced for allowing an author to specify the size of the initial
containing block, and the initial zoom factor directly. It was first
implemented by Apple for the Safari/iPhone browser, but has since been
implemented for the Opera, Android, and Fennec browsers. These
implementations are not fully interoperable and this specification is an
attempt at standardizing the functionality provided by the viewport <code
class=html>META</code> tag in CSS.
<h2 id=values><span class=secno>2. </span>Values</h2>
<p>This specification follows the <a
href="http://www.w3.org/TR/css3-syntax/#property-defs">CSS property
definition conventions</a> from <a href="#CSS3SYN"
rel=biblioentry>[CSS3SYN]<!--{{!CSS3SYN}}--></a>.
<p>Value types are defined in <a href="#CSS3VAL"
rel=biblioentry>[CSS3VAL]<!--{{!CSS3VAL}}--></a>.
<h2 id=the-viewport><span class=secno>3. </span>The viewport</h2>
<p>This specification introduces a way of overriding the size of the
viewport provided by the user agent (UA). Because of this, we need to
introduce the difference between the <a href="#initial-viewport">initial
viewport</a> and the <a href="#actual-viewport">actual viewport</a>.
<dl>
<dt><dfn id=initial-viewport>initial viewport</dfn>
<dd>This refers to the viewport before any UA or author styles have
overridden the viewport given by the window or viewing area of the UA.
Note that the initial viewport size will change with the size of the
window or viewing area.
<dt><dfn id=actual-viewport>actual viewport</dfn>
<dd>This is the viewport you get after the cascaded viewport descriptors,
and the following <a href="#constraining-procedure">constraining
procedure</a> have been applied.
</dl>
<p>When the <a href="#actual-viewport">actual viewport</a> cannot fit
inside the window or viewing area, either because the <a
href="#actual-viewport">actual viewport</a> is larger than the <a
href="#initial-viewport">initial viewport</a> or the zoom factor causes
only parts of the <a href="#actual-viewport">actual viewport</a> to be
visible, the UA should offer a scrolling or panning mechanism.
<p>It is recommended that initially the upper-left corners of the <a
href="#actual-viewport"> actual viewport</a> and the window or viewing
area are aligned if the base direction of the document is ltr. Similarly,
that the upper-right corners are aligned when the base direction is rtl.
The base direction for a document is defined as the computed value of the
<code class=property>direction</code> property for the first <code
class=html>BODY</code> element of an HTML or XHTML document. For other
document types, it is the computed <code class=property>direction</code>
for the root element.
<p class=issue>"dbaron: The question is, what does this do on the desktop
browser? (And what's a desktop browser)". Need to say that a "desktop"
browser typically have no UA styles, as opposed to the <a
href="#ua-stylesheet">UA stylesheet</a> outlined for current mobile
behaviour, and that no UA styles for @viewport will give "desktop"
behaviour per default (actual viewport is initial viewport).
<h2 id=the-atviewport-rule><span class=secno>4. </span>The <code
class=css>@viewport</code> rule</h2>
<p>The <code class=css>@viewport</code> <a
href="http://www.w3.org/TR/CSS21/syndata.html#at-rules">at-rule</a>
consists of the @-keyword followed by a block of descriptors describing
the viewport.
<p>The descriptors inside an <code class=css>@viewport</code> rule are per
document and there is no inheritance involved. Hence declarations using
the ‘<code class=css>inherit</code>’ keyword will be dropped. They
work similarly to <code class=css>@page</code> descriptors and follow the
cascading order of CSS. Hence, descriptors in <code
class=css>@viewport</code> rules will override descriptors from preceding
rules. The declarations allow !important which will affect cascading of
descriptors accordingly.
<p class=issue>Should the @viewport rule apply to top-level documents only?
If not, we need to say something about different zoom factors in frames.
<p class=issue>Bert: What's interactions of @viewport and @page
<div class=example>
<p>This example sets the viewport to fit the width of the device. Note
that it is enough to set the width as the height will be resolved from
the width.
<pre><!--
-->@viewport {
<!-- --> width: device-width;
<!-- -->}<!--
--></pre>
</div>
<h3 id=syntax><span class=secno>4.1. </span>Syntax</h3>
<p>The syntax for the <code class=css>@viewport</code> rule is as follows
(using the notation from the <a
href="http://www.w3.org/TR/CSS21/grammar.html">Grammar appendix</a> of CSS
2.1 <a href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>):
<pre><!--
-->viewport
<!----> : VIEWPORT_SYM S*
<!----> '{' S* declaration? [ ';' S* declaration? ]* '}' S*<!--
-->;</pre>
<p>with the new token:
<pre>@{V}{I}{E}{W}{P}{O}{R}{T} {return VIEWPORT_SYM;}</pre>
<p> where:
<pre>V v|\\0{0,4}(56|76)(\r\n|[ \t\r\n\f])?|\\v
<!-- -->W w|\\0{0,4}(57|77)(\r\n|[ \t\r\n\f])?|\\w</pre>
<p>The <code>viewport</code> non-terminal is added to the
<code>stylesheet</code> production along with the <code>ruleset</code>,
<code>media</code>, and <code>page</code> non-terminals:
<pre><!--
-->stylesheet
<!-- --> : [ CHARSET_SYM STRING ';' ]?
<!-- --> [S|CDO|CDC]* [ import [ CDO S* | CDC S* ]* ]*
<!-- --> [ [ ruleset | media | page | viewport ] [ CDO S* | CDC S* ]* ]*
<!-- --> ;<!--
--></pre>
<p>It is also added to media production to allow <code
class=css>@viewport</code> rules nested inside <code
class=css>@media</code> rules <span class=note>This is extending the CSS
2.1 syntax. A draft of CSS3 Paged Media also allows page inside
@media.</span>:
<pre><!--
-->media
<!-- --> : MEDIA_SYM S* media_list LBRACE S* [ ruleset | viewport ]* '}' S*
<!-- --> ;<!--
--></pre>
<h2 id=viewport-descriptors><span class=secno>5. </span>Viewport
descriptors</h2>
<p>This section presents the descriptors that are allowed inside an <code
class=css>@viewport</code> rule. Other descriptors than those listed here
will be dropped.
<p>Relative length values are resolved against initial values. For instance
‘<code class=property>em</code>’s are resolved against the initial
value of the <code class=property>font-size</code> property. Viewport
lengths (vw, vh, vmin, vmax) are relative to the initial viewport.
<h3 id=the-lsquomin-widthrsquo-and-lsquomax-wid><span class=secno>5.1.
</span>The ‘<a href="#min-width"><code
class=descriptor>min-width</code></a>’ and ‘<a href="#max-width"><code
class=descriptor>max-width</code></a>’ descriptors</h3>
<table class=descdef>
<tbody>
<tr>
<td><em>Name:</em>
<td><dfn id=min-width>min-width</dfn>
<tr>
<td><em>Value:</em>
<td><a href="#ltviewport-lengthgt"><viewport-length></a>
<tr>
<td><em>Initial:</em>
<td><a href="#auto" title="auto!!length">auto</a>
<tr>
<td><em>Percentages:</em>
<td>Refer to the width of the <a href="#initial-viewport">initial
viewport</a>
<tr>
<td><em>Media:</em>
<td>visual, continuous
<tr>
<td><em>Computed value:</em>
<td>‘<a href="#auto"><code class=css
title="auto!!length">auto</code></a>’, ‘<a
href="#device-width"><code class=css>device-width</code></a>’, ‘<a
href="#device-height"><code class=css>device-height</code></a>’, an
absolute length, or a percentage as specified
</table>
<table class=descdef>
<tbody>
<tr>
<td><em>Name:</em>
<td><dfn id=max-width>max-width</dfn>
<tr>
<td><em>Value:</em>
<td><a href="#ltviewport-lengthgt"><viewport-length></a>
<tr>
<td><em>Initial:</em>
<td><a href="#auto" title="auto!!length">auto</a>
<tr>
<td><em>Percentages:</em>
<td>Refer to the width of the <a href="#initial-viewport">initial
viewport</a>
<tr>
<td><em>Media:</em>
<td>visual, continuous
<tr>
<td><em>Computed value:</em>
<td>‘<a href="#auto"><code class=css
title="auto!!length">auto</code></a>’, ‘<a
href="#device-width"><code class=css>device-width</code></a>’, ‘<a
href="#device-height"><code class=css>device-height</code></a>’, an
absolute length, or a percentage as specified
</table>
<p>Specifies the minimum and maximum width of the <a
href="http://www.w3.org/TR/CSS21/visuren.html#viewport">viewport</a> that
is used to set the size of the <a
href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details">
initial containing block</a> where
<p style="margin: 1em"><var><dfn
id=ltviewport-lengthgt><viewport-length></dfn></var> = auto |
device-width | device-height | <var><length></var> |
<var><percentage></var>
<p>and the values have the following meanings:
<dl>
<dt>‘<code class=css><dfn id=auto
title="auto!!length">auto</dfn></code>’
<dd>The used value is calculated from the other descriptors' values
according to the <a href="#constraining-procedure">constraining
procedure</a>.
<dt>‘<code class=css><dfn id=device-width>device-width</dfn></code>’
<dd>The width of the screen in CSS pixels at zoom factor 1.0.
<dt>‘<code class=css><dfn id=device-height>device-height</dfn></code>’
<dd>The height of the screen in CSS pixels at zoom factor 1.0.
<dt><var><length></var>
<dd>
<p>A positive absolute or relative length.
<dt><var><percentage></var>
<dd>
<p>A percentage value relative to the width or height of the <a
href="#initial-viewport">initial viewport</a> at zoom factor 1.0, for
horizontal and vertical lengths respectively. Must be positive.
</dl>
<p>The min-width and max-width descriptors are inputs to the <a
href="#constraining-procedure">constraining procedure</a>. The width will
initially be set as close as possible to the <a
href="#initial-viewport">initial viewport</a> width within the min/max
constraints.
<h3 id=the-lsquowidthrsquo-shorthand-descriptor><span class=secno>5.2.
</span>The ‘<a href="#width"><code class=descriptor>width</code></a>’
shorthand descriptor</h3>
<table class=descdef>
<tbody>
<tr>
<td><em>Name:</em>
<td><dfn id=width>width</dfn>
<tr>
<td><em>Value:</em>
<td><a href="#ltviewport-lengthgt"><viewport-length></a>{1,2}
<tr>
<td><em>Initial:</em>
<td>See individual descriptors
<tr>
<td><em>Percentages:</em>
<td>See individual descriptors
<tr>
<td><em>Media:</em>
<td>visual, continuous
<tr>
<td><em>Computed value:</em>
<td>See individual descriptors
</table>
<p>This is a shorthand descriptor for setting both min-width and max-width.
One <a href="#ltviewport-lengthgt"><viewport-length></a> value will
set both min-width and max-width to that value. Two <a
href="#ltviewport-lengthgt"><viewport-length></a> values will set
min-width to the first and max-width to the second.
<h3 id=the-lsquomin-heightrsquo-and-lsquomax-he><span class=secno>5.3.
</span>The ‘<a href="#min-height"><code
class=descriptor>min-height</code></a>’ and ‘<a
href="#max-height"><code class=descriptor>max-height</code></a>’
descriptor</h3>
<table class=descdef>
<tbody>
<tr>
<td><em>Name:</em>
<td><dfn id=min-height>min-height</dfn>
<tr>
<td><em>Value:</em>
<td><a href="#ltviewport-lengthgt"><viewport-length></a>
<tr>
<td><em>Initial:</em>
<td><a href="#auto" title="auto!!length">auto</a>
<tr>
<td><em>Percentages:</em>
<td>Refer to the height of the <a href="#initial-viewport">initial
viewport</a>
<tr>
<td><em>Media:</em>
<td>visual, continuous
<tr>
<td><em>Computed value:</em>
<td>‘<a href="#auto"><code class=css
title="auto!!length">auto</code></a>’, ‘<a
href="#device-width"><code class=css>device-width</code></a>’, ‘<a
href="#device-height"><code class=css>device-height</code></a>’, an
absolute length, or a percentage as specified
</table>
<table class=descdef>
<tbody>
<tr>
<td><em>Name:</em>
<td><dfn id=max-height>max-height</dfn>
<tr>
<td><em>Value:</em>
<td><a href="#ltviewport-lengthgt"><viewport-length></a>
<tr>
<td><em>Initial:</em>
<td><a href="#auto" title="auto!!length">auto</a>
<tr>
<td><em>Percentages:</em>
<td>Refer to the height of the <a href="#initial-viewport">initial
viewport</a>
<tr>
<td><em>Media:</em>
<td>visual, continuous
<tr>
<td><em>Computed value:</em>
<td>‘<a href="#auto"><code class=css
title="auto!!length">auto</code></a>’, ‘<a
href="#device-width"><code class=css>device-width</code></a>’, ‘<a
href="#device-height"><code class=css>device-height</code></a>’, an
absolute length, or a percentage as specified
</table>
<p>Specifies the minimum and maximum height of the <a
href="http://www.w3.org/TR/CSS21/visuren.html#viewport">viewport</a> that
is used to set the size of the <a
href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details">
initial containing block</a>.
<p>The min-height and max-height descriptors are inputs to the <a
href="#constraining-procedure">constraining procedure</a>. The height will
initially be set as close as possible to the <a
href="#initial-viewport">initial viewport</a> height within the min/max
constraints.
<h3 id=the-lsquoheightrsquo-shorthand-descripto><span class=secno>5.4.
</span>The ‘<a href="#height"><code
class=descriptor>height</code></a>’ shorthand descriptor</h3>
<table class=descdef>
<tbody>
<tr>
<td><em>Name:</em>
<td><dfn id=height>height</dfn>
<tr>
<td><em>Value:</em>
<td><a href="#ltviewport-lengthgt"><viewport-length></a>{1,2}
<tr>
<td><em>Initial:</em>
<td>See individual descriptors
<tr>
<td><em>Percentages:</em>
<td>See individual descriptors
<tr>
<td><em>Media:</em>
<td>visual, continuous
<tr>
<td><em>Computed value:</em>
<td>See individual descriptors
</table>
<p>This is a shorthand descriptor for setting both min-height and
max-height. One <a href="#ltviewport-lengthgt"><viewport-length></a>
value will set both min-height and max-height to that value. Two <a
href="#ltviewport-lengthgt"><viewport-length></a> values will set
min-height to the first and max-height to the second.
<h3 id=the-lsquozoomrsquo-descriptor><span class=secno>5.5. </span>The
‘<code class=descriptor title="zoom!!descriptor">zoom</code>’
descriptor</h3>
<table class=descdef>
<tbody>
<tr>
<td><em>Name:</em>
<td><dfn id=zoom>zoom</dfn>
<tr>
<td><em>Value:</em>
<td>auto | <number> | <percentage>
<tr>
<td><em>Initial:</em>
<td><a href="#auto0" title="auto!!zoom">auto</a>
<tr>
<td><em>Percentages:</em>
<td>The zoom factor itself
<tr>
<td><em>Media:</em>
<td>visual, continuous
<tr>
<td><em>Computed value:</em>
<td>‘<a href="#auto0"><code class=css
title="auto!!zoom">auto</code></a>’, or a positive number or
percentage as specified.
</table>
<p>Specifies the initial zoom factor for the window or viewing area. This
is a magnifying glass type of zoom. Interactively changing the zoom factor
from the initial zoom factor does not affect the size of the initial or
the actual viewport.
<p>Values have the following meanings: <span class=issue>Should both
numbers and percentages be
allowed?<!-- http://lists.w3.org/Archives/Public/www-style/2010Oct/0321.html --></span>
<dl>
<dt>‘<code class=css><dfn id=auto0
title="auto!!zoom">auto</dfn></code>’
<dd>The zoom factor is UA-dependent. The UA may use the size of the area
of the canvas on which the document is rendered to find that initial zoom
factor. See <a href="#handling-auto-zoom">this section</a> for a proposed
way of handling ‘<a href="#auto0"><code class=css
title="auto!!zoom">auto</code></a>’ values for ‘<code
class=descriptor title="zoom!!descriptor">zoom</code>’.
<dt><var><number></var>
<dd>
<p>A positive number used as a zoom factor. A factor of 1.0 means that no
zooming is done. Values larger than 1.0 gives a zoomed-in effect and
values smaller than 1.0 a zoomed-out effect.
<dt><var><percentage></var>
<dd>
<p>A positive percentage value used as a zoom factor. A factor of 100%
means that no zooming is done. Values larger than 100% gives a zoomed-in
effect and values smaller than 100% a zoomed-out effect.
</dl>
<h3 id=the-lsquomin-zoomrsquo-descriptor><span class=secno>5.6. </span>The
‘<a href="#min-zoom"><code class=descriptor>min-zoom</code></a>’
descriptor</h3>
<table class=descdef>
<tbody>
<tr>
<td><em>Name:</em>
<td><dfn id=min-zoom>min-zoom</dfn>
<tr>
<td><em>Value:</em>
<td>auto | <number> | <percentage>
<tr>
<td><em>Initial:</em>
<td><a href="#auto1" title="auto!!min-zoom">auto</a>
<tr>
<td><em>Percentages:</em>
<td>The zoom factor itself
<tr>
<td><em>Media:</em>
<td>visual, continuous
<tr>
<td><em>Computed value:</em>
<td>‘<a href="#auto1"><code class=css
title="auto!!min-zoom">auto</code></a>’, or a positive number or
percentage as specified.
</table>
<p>Specifies the smallest allowed zoom factor. It is used as input to the
<a href="#constraining-procedure">constraining procedure</a> to constrain
non-‘<a href="#auto0"><code class=css
title="auto!!zoom">auto</code></a>’ ‘<code class=descriptor
title="zoom!!descriptor">zoom</code>’ values, but also to limit the
allowed zoom factor that can be set through user interaction. The UA
should also use this value as a constraint when choosing an actual zoom
factor when the used value of ‘<code class=descriptor
title="zoom!!descriptor">zoom</code>’ is ‘<a href="#auto0"><code
class=css title="auto!!zoom">auto</code></a>’.
<p>Values have the following meanings:
<dl>
<dt>‘<code class=css><dfn id=auto1
title="auto!!min-zoom">auto</dfn></code>’
<dd>The lower limit on zoom factor is UA dependant. There will be no
minimum value constraint on the ‘<code class=descriptor
title="zoom!!descriptor">zoom</code>’ descriptor used in the <a
href="#constraining-procedure">constraining procedure</a>
<dt><var><number></var>
<dd>
<p>A positive number limiting the minimum value of the zoom factor.
<dt><var><percentage></var>
<dd>
<p>A positive percentage limiting the minimum value of the zoom factor.
</dl>
<h3 id=the-lsquomax-zoomrsquo-descriptor><span class=secno>5.7. </span>The
‘<a href="#max-zoom"><code class=descriptor>max-zoom</code></a>’
descriptor</h3>
<table class=descdef>
<tbody>
<tr>
<td><em>Name:</em>
<td><dfn id=max-zoom>max-zoom</dfn>
<tr>
<td><em>Value:</em>
<td>auto | <number> | <percentage>
<tr>
<td><em>Initial:</em>
<td><a href="#auto2" title="auto!!max-zoom">auto</a>
<tr>
<td><em>Percentages:</em>
<td>The zoom factor itself
<tr>
<td><em>Media:</em>
<td>visual, continuous
<tr>
<td><em>Computed value:</em>
<td>‘<a href="#auto2"><code class=css
title="auto!!max-zoom">auto</code></a>’, or a positive number or
percentage as specified.
</table>
<p>Specifies the largest allowed zoom factor. It is used as input to the <a
href="#constraining-procedure">constraining procedure</a> to constrain
non-‘<a href="#auto0"><code class=css
title="auto!!zoom">auto</code></a>’ ‘<code class=descriptor
title="zoom!!descriptor">zoom</code>’ values, but also to limit the
allowed zoom factor that can be set through user interaction. The UA
should also use this value as a constraint when choosing an actual zoom
factor when the used value of ‘<code class=descriptor
title="zoom!!descriptor">zoom</code>’ is ‘<a href="#auto0"><code
class=css title="auto!!zoom">auto</code></a>’.
<p>Values have the following meanings:
<dl>
<dt>‘<code class=css><dfn id=auto2
title="auto!!max-zoom">auto</dfn></code>’
<dd>The upper limit on zoom factor is UA dependant. There will be no
maximum value constraint on the ‘<a href="#zoom"><code
class=descriptor>zoom</code></a>’ descriptor used in the <a
href="#constraining-procedure">constraining procedure</a>
<dt><var><number></var>
<dd>
<p>A positive number limiting the maximum value of the zoom factor.
<dt><var><percentage></var>
<dd>
<p>A positive percentage limiting the maximum value of the zoom factor.
</dl>
<h3 id=the-lsquouser-zoomrsquo-descriptor><span class=secno>5.8. </span>The
‘<a href="#user-zoom"><code class=descriptor>user-zoom</code></a>’
descriptor</h3>
<table class=descdef>
<tbody>
<tr>
<td><em>Name:</em>
<td><dfn id=user-zoom>user-zoom</dfn>
<tr>
<td><em>Value:</em>
<td>zoom | fixed
<tr>
<td><em>Initial:</em>
<td><a href="#zoom0" title="zoom!!value">zoom</a>
<tr>
<td><em>Percentages:</em>
<td>N/A
<tr>