Skip to content

Commit a33fcbc

Browse files
committed
Merge branch 'master' of github.com:w3c/csswg-drafts
2 parents 409977d + 585c53b commit a33fcbc

166 files changed

Lines changed: 44837 additions & 59 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

css-conditional/Overview.bs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ by adding:</p>
312312

313313
<pre>
314314
<dfn>supports_rule</dfn>
315-
: <a>SUPPORTS_SYM</a> <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* <a>supports_condition</a> <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* <a>group_rule_body</a>
315+
: <a>SUPPORTS_SYM</a> <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* <a>supports_condition</a> <a>group_rule_body</a>
316316
;
317317

318318
<dfn>supports_condition</dfn>
@@ -321,7 +321,7 @@ by adding:</p>
321321
;
322322

323323
<dfn>supports_condition_in_parens</dfn>
324-
: ( '(' <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* <a>supports_condition</a> <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* ')' ) | <a>supports_declaration_condition</a> |
324+
: ( '(' <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* <a>supports_condition</a> ')' <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* ) | <a>supports_declaration_condition</a> |
325325
<a>general_enclosed</a>
326326
;
327327

@@ -330,19 +330,19 @@ by adding:</p>
330330
;
331331

332332
<dfn>supports_conjunction</dfn>
333-
: <a>supports_condition_in_parens</a> ( <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* <a href="https://www.w3.org/TR/css3-mediaqueries/#syntax">AND</a> <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* <a>supports_condition_in_parens</a> )+
333+
: <a>supports_condition_in_parens</a> ( <a href="https://www.w3.org/TR/css3-mediaqueries/#syntax">AND</a> <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* <a>supports_condition_in_parens</a> )+
334334
;
335335

336336
<dfn>supports_disjunction</dfn>
337-
: <a>supports_condition_in_parens</a> ( <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* <a>OR</a> <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* <a>supports_condition_in_parens</a> )+
337+
: <a>supports_condition_in_parens</a> ( <a>OR</a> <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* <a>supports_condition_in_parens</a> )+
338338
;
339339

340340
<dfn>supports_declaration_condition</dfn>
341-
: '(' <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* <a href="https://www.w3.org/TR/CSS21/syndata.html#tokenization">declaration</a> ')'
341+
: '(' <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* <a href="https://www.w3.org/TR/CSS21/syndata.html#tokenization">declaration</a> ')' <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>*
342342
;
343343

344344
<dfn>general_enclosed</dfn>
345-
: ( <a href="https://www.w3.org/TR/CSS21/syndata.html#tokenization">FUNCTION</a> | '(' ) ( <a href="https://www.w3.org/TR/CSS21/syndata.html#tokenization">any</a> | <a href="https://www.w3.org/TR/CSS21/syndata.html#tokenization">unused</a> )* ')'
345+
: ( <a href="https://www.w3.org/TR/CSS21/syndata.html#tokenization">FUNCTION</a> | '(' ) ( <a href="https://www.w3.org/TR/CSS21/syndata.html#tokenization">any</a> | <a href="https://www.w3.org/TR/CSS21/syndata.html#tokenization">unused</a> )* ')' <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>*
346346
;
347347
</pre>
348348

css-fonts-4/Overview.bs

Lines changed: 177 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,178 @@ at least as dark as its predecessor. Only values between 1 - 999 are valid, and
305305

306306
<h3 id="font-size-prop">Font size: the 'font-size' property</h3>
307307

