Skip to content

Commit aba0111

Browse files
committed
[css-cascade] Re-sync across levels.
1 parent 5ca75a6 commit aba0111

File tree

3 files changed

+121
-75
lines changed

3 files changed

+121
-75
lines changed

css-cascade-3/Overview.bs

+33-15
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Title: CSS Cascading and Inheritance Level 3
33
Shortname: css-cascade
44
Level: 3
55
Status: ED
6-
Work Status: Testing
7-
Implementation Report: https://drafts.csswg.org/css-cascade-3/implementation-report.html
6+
Work Status: Completed
7+
Implementation Report: https://drafts.csswg.org/css-cascade-3/implementation-report
88
Group: csswg
99
ED: https://drafts.csswg.org/css-cascade-3/
1010
TR: https://www.w3.org/TR/css-cascade-3/
@@ -42,6 +42,20 @@ spec:css-fonts-4
4242
<h2 id="intro">
4343
Introduction</h2>
4444

45+
CSS defines a finite set of parameters,
46+
called <dfn export for=CSS lt="property">properties</dfn>,
47+
that direct the rendering of a document.
48+
Each [=property=] has a name
49+
(e.g., 'color', 'font-size', or 'border-style'),
50+
a value space
51+
(e.g., <<color>>, <<length-percentage>>, ''[ solid | dashed | dotted | &hellip; ]''),
52+
and a defined behavior on the rendering of the document.
53+
Properties values are assigned to various parts of the document
54+
via [=property declarations=],
55+
which assign the property a value
56+
(e.g. ''red'', ''12pt'', ''dotted'')
57+
for the associated element or box.
58+
4559
One of the fundamental design principles of CSS is <a lt="cascade">cascading</a>,
4660
which allows several style sheets to influence the presentation of a document.
4761
When different declarations try to set a value for the same element/property combination,
@@ -257,7 +271,7 @@ Shorthand Properties</h2>
257271
to its initial value of ''border-image/none'',
258272
but has no syntax to set it to anything else. [[css-backgrounds-3]]</span>
259273

260-
If a <a>shorthand</a> is specified as one of the <a href="https://www.w3.org/TR/css3-values/#common-keywords">CSS-wide keywords</a> [[!css-values-3]],
274+
If a <a>shorthand</a> is specified as one of the <a href="https://www.w3.org/TR/css-values/#common-keywords">CSS-wide keywords</a> [[!css-values-3]],
261275
it sets all of its <a>sub-properties</a> to that keyword,
262276
including any that are <a>reset-only sub-properties</a>.
263277
(Note that these keywords cannot be combined with other values in a single declaration, not even in a shorthand.)
@@ -277,12 +291,12 @@ Resetting All Properties: the 'all' property</h3>
277291
The 'all' property is a <a>shorthand</a>
278292
that resets <em>all</em> CSS properties
279293
except 'direction' and 'unicode-bidi'.
280-
It only accepts the <a href="https://www.w3.org/TR/css3-values/#common-keywords">CSS-wide keywords</a>.
294+
It only accepts the <a href="https://www.w3.org/TR/css-values/#common-keywords">CSS-wide keywords</a>.
281295
It does not reset <a>custom properties</a> [[css-variables-1]].
282296

283297
Note: The excepted CSS properties 'direction' and 'unicode-bidi'
284298
are actually markup-level features,
285-
and <a href="https://www.w3.org/TR/css3-writing-modes/#text-direction">should not be set in the author's style sheet</a>.
299+
and <a href="https://www.w3.org/TR/css-writing-modes-3/#text-direction">should not be set in the author's style sheet</a>.
286300
(They exist as CSS properties only to style document languages not supported by the UA.)
287301
Authors should use the appropriate markup, such as HTML's <code>dir</code> attribute, instead.
288302
[[css-writing-modes-3]]
@@ -356,7 +370,7 @@ Value Processing</h2>
356370
Declared Values</h3>
357371

358372
Each property declaration <a href="#filtering">applied to an element</a>
359-
contributes a <dfn export>declared value</dfn> for that property
373+
contributes a <dfn export local-lt="declared">declared value</dfn> for that property
360374
associated with the element.
361375
See <a href="#filtering">Filtering Declarations</a> for details.
362376

@@ -366,7 +380,8 @@ Declared Values</h3>
366380
<h3 id="cascaded">
367381
Cascaded Values</h3>
368382

369-
The <dfn export>cascaded value</dfn> represents the result of <a href="#cascade">the cascade</a>:
383+
The <dfn export local-lt="cascaded">cascaded value</dfn>
384+
represents the result of <a href="#cascade">the cascade</a>:
370385
it is the <a>declared value</a> that wins the cascade
371386
(is sorted first in the <a>output of the cascade</a>).
372387
If the <a>output of the cascade</a> is an empty list,
@@ -375,7 +390,8 @@ Cascaded Values</h3>
375390
<h3 id="specified">
376391
Specified Values</h3>
377392

