Skip to content

Commit 9cafff6

Browse files
committed
[css-size-adjust] Convert to bikeshed.
1 parent 5db9001 commit 9cafff6

File tree

4 files changed

+685
-1246
lines changed

4 files changed

+685
-1246
lines changed

css-size-adjust/Makefile

Lines changed: 0 additions & 39 deletions
This file was deleted.

css-size-adjust/Overview.bs

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
<h1>CSS Mobile Text Size Adjustment Module Level 1</h1>
2+
<pre class="metadata">
3+
Status: ED
4+
Work Status: Revising
5+
Shortname: css-size-adjust
6+
Group: csswg
7+
Level: 1
8+
TR: https://www.w3.org/TR/css-size-adjust/
9+
ED: https://drafts.csswg.org/css-size-adjust/
10+
Editor: L. David Baron, Mozilla https://www.mozilla.org/, http://dbaron.org/
11+
Editor: Tantek &Ccedil;elik, Mozilla https://www.mozilla.org/, http://tantek.com/
12+
Abstract: CSS is a language for describing the rendering of structured documents (such as HTML and XML) on screen, on paper, in speech, etc. This module contains features of CSS relating to one possible mechanism for adapting pages designed for desktop computer displays for display on smaller screens such as those of mobile phones. This mechanism involves displaying a scaled down display of the Web page and allowing the user to pan and zoom within that display, but within that scaled down display making certain text and similar elements larger than specified by the page author in order to ensure that when a block of wrapped text is zoomed to the width of the device (so it can be read without side-to-side scrolling for each line), the text is large enough to be readable.
13+
Status Text: <p>The following features are at risk:</p> <ul> <li>the &lt;percentage&gt; value for 'text-size-adjust'</li> <li>the reference to [[!CSS3TEXT]]&apos;s 'text-wrap' property</li> </ul>
14+
</pre>
15+
16+
Introduction {#intro}
17+
=====================
18+
19+
A common mechanism for displaying Web pages that were designed for
20+
large desktop displays on much smaller displays such as those of
21+
mobile phones involves allowing the user to pan and zoom around within
22+
a view of the Web page drawn as though it were drawn into the width of
23+
a typical desktop Web browser display. The ability to pan and zoom
24+
the page lets the user both see an overview of the page and zoom in to
25+
specific parts to read or interact with them.
26+
27+
One common problem with this type of interaction occurs when the
28+
user wants to read a large block of text. It might be that a block of
29+
text within this desktop-formatted page might be laid out so that when
30+
the user zooms in so that the text is large enough to read, each line
31+
of text is wider than the display on the small device. This means the
32+
user needs to scroll side to side to read <em>each line of text</em>,
33+
which is a serious inconvenience to the user.
34+
35+
One way for software that displays Web pages or other CSS-formatted
36+
content on a mobile device is to make some of the text larger so that
37+
this problem does not occur. The goal of this enlargement is to make
38+
the text big enough so that when the block it is in is scaled to the
39+
width of the display, the text is large enough to read. At the same
40+
time, this needs to be done with minimal disruption to the overall
41+
design of the page.
42+
43+
While implementations of CSS are not required to use this
44+
technique, this module describes how implementations of CSS that do
45+
use this technique must do so.
46+
In other words, while implementations of CSS are not required to
47+
implement this module, this module nonetheless places requirements on
48+
implementations of this module.
49+
50+
This module describes how this size adjustment works and describes a
51+
new CSS property that authors of CSS can use to provide hints to the
52+
implementation about which text or other elements should or should not
53+
be enlarged.
54+
55+
Module interactions {#placement}
56+
--------------------------------
57+
58+
This module adds additional features that are not defined in
59+
[[CSS21]]. These features may lead to a different size being computed
60+
than would be computed when following [[CSS21]] alone.
61+
62+
Values {#values}
63+
----------------
64+
65+
This specification follows the
66+
<a href="https://www.w3.org/TR/CSS21/about.html#property-defs">CSS property
67+
definition conventions</a> from [[!CSS21]]. Value types not defined in
68+
this specification are defined in CSS Level 2 Revision 1 [[!CSS21]].
69+
Other CSS modules may expand the definitions of these value types: for
70+
example [[CSS3COLOR]], when combined with this module, expands the
71+
definition of the &lt;color&gt; value type as used in this specification.
72+
73+
In addition to the property-specific values listed in their definitions,
74+
all properties defined in this specification also accept the
75+
<a href="https://www.w3.org/TR/CSS21/cascade.html#value-def-inherit">inherit</a>
76+
keyword as their property value. For readability it has not been repeated
77+
explicitly.
78+
79+
Default size adjustment {#default-adjustment}
80+
=============================================
81+
82+
This section defines the default size adjustment rules. These rules
83+
are then referenced by the definition of the 'text-size-adjust' property
84+
in the following section.
85+
86+
Issue: All of the subsections of this section need significant
87+
refinement: additional detail, verification that the detail already
88+
present is correct, etc.
89+
90+
Issue: It's not clear how much this section should define
91+
precise behavior versus how much it should allow future room for
92+
innovation and improvement.
93+
94+
Types of boxes adjusted {#default-adjustment-types}
95+
---------------------------------------------------
96+
97+
The default size adjustment affects text and form controls, whether
98+
those form controls contain text (e.g., text inputs, selects) or do not
99+
(e.g., radio buttons, checkboxes).
100+
101+
Conditions that suppress adjustment {#default-adjustment-conditions}
102+
--------------------------------------------------------------------
103+
104+
A number of conditions suppress the default adjustment because these
105+
conditions are associated with layouts for which the user experience
106+
would be worsened by size adjustment rather than improved by it. These
107+
conditions are:
108+
109+
<ul>
110+
<li>when the total amount of text in the block formatting context (see
111+
[[!CSS21]]) (excluding text inside descendant block formatting
112+
contexts) is approximately smaller than the amount that would require
113+
wrapping to more than one or two lines within that context's
114+
width,</li>
115+
116+
<li>when the objects to be adjusted are inside a block-level or
117+
''display: inline-block'' element with a 'height' other than
118+
''height/auto'' (see [[!CSS21]]),</li>
119+
120+
<li>when the objects to be adjusted are inside a
121+
''display: inline-block'' element
122+
with a 'width' other than ''width/auto'' (see
123+
[[!CSS21]]),</li>
124+
125+
<li>when the objects to be adjusted have 'white-space' of ''white-space/pre'' or
126+
''white-space/nowrap'' (see [[!CSS21]]) or a 'text-wrap' of ''text-wrap/none'' (see
127+
[[!CSS3TEXT]]).</li>
128+
129+
</ul>
130+
131+
Calculation of default adjustment {#default-adjustment-calculation}
132+
-------------------------------------------------------------------
133+
134+
The adjustment performed should be based on preferences (of the
135+
renderer or the renderer's user) indicating the desired <dfn>minimum
136+
readable text size</dfn>.
137+
Given this preference, for each containing block of text to be adjusted,
138+
there is a <dfn>minimum block text size</dfn>: the preference for the
139+
minimum readable text size, times the width of the containing block,
140+
divided by the width of the device.
141+
142+
The size adjustment involves multiplication of sizes by a ratio
143+
determined by the minimum block text size and the computed value of
144+
'font-size'. This ratio must be at least the first divided by the
145+
second; however, in order to maintain differentiations between font
146+
sizes, it should often be slightly larger. <span class="issue">Define
147+
this with more detail/precision.</span>
148+
149+
150+
Size adjustment control: the 'text-size-adjust' property {#adjustment-control}
151+
==============================================================================
152+
153+
<pre class=propdef>
154+
Name: text-size-adjust
155+
Value: auto | none | &lt;percentage&gt;
156+
Initial: auto
157+
Applies to: all elements
158+
Inherited: yes
159+
Percentages: see below
160+
Media: visual
161+
Computed value: as specified
162+
Animatable: as percentage
163+
Canonical order: N/A
164+
</pre>
165+
166+
<dl dfn-for="text-size-adjust" dfn-type="value">
167+
<dt><dfn>auto</dfn></dt>
168+
<dd>Renderers must use the <a href="#default-adjustment">default size adjustment</a> when displaying on a small device.</dd>
169+
<dt><dfn>none</dfn></dt>
170+
<dd>Renderers must not do size adjustment when displaying on a small device.</dd>
171+
<dt><dfn>&lt;percentage&gt;</dfn></dt>
172+
<dd><span class="issue">Need to define what percentages actually mean. Are they a minimum or a set value? What exactly are they relative to?</span></dd>
173+
</dl>
174+
175+
Acknowledgments {#acknowledgments}
176+
==================================
177+
178+
The editors would like to thank:
179+
.
180+

0 commit comments

Comments
 (0)