Skip to content

Commit 03083ca

Browse files
author
Rune Lillesveen
committed
[css-device-adapt] Rephrased UA styles section.
Incorporated Kenneth Christiansen's proposed text changes to get rid of most of the "desktop" terms.
1 parent d535310 commit 03083ca

File tree

2 files changed

+97
-71
lines changed

2 files changed

+97
-71
lines changed

css-device-adapt/Overview.html

Lines changed: 65 additions & 54 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-10-04 name=dcterms.date>
14+
<meta content=2013-10-11 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 4 October 2013</h2>
33+
<h2 class="no-num no-toc">Editor's Draft 11 October 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-20131004/</a></dd>-->
39+
<!--<dd><a href="http://dev.w3.org/csswg/css-device-adapt/">http://www.w3.org/TR/2013/WD-css-device-adapt-20131011/</a></dd>-->
4040

4141
<dt>Latest version:
4242

@@ -105,14 +105,13 @@ <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 4 October 2013</h2>
105105
<hr title="Separator for header">
106106
</div>
107107

108-
<h2 class="no-num no-toc" id=abstract>Abstract</h2>
108+
<h2 class="no-num no-toc">Abstract</h2>
109109

110110
<p>This specification provides a way for an author to specify, in CSS, the
111111
size, zoom factor, and orientation of the viewport that is used as the
112112
base for the initial containing block.
113113

114-
<h2 class="no-num no-toc" id=status-of-this-document>Status of this
115-
document</h2>
114+
<h2 class="no-num no-toc">Status of this document</h2>
116115
<!--begin-status-->
117116

118117
<p>This is a public copy of the editors' draft. It is provided for
@@ -148,7 +147,7 @@ <h2 class="no-num no-toc" id=status-of-this-document>Status of this
148147
6 of the W3C Patent Policy</a>.</p>
149148
<!--end-status-->
150149

151-
<h2 class="no-num no-toc" id=table-of-contents>Table of Contents</h2>
150+
<h2 class="no-num no-toc">Table of Contents</h2>
152151
<!--begin-toc-->
153152

154153
<ul class=toc>
@@ -243,8 +242,8 @@ <h2 class="no-num no-toc" id=table-of-contents>Table of Contents</h2>
243242
<li><a href="#ua-stylesheet"><span class=secno>12. </span>UA stylesheets
244243
</a>
245244
<ul class=toc>
246-
<li><a href="#desktop-ua-styles-"><span class=secno>12.1. </span>Desktop
247-
UA styles </a>
245+
<li><a href="#large-screen-ua-styles-"><span class=secno>12.1.
246+
</span>Large screen UA styles </a>
248247

249248
<li><a href="#small-screen-ua-styles"><span class=secno>12.2.
250249
</span>Small screen UA styles</a>
@@ -320,8 +319,9 @@ <h2 id=the-viewport><span class=secno>3. </span>The viewport</h2>
320319
feature of a user agent for continuous media and used to establish the
321320
initial containing block for continuous media. For paged media, the
322321
initial containing block is based on the page area. The page area can be
323-
set through @page rules. Hence, @viewport applies to continuous media, and
324-
@page to paged media, and they will not interact or conflict.
322+
set through @page rules. Hence, <code class=css>@viewport</code> applies
323+
to continuous media, and @page to paged media, and they will not interact
324+
or conflict.
325325