378-
The <dfn export>specified value</dfn> is the value of a given property that the style sheet authors intended for that element.
393+
The <dfn export local-lt="specified">specified value</dfn> is
394+
the value of a given property that the style sheet authors intended for that element.
379395
It is the result of putting the <a>cascaded value</a> through the <a href="#defaulting">defaulting</a> processes,
380396
guaranteeing that a <a>specified value</a> exists for every property on every element.
381397

@@ -390,7 +406,8 @@ Specified Values</h3>
390406
<h3 id="computed">
391407
Computed Values</h3>
392408

393-
The <dfn export>computed value</dfn> is the result of resolving the <a>specified value</a>
409+
The <dfn export local-lt="computed">computed value</dfn> is
410+
the result of resolving the <a>specified value</a>
394411
as defined in the “Computed Value” line of the property definition table,
395412
generally absolutizing it in preparation for <a>inheritance</a>.
396413

@@ -444,7 +461,8 @@ Computed Values</h3>
444461
<h3 id='used'>
445462
Used Values</h3>
446463

447-
The <dfn export>used value</dfn> is the result of taking the <a>computed value</a>
464+
The <dfn export local-lt="used">used value</dfn> is
465+
the result of taking the <a>computed value</a>
448466
and completing any remaining calculations to make it the absolute theoretical value
449467
used in the formatting of the document.
450468

@@ -487,7 +505,8 @@ Actual Values</h3>
487505
and may therefore have to approximate the <a lt="used value">used</a> width.
488506
Also, the font size of an element may need adjustment based on the availability of fonts
489507
or the value of the 'font-size-adjust' property.</span>
490-
The <dfn export>actual value</dfn> is the used value after any such adjustments have been made.
508+
The <dfn export local-lt="actual">actual value</dfn> is
509+
the used value after any such adjustments have been made.
491510

492511
Note: By probing the actual values of elements,
493512
much can be learned about how the document is laid out.
@@ -638,7 +657,7 @@ Filtering</h2>
638657
It belongs to a style sheet that currently applies to this document.
639658

640659
<li>
641-
It is not qualified by a conditional rule [[!CSS3-CONDITIONAL]] with a false condition.
660+
It is not qualified by a conditional rule [[!CSS-CONDITIONAL-3]] with a false condition.
642661

643662
<li>
644663
It belongs to a style rule whose selector matches the element. [[!SELECT]]
@@ -714,7 +733,6 @@ Cascade Sorting Order</h3>
714733
are considered to have a specificity higher than any selector.
715734
The declaration with the highest specificity wins.
716735

717-
718736
<dt id='cascade-order'>Order of Appearance
719737
<dd>
720738
The last declaration in document order wins.
@@ -739,7 +757,7 @@ Cascade Sorting Order</h3>
739757
<h3 id='cascading-origins'>
740758
Cascading Origins</h3>
741759

742-
Each style rule has a <dfn id=origin export local-lt=origin>cascade origin</dfn>,
760+
Each style rule has a <dfn id=origin export local-lt="origin">cascade origin</dfn>,
743761
which determines where it enters the cascade.
744762
CSS defines three core <a>origins</a>:
745763

@@ -940,7 +958,7 @@ Explicit Defaulting</h3>
940958

941959
Several CSS-wide property values are defined below;
942960
declaring a property to have these values explicitly specifies a particular defaulting behavior.
943-
As specified in <a href="https://www.w3.org/TR/css3-values/#common-keywords">CSS Values and Units Level 3</a> [[!css-values-3]],
961+
As specified in <a href="https://www.w3.org/TR/css-values/#common-keywords">CSS Values and Units</a> [[!css-values-3]],
944962
all CSS properties can accept these values.
945963

946964
<h4 id="initial">

css-cascade-4/Overview.bs

+20-42
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ Importing Style Sheets: the ''@import'' rule</h2>
141141
<div class="example">
142142
The following <a href="#conditional-import">conditional <css>@import</css> rule</a>
143143
only loads the style sheet when the UA
144-
<a href="https://www.w3.org/TR/css3-conditional/#support-definition">supports</a> ''display: flex'',
144+
<a href="https://www.w3.org/TR/css-conditional-3/#support-definition">supports</a> ''display: flex'',
145145
and only applies the style sheet on a <a href="https://www.w3.org/TR/CSS2/media.html#media-types">handheld</a> device
146-
with a <a href="https://www.w3.org/TR/css3-mediaqueries/#width">maximum viewport width</a> of 400px.
146+
with a <a href="https://www.w3.org/TR/mediaqueries-4/#width">maximum viewport width</a> of 400px.
147147

