Skip to content

Commit 32b2994

Browse files
author
Rune Lillesveen
committed
[css-device-adapt] Allow 0 for <viewport-length> and zoom values.
--HG-- extra : rebase_source : fc16ca0f8924034d17ac35b9bde86a5241f327da
1 parent 36d7f0f commit 32b2994

File tree

2 files changed

+45
-35
lines changed

2 files changed

+45
-35
lines changed

css-device-adapt/Overview.html

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
rel=dcterms.rights>
1212
<meta content="CSS Device Adaptation" name=dcterms.title>
1313
<meta content=text name=dcterms.type>
14-
<meta content=2013-05-02 name=dcterms.date>
14+
<meta content=2013-05-07 name=dcterms.date>
1515
<meta content="Rune Lillesveen" name=dcterms.creator>
1616
<meta content="Øyvind Stenhaug" name=dcterms.creator>
1717
<meta content="Florian Rivoal" name=dcterms.creator>
@@ -30,13 +30,13 @@
3030

3131
<h1>CSS Device Adaptation</h1>
3232

33-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 2 May 2013</h2>
33+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 7 May 2013</h2>
3434

3535
<dl>
3636
<dt>This version:
3737

3838
<dd>$Date$ (editor's draft)
39-
<!--<dd><a href="http://dev.w3.org/csswg/css-device-adapt/">http://www.w3.org/TR/2013/WD-css-device-adapt-20130502/</a></dd>-->
39+
<!--<dd><a href="http://dev.w3.org/csswg/css-device-adapt/">http://www.w3.org/TR/2013/WD-css-device-adapt-20130507/</a></dd>-->
4040

4141
<dt>Latest version:
4242

@@ -575,14 +575,14 @@ <h3 id=the-lsquomin-widthrsquo-and-lsquomax-wid><span class=secno>5.1.
575575
<dt><var>&lt;length&gt;</var>
576576

577577
<dd>
578-
<p>A positive absolute or relative length.
578+
<p>A non-negative absolute or relative length.
579579

580580
<dt><var>&lt;percentage&gt;</var>
581581

582582
<dd>
583583
<p>A percentage value relative to the width or height of the <a
584584
href="#initial-viewport">initial viewport</a> at zoom factor 1.0, for
585-
horizontal and vertical lengths respectively. Must be positive.
585+
horizontal and vertical lengths respectively. Must be non-negative.
586586
</dl>
587587

588588
<p>The min-width and max-width descriptors are inputs to the <a
@@ -806,7 +806,7 @@ <h3 id=the-lsquozoomrsquo-descriptor><span class=secno>5.5. </span>The
806806
<td><em>Computed value:</em>
807807

808808
<td><a href="#auto0"><code class=css
809-
title="auto!!zoom">auto</code></a>’, or a positive number or
809+
title="auto!!zoom">auto</code></a>’, or a non-negative number or
810810
percentage as specified.
811811
</table>
812812

@@ -831,16 +831,16 @@ <h3 id=the-lsquozoomrsquo-descriptor><span class=secno>5.5. </span>The
831831
<dt><var>&lt;number&gt;</var>
832832

833833
<dd>
834-
<p>A positive number used as a zoom factor. A factor of 1.0 means that no
835-
zooming is done. Values larger than 1.0 gives a zoomed-in effect and
836-
values smaller than 1.0 a zoomed-out effect.
834+
<p>A non-negative number used as a zoom factor. A factor of 1.0 means
835+
that no zooming is done. Values larger than 1.0 gives a zoomed-in effect
836+
and values smaller than 1.0 a zoomed-out effect.
837837

838838
<dt><var>&lt;percentage&gt;</var>
839839

840840
<dd>
841-
<p>A positive percentage value used as a zoom factor. A factor of 100%
842-
means that no zooming is done. Values larger than 100% gives a zoomed-in
843-
effect and values smaller than 100% a zoomed-out effect.
841+
<p>A non-negative percentage value used as a zoom factor. A factor of
842+
100% means that no zooming is done. Values larger than 100% gives a
843+
zoomed-in effect and values smaller than 100% a zoomed-out effect.
844844
</dl>
845845

846846
<h3 id=the-lsquomin-zoomrsquo-descriptor><span class=secno>5.6. </span>The
@@ -878,7 +878,7 @@ <h3 id=the-lsquomin-zoomrsquo-descriptor><span class=secno>5.6. </span>The
878878
<td><em>Computed value:</em>
879879

880880
<td><a href="#auto1"><code class=css
881-
title="auto!!min-zoom">auto</code></a>’, or a positive number or
881+
title="auto!!min-zoom">auto</code></a>’, or a non-negative number or
882882
percentage as specified.
883883
</table>
884884

@@ -907,12 +907,13 @@ <h3 id=the-lsquomin-zoomrsquo-descriptor><span class=secno>5.6. </span>The
907907
<dt><var>&lt;number&gt;</var>
908908

909909
<dd>
910-
<p>A positive number limiting the minimum value of the zoom factor.
910+
<p>A non-negative number limiting the minimum value of the zoom factor.
911911

912912
<dt><var>&lt;percentage&gt;</var>
913913

914914
<dd>
915-
<p>A positive percentage limiting the minimum value of the zoom factor.
915+
<p>A non-negative percentage limiting the minimum value of the zoom
916+
factor.
916917
</dl>
917918

918919
<h3 id=the-lsquomax-zoomrsquo-descriptor><span class=secno>5.7. </span>The
@@ -950,7 +951,7 @@ <h3 id=the-lsquomax-zoomrsquo-descriptor><span class=secno>5.7. </span>The
950951
<td><em>Computed value:</em>
951952

952953
<td><a href="#auto2"><code class=css
953-
title="auto!!max-zoom">auto</code></a>’, or a positive number or
954+
title="auto!!max-zoom">auto</code></a>’, or a non-negative number or
954955
percentage as specified.
955956
</table>
956957

@@ -979,12 +980,13 @@ <h3 id=the-lsquomax-zoomrsquo-descriptor><span class=secno>5.7. </span>The
979980
<dt><var>&lt;number&gt;</var>
980981

981982
<dd>
982-
<p>A positive number limiting the maximum value of the zoom factor.
983+
<p>A non-negative number limiting the maximum value of the zoom factor.
983984

984985
<dt><var>&lt;percentage&gt;</var>
985986

986987
<dd>
987-
<p>A positive percentage limiting the maximum value of the zoom factor.
988+
<p>A non-negative percentage limiting the maximum value of the zoom
989+
factor.
988990
</dl>
989991

990992
<h3 id=the-lsquouser-zoomrsquo-descriptor><span class=secno>5.8. </span>The
@@ -1225,7 +1227,9 @@ <h4 class="no-num no-toc" id=resolve-width-value>Resolve <code
12251227

12261228
<li>If <code title="width!!resolved">width</code> is ‘<code
12271229
class=css>auto</code>’, set <code>width = height * (initial-width /
1228-
initial-height)</code>
1230+
initial-height)</code>, or <code>width = initial-width</code> if <code
1231+
class=index id=initial-height0
1232+
title="height!!initial">initial-height</code> is 0.
12291233
</ol>
12301234