308-
Issue: Import from level 3
308+
<pre class="propdef">
309+
Name: font-size
310+
Value: <<absolute-size>> | <<relative-size>> | <<length-percentage>>
311+
Initial: medium
312+
Applies to: all elements
313+
Inherited: yes
314+
Percentages: refer to parent element's font size
315+
Computed value: absolute length
316+
Media: visual
317+
Animatable: As <<length>>
318+
</pre>
319+
320+
This property indicates the desired height of glyphs from the
321+
font. For scalable fonts, the font-size is a scale factor applied to the EM unit
322+
of the font. (Note that certain glyphs may bleed outside their EM box.) For
323+
non-scalable fonts, the font-size is converted into absolute units and matched
324+
against the declared font-size of the font, using the same absolute coordinate
325+
space for both of the matched values.
326+
Values have the following meanings:
327+
328+
<dl dfn-for=font-size dfn-type=value>
329+
<dt><dfn><<absolute-size>></dfn></dt>
330+
<dd>
331+
An <<absolute-size>> keyword refers to an entry
332+
in a table of font sizes computed and kept by the user agent. Possible values
333+
are:
334+
335+
[ xx-small | x-small | small | medium | large | x-large | xx-large ]
336+
</dd>
337+
338+
<dt><dfn><<relative-size>></dfn></dt>
339+
<dd>
340+
A <<relative-size>> keyword is interpreted
341+
relative to the table of font sizes and the computed 'font-size' of the
342+
parent element. Possible values are:
343+
344+
[ larger | smaller ]
345+
346+
For example, if the parent element has a font size of
347+
'medium', a value of 'larger' will make the font size of the
348+
current element be 'large'. If the parent element's size is not
349+
close to a table entry, the user agent is free to interpolate
350+
between table entries or round off to the closest one. The user
351+
agent may have to extrapolate table values if the numerical value
352+
goes beyond the keywords.
353+
</dd>
354+
355+
<dt><dfn><<length-percentage>></dfn></dt>
356+
<dd>
357+
A length value specifies an absolute font size
358+
(independent of the user agent's font table).
359+
Negative lengths are invalid.
360+
361+
A percentage value specifies an absolute font size relative
362+
to the parent element's font size. Use of percentage values, or
363+
values in 'em's, leads to more robust and cascadable style sheets.
364+
Negative percentages are invalid.
365+
</dd>
366+
</dl>
367+
368+
The following table provides user agent guidelines for the
369+
absolute-size scaling factor and their mapping to HTML heading and
370+
absolute font-sizes. The 'medium' value is used as the reference
371+
middle value. The user agent may fine-tune these values for different
372+
fonts or different types of display devices.
373+
374+
<table class="data">
375+
<thead>
376+
<th>CSS absolute-size values</th>
377+
<th>xx-small</td>
378+
<th>x-small</td>
379+
<th>small</td>
380+
<th>medium</td>
381+
<th>large</td>
382+
<th>x-large</td>
383+
<th>xx-large</td>
384+
<th>&nbsp;</td>
385+
</thead>
386+
<tbody>
387+
<tr>
388+
<th>scaling factor</th>
389+
<td>3/5</td>
390+
<td>3/4</td>
391+
<td>8/9</td>
392+
<td>1</td>
393+
<td>6/5</td>
394+
<td>3/2</td>
395+
<td>2/1</td>
396+
<td>3/1</td>
397+
</tr>
398+
<tr>
399+
<th>HTML headings</th>
400+
<td>h6</td>
401+
<td>&nbsp;</td>
402+
<td>h5</td>
403+
<td>h4</td>
404+
<td>h3</td>
405+
<td>h2</td>
406+
<td>h1</td>
407+
<td>&nbsp;</td>
408+
</tr>
409+
<tr>
410+
<th>HTML font sizes</th>
411+
<td>1</td>
412+
<td>&nbsp;</td>
413+
<td>2</td>
414+
<td>3</td>
415+
<td>4</td>
416+
<td>5</td>
417+
<td>6</td>
418+
<td>7</td>
419+
</tr>
420+
</tbody>
421+
</table>
422+
423+
<p class="note"><strong>Note 1.</strong> To preserve readability, an UA applying
424+
these guidelines should nevertheless avoid creating font-size resulting
425+
in less than 9 device pixels per EM unit on a computer display.</p>
426+
427+
<p class="note"><strong>Note 2.</strong> In CSS1, the suggested
428+
scaling factor between adjacent indexes was 1.5 which user experience
429+
proved to be too large. In CSS2, the suggested scaling factor for computer
430+
screen between adjacent indexes was 1.2 which still created issues for the small
431+
sizes. The new scaling factor varies between each index to provide a better
432+
readability.</p>
433+
434+
The actual value of this property may differ from the computed
435+
value due a numerical value on 'font-size-adjust' and the
436+
unavailability of certain font sizes.
437+
438+
Child elements inherit the computed 'font-size' value (otherwise, the
439+
effect of 'font-size-adjust' would compound).
440+
441+
<div class="example">
442+
<pre>
443+
p { font-size: 12pt; }
444+
blockquote { font-size: larger }
445+
em { font-size: 150% }
446+
em { font-size: 1.5em }
447+
</pre>
448+
</div>
449+
450+
<h3 id="font-size-adjust-prop">Relative sizing: the 'font-size-adjust' property</h3>
451+
452+
TODO: Migrate this from level 3.
453+
454+
<h3 id="font-size-adjust-prop">Controlling synthetic faces: the 'font-synthesis' property</h3>
455+
456+
<pre class="propdef">
457+
Name: font-synthesis
458+
Value: none | [ weight || style || small-caps ]
459+
Initial: weight style small-caps
460+
Applies to: all elements
461+
Inherited: yes
462+
Percentages: N/A
463+
Computed value: as specified
464+
Media: visual
465+
Animatable: no
466+
</pre>
467+
468+
This property controls whether user agents are allowed to synthesize bold or oblique font
469+
faces when a font family lacks bold or italic faces. If 'weight' is not specified, user agents
470+
must not synthesize bold faces. If 'style' is not specified, user agents must not synthesize
471+
italic faces. If 'small-caps' is not specified, user agents must not synthesize small-caps faces.
472+
A value of 'none' disallows all synthetic faces.
473+
474+
<div class="example">
475+
<p>The style rule below disables the use of synthetically obliqued Arabic:</p>
476+
</p>
477+
<pre>*:lang(ar) { font-synthesis: none; }
478+
</pre>
479+
</div>
309480

310481
<h2 id="font-resources">Font Resources</h2>
311482

@@ -1172,18 +1343,21 @@ at least as dark as its predecessor. Only values between 1 - 999 are valid, and
11721343

11731344
The <<string>> is a case-sensitive OpenType or TrueType variation axis name. As
11741345
specified in the OpenType / TrueType specifications, axis names contain four
1175-
ASCII characters. axis name strings longer or shorter than four characters,
1346+
ASCII characters. Axis name strings longer or shorter than four characters,
11761347
or containing characters outside the U+20&ndash;7E codepoint range are
11771348
invalid. Axis names need only
11781349
match an axis tag defined in the font, so they are not limited to
11791350
explicitly registered OpenType / TrueType variation axes. Fonts defining custom axis names should follow the
11801351
<a href="https://www.microsoft.com/typography/otspec/fvar.htm">name rules</a>
11811352
defined in the OpenType specification.
11821353

1183-
Axis values not present in the font, or axis values greater or less than the range supported by the font, are ignored and therefore have no effect; a user agent must
1354+
Axis values not present in the font are ignored and therefore have no effect; a user agent must
11841355
not attempt to synthesize fallback behavior based on these axis tags. Other axis values
11851356
within the same CSS 'font-variation-settings' statement are not ignored.
11861357

1358+
Axis values greater or less than the range supported by the font are clamped to the closest value supported by
1359+
the font.
1360+
11871361
Values are allowed to be fractional or negative.
11881362

11891363
If the same axis name appears twice, the second one supercedes the first.
@@ -1237,15 +1411,6 @@ at least as dark as its predecessor. Only values between 1 - 999 are valid, and
12371411
(so you can declare a palette in a variable, and override bits as desired).
12381412
</div>
12391413

1240-
<h2 id="expanded-font-weight-scale">Expanding the scale of <code>font-weight</code></h2>
1241-
1242-
<p>Expand the range of weights possible within the <code>font-weight</code>
1243-
property and <code>font-weight</code> descriptor to include integer values within
1244-
the range [1..1000]. Define precisely how the font matching algorithm works
1245-
when using weights in this range.</p>
1246-
1247-
<p class="example">Example of using new font weights mixed with old ones</p>
1248-
12491414
<h2 id="min-max-font-size">Minimum and maximum <code>font-size</code></h2>
12501415

12511416
<p>Define new properties to control the minimum and maximum font-size,
@@ -1274,13 +1439,6 @@ of predefined CSS generic font families to cover these type styles.</p>
12741439
Issue: Add ''system-ui'' fingerprinting issue to Security and Privacy Considerations section
12751440
per <a href="https://lists.w3.org/Archives/Public/www-style/2015Aug/0051.html">discussion</a>.
12761441

1277-
<h2 id="font-synthesis-small-caps">New <code>small-caps</code> value for <code>font-synthesis</code></h2>
1278-
1279-
<p>Since small capitals are often synthesized for fonts lacking smalls-caps glyphs,
1280-
add a <code>small-caps</code> value to the <code>font-synthesis</code> property
1281-
to allow small-caps synthesis to be disabled.
1282-
(<a href="https://lists.w3.org/Archives/Public/www-style/2015Jul/0463.html">www-style discussion</a>)</p>
1283-
12841442
<h2 id="emoji-fallback">Font fallback for emoji codepoints</h2>
12851443

12861444
<p>Many codepoints supported by emoji fonts overlap with codepoints supported

0 commit comments

Comments
 (0)