148148
<pre>@import url("narrow.css") supports(display: flex) handheld and (max-width: 400px);</pre>
149149
</div>
@@ -219,8 +219,8 @@ Conditional ''@import'' Rules</h3>
219219
</div>
220220

221221
The evaluation and full syntax of the <a>import conditions</a>
222-
are defined by the <a href="https://www.w3.org/TR/css3-mediaqueries/">Media Queries</a> [[!MEDIAQ]]
223-
and <a href="https://www.w3.org/TR/css-conditional/">CSS Conditional Rules</a> [[!CSS3-CONDITIONAL]] specifications.
222+
are defined by the <a href="https://www.w3.org/TR/mediaqueries/">Media Queries</a> [[!MEDIAQ]]
223+
and <a href="https://www.w3.org/TR/css-conditional/">CSS Conditional Rules</a> [[!CSS-CONDITIONAL-3]] specifications.
224224

225225
<h3 id=import-processing>
226226
Processing Stylesheet Imports</h3>
@@ -328,7 +328,7 @@ Shorthand Properties</h2>
328328
to its initial value of ''border-image/none'',
329329
but has no syntax to set it to anything else. [[css-backgrounds-3]]</span>
330330

331-
If a <a>shorthand</a> is specified as one of the <a href="https://www.w3.org/TR/css3-values/#common-keywords">CSS-wide keywords</a> [[!css-values-3]],
331+
If a <a>shorthand</a> is specified as one of the <a href="https://www.w3.org/TR/css-values/#common-keywords">CSS-wide keywords</a> [[!css-values-3]],
332332
it sets all of its <a>sub-properties</a> to that keyword,
333333
including any that are <a>reset-only sub-properties</a>.
334334
(Note that these keywords cannot be combined with other values in a single declaration, not even in a shorthand.)
@@ -404,12 +404,12 @@ Resetting All Properties: the 'all' property</h3>
404404
The 'all' property is a <a>shorthand</a>
405405
that resets <em>all</em> CSS properties
406406
except 'direction' and 'unicode-bidi'.
407-
It only accepts the <a href="https://www.w3.org/TR/css3-values/#common-keywords">CSS-wide keywords</a>.
407+
It only accepts the <a href="https://www.w3.org/TR/css-values/#common-keywords">CSS-wide keywords</a>.
408408
It does not reset <a>custom properties</a> [[css-variables-1]].
409409

410410
Note: The excepted CSS properties 'direction' and 'unicode-bidi'
411411
are actually markup-level features,
412-
and <a href="https://www.w3.org/TR/css3-writing-modes/#text-direction">should not be set in the author's style sheet</a>.
412+
and <a href="https://www.w3.org/TR/css-writing-modes-3/#text-direction">should not be set in the author's style sheet</a>.
413413
(They exist as CSS properties only to style document languages not supported by the UA.)
414414
Authors should use the appropriate markup, such as HTML's <code>dir</code> attribute, instead.
415415
[[css-writing-modes-3]]
@@ -500,7 +500,8 @@ Declared Values</h3>
500500
<h3 id="cascaded">
501501
Cascaded Values</h3>
502502

503-
The <dfn export local-lt="cascaded">cascaded value</dfn> represents the result of <a href="#cascade">the cascade</a>:
503+
The <dfn export local-lt="cascaded">cascaded value</dfn>
504+
represents the result of <a href="#cascade">the cascade</a>:
504505
it is the <a>declared value</a> that wins the cascade
505506
(is sorted first in the <a>output of the cascade</a>).
506507
If the <a>output of the cascade</a> is an empty list,
@@ -509,7 +510,8 @@ Cascaded Values</h3>
509510
<h3 id="specified">
510511
Specified Values</h3>
511512

512-
The <dfn export local-lt="specified">specified value</dfn> is the value of a given property that the style sheet authors intended for that element.
513+
The <dfn export local-lt="specified">specified value</dfn> is
514+
the value of a given property that the style sheet authors intended for that element.
513515
It is the result of putting the <a>cascaded value</a> through the <a href="#defaulting">defaulting</a> processes,
514516
guaranteeing that a <a>specified value</a> exists for every property on every element.
515517

@@ -524,7 +526,8 @@ Specified Values</h3>
524526
<h3 id="computed">
525527
Computed Values</h3>
526528

527-
The <dfn export local-lt="computed">computed value</dfn> is the result of resolving the <a>specified value</a>
529+
The <dfn export local-lt="computed">computed value</dfn> is
530+
the result of resolving the <a>specified value</a>
528531
as defined in the “Computed Value” line of the property definition table,
529532
generally absolutizing it in preparation for <a>inheritance</a>.
530533