326326
<p>This specification introduces a way of overriding the size of the
327327
viewport provided by the user agent (UA). Because of this, we need to
@@ -364,8 +364,9 @@ <h2 id=the-viewport><span class=secno>3. </span>The viewport</h2>
364364
browser? (And what's a desktop browser)". Need to say that a "desktop"
365365
browser typically have no UA styles, as opposed to the <a
366366
href="#ua-stylesheet">UA stylesheet</a> outlined for current mobile
367-
behaviour, and that no UA styles for @viewport will give "desktop"
368-
behaviour per default (actual viewport is initial viewport).
367+
behaviour, and that no UA styles for <code class=css>@viewport</code> will
368+
give "desktop" behaviour per default (actual viewport is initial
369+
viewport).
369370

370371
<h2 id=the-atviewport-rule><span class=secno>4. </span>The <code
371372
class=css>@viewport</code> rule</h2>
@@ -1139,8 +1140,8 @@ <h3 id=constraining-procedure><span class=secno>6.2. </span>The procedure</h3>
11391140
changes in the user environment would cause them to re-evaluate Media
11401141
Queries.
11411142

1142-
<h4 class="no-num no-toc" id=resolve-min-zoom-and-max-zoom-values>Resolve
1143-
<code title="min-zoom!!resolved">min-zoom</code> and <code
1143+
<h4 class="no-num no-toc">Resolve <code
1144+
title="min-zoom!!resolved">min-zoom</code> and <code
11441145
title="max-zoom!!resolved">max-zoom</code> values</h4>
11451146

11461147
<ol>
@@ -1151,8 +1152,7 @@ <h4 class="no-num no-toc" id=resolve-min-zoom-and-max-zoom-values>Resolve
11511152
set <code>max-zoom = MAX(min-zoom, max-zoom)</code>
11521153
</ol>
11531154

1154-
<h4 class="no-num no-toc"
1155-
id=constrain-zoom-value-to-the-min-zoom-max>Constrain <code
1155+
<h4 class="no-num no-toc">Constrain <code
11561156
title="zoom!!resolved">zoom</code> value to the <code>[min-zoom,
11571157
max-zoom]</code> range</h4>
11581158

@@ -1175,8 +1175,7 @@ <h4 class="no-num no-toc" id=resolve-px>Resolve non-‘<a
11751175
descriptors.
11761176
</ol>
11771177

1178-
<h4 class="no-num no-toc"
1179-
id=resolve-initial-width-and-height-from-mi>Resolve initial <code
1178+
<h4 class="no-num no-toc">Resolve initial <code
11801179
title="width!!resolved">width</code> and <code
11811180
title="height!!resolved">height</code> from min/max descriptors</h4>
11821181

@@ -1192,7 +1191,7 @@ <h4 class="no-num no-toc" id=resolve-px>Resolve non-‘<a
11921191
<code>height = MAX(min-height, MIN(max-height, initial-height))</code>
11931192
</ol>
11941193

1195-
<h4 class="no-num no-toc" id=resolve-width-value>Resolve <code
1194+
<h4 class="no-num no-toc">Resolve <code
11961195
title="width!!resolved">width</code> value</h4>
11971196

11981197
<ol id=ol6>
@@ -1207,7 +1206,7 @@ <h4 class="no-num no-toc" id=resolve-width-value>Resolve <code
12071206
title="height!!initial">initial-height</code> is 0.
12081207
</ol>
12091208

1210-
<h4 class="no-num no-toc" id=resolve-height-value>Resolve <code
1209+
<h4 class="no-num no-toc">Resolve <code
12111210
title="height!!resolved">height</code> value</h4>
12121211

12131212
<ol id=ol8>
@@ -1695,8 +1694,8 @@ <h3 id=lsquoextend-to-zoomrsquo><span class=secno>10.3. </span>‘<code
16951694
the initial width is 320px, <code class=html>&lt;meta name="viewport"
16961695
content="width=10"&gt;</code> will resolve to 64px.
16971696

1698-
<h4 class="no-num no-toc" id=resolving-lsquoextend-to-zoomrsquo>Resolving
1699-
<code class=css title=extend-to-zoom>extend-to-zoom</code></h4>
1697+
<h4 class="no-num no-toc">Resolving<code class=css
1698+
title=extend-to-zoom>extend-to-zoom</code></h4>
17001699

17011700
<p>The ‘<code class=css title=extend-to-zoom>extend-to-zoom</code>
17021701
value is resolved to pixel or auto lengths as part of <a
@@ -1772,14 +1771,13 @@ <h3 id=translation-into-atviewport-descriptors><span class=secno>10.4.
17721771
<p>Each of the property/value pair from the parsing in the previous section
17731772
are translated, and added to that single at-rule as follows:
17741773

1775-
<h4 class="no-num no-toc" id=unknown-properties>Unknown properties</h4>
1774+
<h4 class="no-num no-toc">Unknown properties</h4>
17761775

17771776
<p>Unknown properties are dropped.
17781777

1779-
<h4 class="no-num no-toc" id=the-width-and-height-properties>The <code
1780-
class=index id=width2 title="width!!viewport META">width</code> and <code
1781-
class=index id=height2 title="height!!viewport META">height</code>
1782-
properties</h4>
1778+
<h4 class="no-num no-toc">The <code class=index id=width2
1779+
title="width!!viewport META">width</code> and <code class=index id=height2
1780+
title="height!!viewport META">height</code> properties</h4>
17831781

17841782
<p>The <code class=index id=width3
17851783
title="width!!viewport META">width</code> and <code class=index id=height3
@@ -1883,9 +1881,9 @@ <h4 class="no-num no-toc" id=the-width-and-height-properties>The <code
18831881
--></pre>
18841882
</div>
18851883

1886-
<h4 class="no-num no-toc" id=the-initial-scale-minimum-scale-and-maxi>The
1887-
<code class=index id=initial-scale0>initial-scale</code>, <code
1888-
class=index id=minimum-scale0>minimum-scale</code>, and <code class=index
1884+
<h4 class="no-num no-toc">The <code class=index
1885+
id=initial-scale0>initial-scale</code>, <code class=index
1886+
id=minimum-scale0>minimum-scale</code>, and <code class=index
18891887
id=maximum-scale0>maximum-scale</code> properties</h4>
18901888

18911889
<p>The properties are translated into ‘<code class=descriptor
@@ -1923,8 +1921,8 @@ <h4 class="no-num no-toc" id=the-initial-scale-minimum-scale-and-maxi>The
19231921
the UA stylesheet ‘<a href="#max-zoom"><code
19241922
class=descriptor>max-zoom</code></a>’ value.
19251923

1926-
<h4 class="no-num no-toc" id=the-user-scalable-property>The <code
1927-
class=index id=user-scalable0>user-scalable</code> property</h4>
1924+
<h4 class="no-num no-toc">The <code class=index
1925+
id=user-scalable0>user-scalable</code> property</h4>
19281926

19291927
<p>The <code class=index id=user-scalable1>user-scalable</code> property is
19301928
translated into ‘<a href="#user-zoom"><code
@@ -1998,27 +1996,40 @@ <h2 id=ua-stylesheet><span class=secno>12. </span>UA stylesheets</h2>
19981996

19991997
<p><em>This section is informative</em>
20001998

2001-
<p>With the term desktop browser below, we mean a browser which has a size
2002-
of the initial viewport, in CSS pixels, that is at least as large as the
2003-
smallest viewport or viewing area you would expect a user of a desktop
2004-
computer to have. In that sense, it could include tablet PC and TV
2005-
browsers.
1999+
<p>Traditional user agents, used mostly on desktop and laptop computers,
2000+
can easily be resized to fit most websites inside the initial viewport
2001+
without breaking the layout. Using the recommendations below, sites not
2002+
adding any <code class=css>@viewport</code> rules themselves will continue
2003+
to look and function like they always have.
20062004

2007-
<h3 id=desktop-ua-styles-><span class=secno>12.1. </span>Desktop UA styles</h3>
2005+
<h3 id=large-screen-ua-styles-><span class=secno>12.1. </span>Large screen
2006+
UA styles</h3>
20082007

2009-
<p>For a desktop browser, the recommendation is to have no UA styles. That
2010-
means that it will have all descriptors initially set to ‘<code
2008+
<p>For browsers with an initial viewport size large enough to fit common
2009+
websites without breaking the layout, or which can easily to resized to do
2010+
so, the recommendation is to have <em>no</em> UA styles. That means that
2011+
it will have all descriptors initially set to ‘<code
20112012
class=css>auto</code>’, and behave as it would have without support for
2012-
viewport descriptors if there are no viewport descriptors in the user or
2013-
author styles.
2013+
viewport descriptors.
2014+
2015+
<p>For browsers which support changing orientation, and the portrait mode
2016+
breaks this the above, it is recommended to set a minimum layout width,
2017+
equal to that of the width in landscape mode.
2018+
2019+
<div class=example>
2020+
<pre><!--
2021+
-->@viewport {
2022+
<!-- --> min-width: 1024px;
2023+
<!-- -->}<!--
2024+
--></pre>
2025+
</div>
20142026

20152027
<h3 id=small-screen-ua-styles><span class=secno>12.2. </span>Small screen
20162028
UA styles</h3>
20172029

2018-
<p>For smaller screen UAs like smartphone browsers, the UA could typically
2019-
set the minimum viewport width to something that is at least as large as
2020-
the narrowest width an author would expect a desktop user would use to
2021-
view documents.
2030+
<p>For smaller screen UAs, the UA could set the minimum viewport width to
2031+
typically used as an initial viewport width of a traditional user agent
2032+
(as described above).
20222033

20232034
<div class=example>
20242035
<pre><!--
@@ -2050,20 +2061,20 @@ <h3 class=no-num id=normative-references>Normative references</h3>
20502061
<dt id=CSS21>[CSS21]
20512062

20522063
<dd>Bert Bos; et al. <a
2053-
href="http://www.w3.org/TR/2011/REC-CSS2-20110607/"><cite>Cascading Style
2064+
href="http://www.w3.org/TR/2011/REC-CSS2-20110607"><cite>Cascading Style
20542065
Sheets Level 2 Revision 1 (CSS 2.1) Specification.</cite></a> 7 June
20552066
2011. W3C Recommendation. URL: <a
2056-
href="http://www.w3.org/TR/2011/REC-CSS2-20110607/">http://www.w3.org/TR/2011/REC-CSS2-20110607/</a>
2067+
href="http://www.w3.org/TR/2011/REC-CSS2-20110607">http://www.w3.org/TR/2011/REC-CSS2-20110607</a>
20572068
</dd>
20582069
<!---->
20592070

20602071
<dt id=CSS3SYN>[CSS3SYN]
20612072

2062-
<dd>L. David Baron. <a
2063-
href="http://www.w3.org/TR/2003/WD-css3-syntax-20030813"><cite>CSS3
2064-
module: Syntax.</cite></a> 13 August 2003. W3C Working Draft. (Work in
2065-
progress.) URL: <a
2066-
href="http://www.w3.org/TR/2003/WD-css3-syntax-20030813">http://www.w3.org/TR/2003/WD-css3-syntax-20030813</a>
2073+
<dd>Tab Atkins Jr.; Simon Sapin. <a
2074+
href="http://www.w3.org/TR/2013/WD-css-syntax-3-20130919/"><cite>CSS
2075+
Syntax Module Level 3.</cite></a> 19 September 2013. W3C Working Draft.
2076+
(Work in progress.) URL: <a
2077+
href="http://www.w3.org/TR/2013/WD-css-syntax-3-20130919/">http://www.w3.org/TR/2013/WD-css-syntax-3-20130919/</a>
20672078
</dd>
20682079
<!---->
20692080

css-device-adapt/Overview.src.html

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,9 @@ <h2>The viewport</h2>
116116
is a feature of a user agent for continuous media and used to establish
117117
the initial containing block for continuous media. For paged media, the
118118
initial containing block is based on the page area. The page area can be
119-
set through @page rules. Hence, @viewport applies to continuous media,
120-
and @page to paged media, and they will not interact or conflict.</p>
119+
set through @page rules. Hence, <code class="css">@viewport</code> applies
120+
to continuous media, and @page to paged media, and they will not interact
121+
or conflict.</p>
121122

122123
<p>This specification introduces a way of overriding the size of the viewport
123124
provided by the user agent (UA). Because of this, we need to introduce the
@@ -156,8 +157,9 @@ <h2>The viewport</h2>
156157
browser? (And what's a desktop browser)". Need to say that a "desktop"
157158
browser typically have no UA styles, as opposed to the
158159
<a href="#ua-stylesheet">UA stylesheet</a> outlined for current mobile
159-
behaviour, and that no UA styles for @viewport will give "desktop"
160-
behaviour per default (actual viewport is initial viewport).</p>
160+
behaviour, and that no UA styles for <code class="css">@viewport</code>
161+
will give "desktop" behaviour per default (actual viewport is initial
162+
viewport).</p>
161163

162164

163165
<h2>The <code class="css">@viewport</code> rule</h2>
@@ -1610,25 +1612,38 @@ <h2 id="ua-stylesheet">UA stylesheets</h3>
16101612

16111613
<p><em>This section is informative</em></p>
16121614

1613-
<p>With the term desktop browser below, we mean a browser which has a size of
1614-
the initial viewport, in CSS pixels, that is at least as large as the
1615-
smallest viewport or viewing area you would expect a user of a desktop
1616-
computer to have. In that sense, it could include tablet PC and TV browsers.</p>
1615+
<p>Traditional user agents, used mostly on desktop and laptop computers, can
1616+
easily be resized to fit most websites inside the initial viewport without
1617+
breaking the layout. Using the recommendations below, sites not adding any
1618+
<code class="css">@viewport</code> rules themselves will continue to look
1619+
and function like they always have.</p>
16171620

1618-
<h3>Desktop UA styles</h2>
1621+
<h3>Large screen UA styles</h2>
16191622

1620-
<p>For a desktop browser, the recommendation is to have no UA styles. That
1621-
means that it will have all descriptors initially set to
1623+
<p>For browsers with an initial viewport size large enough to fit common
1624+
websites without breaking the layout, or which can easily to resized to do
1625+
so, the recommendation is to have <em>no</em> UA styles. That means that
1626+
it will have all descriptors initially set to
16221627
&lsquo;<code class="css">auto</code>&rsquo;, and behave as it would have
1623-
without support for viewport descriptors if there are no viewport descriptors
1624-
in the user or author styles.</p>
1628+
without support for viewport descriptors.</p>
1629+
1630+
<p>For browsers which support changing orientation, and the portrait mode
1631+
breaks this the above, it is recommended to set a minimum layout width,
1632+
equal to that of the width in landscape mode.</p>
1633+
1634+
<div class="example">
1635+
<pre><!--
1636+
-->@viewport {
1637+
<!-- --> min-width: 1024px;
1638+
<!-- -->}<!--
1639+
--></pre>
1640+
</div>
16251641

16261642
<h3>Small screen UA styles</h3>
16271643

1628-
<p>For smaller screen UAs like smartphone browsers, the UA could typically
1629-
set the minimum viewport width to something that is at least as large as
1630-
the narrowest width an author would expect a desktop user would use to
1631-
view documents.</p>
1644+
<p>For smaller screen UAs, the UA could set the minimum viewport width to
1645+
typically used as an initial viewport width of a traditional user agent
1646+
(as described above).</p>
16321647

16331648
<div class="example">
16341649
<pre><!--

0 commit comments

Comments
 (0)