12311235
<h4 class="no-num no-toc" id=resolve-height-value>Resolve <code
@@ -1234,7 +1238,9 @@ <h4 class="no-num no-toc" id=resolve-height-value>Resolve <code
12341238
<ol id=ol8>
12351239
<li>If <code title="height!!resolved">height</code> is ‘<code
12361240
class=css>auto</code>’, set <code>height = width * (initial-height /
1237-
initial-width)</code>
1241+
initial-width)</code>, or <code>height = initial-height</code> if <code
1242+
class=index id=initial-width0 title="width!!initial">initial-width</code>
1243+
is 0.
12381244
</ol>
12391245

12401246
<h2 id=media-queries><span class=secno>7. </span>Media Queries</h2>
@@ -2263,7 +2269,8 @@ <h2 class=no-num id=index>Index</h2>
22632269
<li>height, <a href="#height"
22642270
title="section 5.4."><strong>5.4.</strong></a>
22652271
<ul>
2266-
<li>initial, <a href="#initial-height" title="section 6.1.">6.1.</a>
2272+
<li>initial, <a href="#initial-height" title="section 6.1.">6.1.</a>, <a
2273+
href="#initial-height0" title="section ??">??</a>
22672274

22682275
<li>resolved, <a href="#height0" title="section 6.1.">6.1.</a>
22692276

@@ -2336,7 +2343,8 @@ <h2 class=no-num id=index>Index</h2>
23362343
<li>width, <a href="#width" title="section 5.2."><strong>5.2.</strong></a>
23372344

23382345
<ul>
2339-
<li>initial, <a href="#initial-width" title="section 6.1.">6.1.</a>
2346+
<li>initial, <a href="#initial-width" title="section 6.1.">6.1.</a>, <a
2347+
href="#initial-width0" title="section ??">??</a>
23402348

23412349
<li>resolved, <a href="#width0" title="section 6.1.">6.1.</a>
23422350

css-device-adapt/Overview.src.html

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -354,14 +354,14 @@ <h3>The
354354

355355
<dt><var>&lt;length&gt;</var></dt>
356356
<dd>
357-
<p>A positive absolute or relative length.</p>
357+
<p>A non-negative absolute or relative length.</p>
358358
</dd>
359359

360360
<dt><var>&lt;percentage&gt;</var></dt>
361361
<dd>
362362
<p>A percentage value relative to the width or height of the
363363
<span>initial viewport</span> at zoom factor 1.0,
364-
for horizontal and vertical lengths respectively. Must be positive.
364+
for horizontal and vertical lengths respectively. Must be non-negative.
365365
</p>
366366
</dd>
367367
</dl>
@@ -577,7 +577,7 @@ <h3>The &lsquo;<code class="descriptor" title="zoom!!descriptor">zoom</code>&rsq
577577