@@ -578,7 +581,8 @@ Computed Values</h3>
578581
<h3 id='used'>
579582
Used Values</h3>
580583

581-
The <dfn export local-lt="used">used value</dfn> is the result of taking the <a>computed value</a>
584+
The <dfn export local-lt="used">used value</dfn> is
585+
the result of taking the <a>computed value</a>
582586
and completing any remaining calculations to make it the absolute theoretical value
583587
used in the formatting of the document.
584588

@@ -654,7 +658,8 @@ Actual Values</h3>
654658
and may therefore have to approximate the <a lt="used value">used</a> width.
655659
Also, the font size of an element may need adjustment based on the availability of fonts
656660
or the value of the 'font-size-adjust' property.</span>
657-
The <dfn export local-lt="actual">actual value</dfn> is the used value after any such adjustments have been made.
661+
The <dfn export local-lt="actual">actual value</dfn> is
662+
the used value after any such adjustments have been made.
658663

659664
Note: By probing the actual values of elements,
660665
much can be learned about how the document is laid out.
@@ -805,7 +810,7 @@ Filtering</h2>
805810
It belongs to a style sheet that currently applies to this document.
806811

807812
<li>
808-
It is not qualified by a conditional rule [[!CSS3-CONDITIONAL]] with a false condition.
813+
It is not qualified by a conditional rule [[!CSS-CONDITIONAL-3]] with a false condition.
809814

810815
<li>
811816
It belongs to a style rule whose selector matches the element. [[!SELECT]]
@@ -893,34 +898,7 @@ Cascade Sorting Order</h3>
893898
can set defaults that are easily overridden by the outer context,
894899
while [=important=] declarations belonging to an [=encapsulation context=]
895900
can enforce requirements that cannot be overridden by the outer context.
896-
<!--
897-
<dt id='cascade-scope'>Scope
898-
<dd>
899-
A declaration can be <dfn export>scoped</dfn> to a subtree of the document
900-
so that it only affects its <dfn export>scoping element</dfn> and that element's descendants.
901-
For example, [[HTML]] defines scoped <code>&lt;style&gt;</code> elements,
902-
whose style sheets are scoped to the element's parent.
903-
904-
If the <a>scoping elements</a> of two declarations
905-
have an ancestor/descendant relationship,
906-
then for [=normal=] rules the declaration whose <a>scoping element</a> is the descendant wins,
907-
and for [=important=] rules the declaration whose <a>scoping element</a> is the ancestor wins.
908901

909-
Note: In other words, for [=normal=] declarations the inner scope's declarations override,
910-
but for ''!important'' rules <em>outer</em> scope's override.
911-
912-
For the purpose of this step,
913-
all unscoped declarations are considered to be <a>scoped</a> to the root element.
914-
[=Normal=] declarations from style attributes
915-
are considered to be <a>scoped</a> to the element with the attribute,
916-
whereas important declarations from style attributes
917-
are considered to be <a>scoped</a> to the root element.
918-
[[!CSSSTYLEATTR]]
919-
920-
Note: This odd handling of ''!important'' style attribute declarations
921-
is to match the behavior defined in CSS Levels 1 and 2,
922-
where style attributes simply have higher specificity than any other author rules. [[CSS2]]
923-
-->
924902
<dt id='cascade-specificity'>Specificity
925903
<dd>
926904
The <a href="https://www.w3.org/TR/selectors/#specificity">Selectors module</a> [[!SELECT]] describes how to compute the specificity of a selector.
@@ -1160,7 +1138,7 @@ Explicit Defaulting</h3>
11601138

11611139
Several CSS-wide property values are defined below;
11621140
declaring a property to have these values explicitly specifies a particular defaulting behavior.
1163-
As specified in <a href="https://www.w3.org/TR/css3-values/#common-keywords">CSS Values and Units Level 3</a> [[!css-values-3]],
1141+
As specified in <a href="https://www.w3.org/TR/css-values/#common-keywords">CSS Values and Units</a> [[!css-values-3]],
11641142
all CSS properties can accept these values.
11651143

11661144
<h4 id="initial">
@@ -1186,7 +1164,7 @@ Erasing All Declarations: the ''unset'' keyword</h4>
11861164
(or all longhands of a <a>shorthand</a>).
11871165

11881166
<h4 id="default">
1189-
Rolling Back The Cascade: the ''revert'' keyword</h4>
1167+
Rolling Back Cascade Origins: the ''revert'' keyword</h4>
11901168

11911169
If the <a>cascaded value</a> of a property is the <dfn for=all caniuse="css-revert-value">''revert''</dfn> keyword,
11921170
the behavior depends on the [=cascade origin=] to which the declaration belongs:

0 commit comments

Comments
 (0)