Skip to content

Commit 045fe28

Browse files
davidsgrogansvgeesus
authored andcommitted
full example
1 parent b025658 commit 045fe28

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

css-fonts-5/Overview.bs

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Documents without this <{meta}> tag will have an assumed default
7979
value of <code>legacy</code>.
8080

8181
<div class="example" id="ex-text-scale">
82-
<pre>&lt;meta name="text-scale" content="scale" /></pre>
82+
<pre>&lt;meta name="text-scale" content="scale" /></pre>
8383
</div>
8484

8585
There must not be more than one <{meta}> element with its <{meta/name}> attribute value set to an [=ASCII case-insensitive=] for [=text-scale=] per document.
@@ -149,6 +149,31 @@ Further, when the value of the [=text-scale=] content attribute is
149149
Note: Authors are expected to use
150150
''&lt;meta name="text-scale" content="scale"&gt;'' in stylesheets so that the ''font-size/medium'' font size will reflect a combination of the user's font preferences, whether those are specified at the OS level or the UA level. The author will then be able to use ''rem'' throughout the page to honor the user's font preferences.
151151

152+
<div class="example" id="ex-scaled-page">
153+
If authors don't alter the '':root'' font size, content sized with ''rem'' units will be relative to the preferred text scale
154+
<pre>
155+
&lt;!DOCTYPE html>
156+
&lt;html> &lt;!-- leave this element's font-size as the default -->
157+
&lt;head>
158+
&lt;meta name="text-scale" content="scale" />
159+
&lt;/head>
160+
&lt;body>
161+
&lt;div style="font-size: 1rem;">
162+
This font size obeys the user's font preferences, **whether
163+
those preferences are specified at the operating system level
164+
or the user agent level**
165+
&lt;/div>
166+
&lt;div style="font-size: 20px;">
167+
This font size does NOT respect the user's font preferences.
168+
&lt;div style="font-size: 1rem;">
169+
But this font size does!
170+
&lt;/div>
171+
&lt;/div>
172+
&lt;/body>
173+
&lt;/html>
174+
</pre>
175+
</div>
176+
152177
<h3 id="values">
153178
Value Definitions</h3>
154179

0 commit comments

Comments
 (0)