578578
<tr>
579579
<td><em>Computed&nbsp;value:</em></td>
580-
<td>&lsquo;<code class="css" title="auto!!zoom">auto</code>&rsquo;, or a positive
580+
<td>&lsquo;<code class="css" title="auto!!zoom">auto</code>&rsquo;, or a non-negative
581581
number or percentage as specified.</td>
582582
</tr>
583583
</tbody>
@@ -601,14 +601,14 @@ <h3>The &lsquo;<code class="descriptor" title="zoom!!descriptor">zoom</code>&rsq
601601

602602
<dt><var>&lt;number&gt;</var></dt>
603603
<dd>
604-
<p>A positive number used as a zoom factor. A factor of 1.0 means
604+
<p>A non-negative number used as a zoom factor. A factor of 1.0 means
605605
that no zooming is done. Values larger than 1.0 gives a zoomed-in
606606
effect and values smaller than 1.0 a zoomed-out effect.</p>
607607
</dd>
608608

609609
<dt><var>&lt;percentage&gt;</var></dt>
610610
<dd>
611-
<p>A positive percentage value used as a zoom factor. A factor of
611+
<p>A non-negative percentage value used as a zoom factor. A factor of
612612
100% means that no zooming is done. Values larger than 100% gives a
613613
zoomed-in effect and values smaller than 100% a zoomed-out effect.</p>
614614
</dd>
@@ -646,7 +646,7 @@ <h3>The &lsquo;<code class="descriptor">min-zoom</code>&rsquo; descriptor</h3>
646646

647647
<tr>
648648
<td><em>Computed&nbsp;value:</em></td>
649-
<td>&lsquo;<code class="css" title="auto!!min-zoom">auto</code>&rsquo;, or a positive
649+
<td>&lsquo;<code class="css" title="auto!!min-zoom">auto</code>&rsquo;, or a non-negative
650650
number or percentage as specified.</td>
651651
</tr>
652652
</tbody>
@@ -673,12 +673,12 @@ <h3>The &lsquo;<code class="descriptor">min-zoom</code>&rsquo; descriptor</h3>
673673

674674
<dt><var>&lt;number&gt;</var></dt>
675675
<dd>
676-
<p>A positive number limiting the minimum value of the zoom factor.</p>
676+
<p>A non-negative number limiting the minimum value of the zoom factor.</p>
677677
</dd>
678678

679679
<dt><var>&lt;percentage&gt;</var></dt>
680680
<dd>
681-
<p>A positive percentage limiting the minimum value of the zoom factor.</p>
681+
<p>A non-negative percentage limiting the minimum value of the zoom factor.</p>
682682
</dd>
683683
</dl>
684684

@@ -714,7 +714,7 @@ <h3>The &lsquo;<code class="descriptor">max-zoom</code>&rsquo; descriptor</h3>
714714

715715
<tr>
716716
<td><em>Computed&nbsp;value:</em></td>
717-
<td>&lsquo;<code class="css" title="auto!!max-zoom">auto</code>&rsquo;, or a positive
717+
<td>&lsquo;<code class="css" title="auto!!max-zoom">auto</code>&rsquo;, or a non-negative
718718
number or percentage as specified.</td>
719719
</tr>
720720
</tbody>
@@ -741,12 +741,12 @@ <h3>The &lsquo;<code class="descriptor">max-zoom</code>&rsquo; descriptor</h3>
741741

742742
<dt><var>&lt;number&gt;</var></dt>
743743
<dd>
744-
<p>A positive number limiting the maximum value of the zoom factor.</p>
744+
<p>A non-negative number limiting the maximum value of the zoom factor.</p>
745745
</dd>
746746

747747
<dt><var>&lt;percentage&gt;</var></dt>
748748
<dd>
749-
<p>A positive percentage limiting the maximum value of the zoom factor.</p>
749+
<p>A non-negative percentage limiting the maximum value of the zoom factor.</p>
750750
</dd>
751751
</dl>
752752

@@ -975,7 +975,8 @@ <h4 class="no-num no-toc">Resolve <code title="width!!resolved">width</code>
975975

976976
<li>If <code title="width!!resolved">width</code> is
977977
&lsquo;<code class="css">auto</code>&rsquo;, set <code>width = height *
978-
(initial-width / initial-height)</code></li>
978+
(initial-width / initial-height)</code>, or <code>width = initial-width</code>
979+
if <code class="index" title="height!!initial">initial-height</code> is 0.</li>
979980
</ol>
980981

981982
<h4 class="no-num no-toc">Resolve <code title="height!!resolved">height</code>
@@ -984,7 +985,8 @@ <h4 class="no-num no-toc">Resolve <code title="height!!resolved">height</code>
984985
<ol id="ol8">
985986
<li>If <code title="height!!resolved">height</code> is
986987
&lsquo;<code class="css">auto</code>&rsquo;, set <code>height = width *
987-
(initial-height / initial-width)</code></li>
988+
(initial-height / initial-width)</code>, or <code>height = initial-height</code>
989+
if <code class="index" title="width!!initial">initial-width</code> is 0.</li>
988990
</ol>
989991

990992

0 commit comments

Comments
 (0)