Skip to content

Commit 58adae6

Browse files
davidsgrogansvgeesus
authored andcommitted
after review round 1
1 parent 03f4f55 commit 58adae6

1 file changed

Lines changed: 35 additions & 19 deletions

File tree

css-fonts-5/Overview.bs

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ spec:css-color-4; type:property; text:color
2525
spec:css-values; type:value; text:ex
2626
spec:css22; type:value; for:/; text:block
2727
spec:html; type:element; text:font
28+
spec:html; type:element; text:meta
2829
spec:css-fonts-4; type:property; text:font-size
2930
spec:css-fonts-4; type:descriptor; text:font-language-override
3031
spec:css-fonts-4; type:property; text:font-family
@@ -62,12 +63,17 @@ Do not assume that if something is not here, it has been dropped.
6263
<h2 id="text-scale-meta">
6364
Text-Scale <code class=html>&lt;meta&gt;</code> element</h2>
6465

65-
A document with a <code>&lt;meta></code> tag whose <code>name</code> attribute
66+
A document with a <{meta}> tag
67+
whose <code>name</code> attribute
6668
is a <a>ASCII case-insensitive</a> match for
67-
<dfn lt=text-scale><code>"text-scale"</code></dfn> is recognized as setting the
68-
initial font size of the document. The value of the <code>content</code>
69+
<dfn lt=text-scale><code>"text-scale"</code></dfn>
70+
is recognized as setting the computed value
71+
of the ''font-size/medium'' font size
72+
and consequently scaling the computed size of the other <<absolute-size>> keywords.
73+
74+
The value of the <code>content</code>
6975
attribute must be an <a>ASCII case-insensitive</a> match for one of the
70-
recognized keywords.
76+
recognized keywords. Otherwise the tag is ignored.
7177

7278
Documents without this <code>&lt;meta></code> tag will have an assumed default
7379
value of <code>legacy</code>.
@@ -76,21 +82,29 @@ value of <code>legacy</code>.
7682
Keywords</h3>
7783

7884
The recognized keywords in the [=text-scale=]
79-
<code class=html>&lt;meta&gt;</code> element are:
80-
81-
<ul>
82-
<li><code class="index" lt="legacy!!text-scale-meta">legacy</code></li>
83-
<li><code class="index" lt="scale!!text-scale-meta">scale</code></li>
84-
</ul>
85+
<{meta}> element are:
86+
87+
<dl>
88+
<dt><dfn for="text-scale"><code>legacy</code></dfn></dt>
89+
<dd>''env()/preferred-text-scale'' returns the user's OS-level font factor on mobile,
90+
but 1 on desktop.
91+
The document's initial font size only incorporates UA-level font preferences.
92+
OS-level font preferences are ignored.</dd>
93+
<dt><dfn>scale</dfn></dt>
94+
<dd>''env()/preferred-text-scale'' returns the user's OS-level font preferences.
95+
The document's initial font size incorporates both UA-level and OS-level font preferences.</dd>
96+
</dl>
8597

8698
<h3 id="legacy-keyword">The 'legacy' keyword</h3>
8799

88-
The <dfn for="text-scale" export><code>legacy</code></dfn> property is
89-
recognized in the [=text-scale=] content attribute value.
90-
91100
When the value of the [=text-scale=] content attribute is
92-
<a for="text-scale">legacy</a> the user agent should set the initial font size
93-
to 16px multiplied by the font scale factor the user has chosen from any settings <i>provided by the user agent</i>. The ''preferred-text-scale'' value must be 1 on desktop platforms. On mobile:
101+
[=text-scale/legacy=]
102+
the user agent must set the computed ''font-size/medium'' font size
103+
to 16px multiplied by
104+
the font scale factor
105+
the user has chosen from any settings <i>provided by the user agent</i>.
106+
The ''preferred-text-scale'' value must be 1 on desktop platforms.
107+
On mobile:
94108
<ul>
95109
<li>if the operating system provides a text scale setting AND the UA hasn't already applied that factor to the initial font size, ''env()/preferred-text-scale'' returns the mulitplier that the user has chosen in the operating system's text scale setting.
96110

@@ -106,10 +120,12 @@ The <dfn for="text-scale" export><code>scale</code></dfn> property is
106120
recognized in the [=text-scale=] content attribute value.
107121

108122
When the value of the [=text-scale=] content attribute is
109-
<a for=text-scale>scale</a> the user agent may determine the initial font size
110-
based on a combination of the operating system's text scale setting and the user agent's text scale setting. The
111-
''env()/preferred-text-scale'' value must be a number that, when multiplied by
112-
16px, provides a <<length>> that matches that of the initial font size.
123+
<a for=text-scale>scale</a>
124+
computed ''font-size/medium'' font size must match the user's preferred paragraph text size as determined from a combination of OS and UA preferences.
125+
126+
The ''env()/preferred-text-scale'' value must be a number that,
127+
when multiplied by 16px,
128+
provides a <<length>> that matches that of the initial font size.
113129

114130
Further, when the value of the [=text-scale=] content attribute is
115131
<a for=text-scale>scale</a>, the user agent should skip all font-sizing interventions it would otherwise perform in an attempt to automatically honor the user's preferences. E.g. text autosizing on mobile (See [[css-size-adjust#intro]]) and full-application zoom (<a href="https://github.com/w3c/csswg-drafts/blob/main/css-env-1/explainers/env-preferred-text-scale.md#windows-11">popular browsers do this on Windows)</a>.

0 commit comments

Comments
 (0)