Skip to content

Commit a411825

Browse files
committed
[css-cascade] Improve cascade origin cross-linking
1 parent 87f9b95 commit a411825

2 files changed

Lines changed: 64 additions & 46 deletions

File tree

css-cascade-3/Overview.bs

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -666,13 +666,13 @@ Cascade Sorting Order</h3>
666666

667667
<ol>
668668
<li>Transition declarations [[!css-transitions-1]]
669-
<li>[=Important=] user agent declarations
670-
<li>[=Important=] user declarations
671-
<li>[=Important=] author declarations
669+
<li>[=Important=] [=user-agent origin|user agent=] declarations
670+
<li>[=Important=] [=user origin|user=] declarations
671+
<li>[=Important=] [=author origin|author=] declarations
672672
<li>Animation declarations [[!css-animations-1]]
673-
<li>[=Normal=] author declarations
674-
<li>[=Normal=] user declarations
675-
<li>[=Normal=] user agent declarations
673+
<li>[=Normal=] [=author origin|author=] declarations
674+
<li>[=Normal=] [=user origin|user=] declarations
675+
<li>[=Normal=] [=user-agent origin|user agent=] declarations
676676
</ol>
677677

678678
Declarations from <a>origins</a> earlier in this list win over declarations from later <a>origins</a>.
@@ -717,21 +717,21 @@ Cascading Origins</h3>
717717
CSS defines three core <a>origins</a>:
718718

719719
<dl>
720-
<dt><dfn export id='cascade-origin-author' lt="author origin|author style sheet">Author Origin</dfn>
720+
<dt><dfn export id='cascade-origin-author' lt="author origin|author style sheet|author-origin">Author Origin</dfn>
721721
<dd>
722722
The author specifies style sheets for a source document
723723
according to the conventions of the document language.
724724
For instance, in HTML,
725725
style sheets may be included in the document or linked externally.
726726

727-
<dt><dfn export id='cascade-origin-user' lt="user origin|user style sheet">User Origin</dfn>
727+
<dt><dfn export id='cascade-origin-user' lt="user origin|user style sheet|user-origin">User Origin</dfn>
728728
<dd>
729729
The user may be able to specify style information for a particular document.
730730
For example, the user may specify a file that contains a style sheet
731731
or the user agent may provide an interface that generates a user style sheet
732732
(or behaves as if it did).
733733

734-
<dt><dfn export id='cascade-origin-ua' lt="user agent origin|ua origin|user agent style sheet|ua style sheet">User Agent Origin</dfn>
734+
<dt><dfn export id='cascade-origin-ua' lt="user-agent origin|UA origin|user-agent style sheet|UA style sheet|UA-origin">User-Agent Origin</dfn>
735735
<dd>
736736
Conforming user agents must apply a default style sheet
737737
(or behave as if they did).
@@ -774,8 +774,10 @@ Important Declarations: the ''!important'' annotation</h3>
774774

775775
An <a>important</a> declaration takes precedence over a [=normal=] declaration.
776776
Author and user style sheets may contain [=important=] declarations,
777-
with user [=important=] declarations overriding author [=important=] declarations.
778-
This CSS feature improves accessibility of documents by giving users with special requirements
777+
with [=user-origin=] [=important=] declarations
778+
overriding [=author-origin=] [=important=] declarations.
779+
This CSS feature improves accessibility of documents
780+
by giving users with special requirements
779781
(large fonts, color combinations, etc.)
780782
control over presentation.
781783

@@ -784,8 +786,8 @@ Important Declarations: the ''!important'' annotation</h3>
784786
(Animated values normally override all other rules.)
785787
[[css-animations-1]]
786788

787-
User agent style sheets may also contain [=important=] declarations.
788-
These override all author and user declarations.
789+
[=User agent style sheets=] may also contain [=important=] declarations.
790+
These override all [=author origin|author=] and [=user origin|user=] declarations.
789791

790792
<div class='example'>
791793
The first rule in the user's style sheet in the following example contains an ''!important'' declaration,
@@ -836,16 +838,21 @@ Precedence of Non-CSS Presentational Hints</h3>
836838
The UA may choose to honor presentational hints in a source document's markup,
837839
for example the <code>bgcolor</code> attribute or <{s}> element in [[HTML]].
838840
All document language-based styling must be translated to corresponding CSS rules
839-
and either enter the cascade at the user agent level or
840-
be treated as author level rules with a specificity of zero placed at the start of the author style sheet.
841-
A document language may define whether a presentational hint enters at the UA or author level of the cascade;
841+
and either enter the cascade as [=UA-origin=] rules or
842+
be treated as [=author-origin=] rules with a specificity of zero
843+
placed at the start of the [=author style sheet=].
844+
A document language may define whether such a presentational hint
845+
enters the [=cascade=] as [=UA-origin=] or [=author-origin=];
842846
if so, the UA must behave accordingly.
843847
For example, [[SVG11]] maps its presentation attributes into the author level.
844848

845-
Note: Presentational hints entering the cascade at the UA level can be overridden by author or user styles.
846-
Presentational hints entering the cascade at the author level can be overridden by author styles,
847-
but not by non-''!important'' user styles.
848-
Host languages should choose the appropriate level for presentational hints with these considerations in mind.
849+
Note: Presentational hints entering the [=cascade=] as [=UA-origin=] rules
850+
can be overridden by [=author-origin=] or [=user-origin=] styles.
851+
Presentational hints entering the cascade as [=author-origin=] rules
852+
can be overridden by [=author-origin=] styles,
853+
but not by non-important [=user-origin=] styles.
854+
Host languages should choose the appropriate origin for presentational hints
855+
with these considerations in mind.
849856

850857

851858
<!--

css-cascade-4/Overview.bs

Lines changed: 37 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -779,13 +779,13 @@ Cascade Sorting Order</h3>
779779

780780
<ol>
781781
<li>Transition declarations [[!css-transitions-1]]
782-
<li>[=Important=] user agent declarations
783-
<li>[=Important=] user declarations
784-
<li>[=Important=] author declarations
782+
<li>[=Important=] [=user-agent origin|user agent=] declarations
783+
<li>[=Important=] [=user origin|user=] declarations
784+
<li>[=Important=] [=author origin|author=] declarations
785785
<li>Animation declarations [[!css-animations-1]]
786-
<li>[=Normal=] author declarations
787-
<li>[=Normal=] user declarations
788-
<li>[=Normal=] user agent declarations
786+
<li>[=Normal=] [=author origin|author=] declarations
787+
<li>[=Normal=] [=user origin|user=] declarations
788+
<li>[=Normal=] [=user-agent origin|user agent=] declarations
789789
</ol>
790790

791791
Declarations from <a>origins</a> earlier in this list win over declarations from later <a>origins</a>.
@@ -868,21 +868,21 @@ Cascading Origins</h3>
868868
CSS defines three core <a>origins</a>:
869869

870870
<dl>
871-
<dt><dfn export id='cascade-origin-author' lt="author origin|author style sheet">Author Origin</dfn>
871+
<dt><dfn export id='cascade-origin-author' lt="author origin|author style sheet|author-origin">Author Origin</dfn>
872872
<dd>
873873
The author specifies style sheets for a source document
874874
according to the conventions of the document language.
875875
For instance, in HTML,
876876
style sheets may be included in the document or linked externally.
877877

878-
<dt><dfn export id='cascade-origin-user' lt="user origin|user style sheet">User Origin</dfn>
878+
<dt><dfn export id='cascade-origin-user' lt="user origin|user style sheet|user-origin">User Origin</dfn>
879879
<dd>
880880
The user may be able to specify style information for a particular document.
881881
For example, the user may specify a file that contains a style sheet
882882
or the user agent may provide an interface that generates a user style sheet
883883
(or behaves as if it did).
884884

885-
<dt><dfn export id='cascade-origin-ua' lt="user agent origin|ua origin|user agent style sheet|ua style sheet">User Agent Origin</dfn>
885+
<dt><dfn export id='cascade-origin-ua' lt="user-agent origin|UA origin|user-agent style sheet|UA style sheet|UA-origin">User-Agent Origin</dfn>
886886
<dd>
887887
Conforming user agents must apply a default style sheet
888888
(or behave as if they did).
@@ -925,8 +925,10 @@ Important Declarations: the ''!important'' annotation</h3>
925925

926926
An <a>important</a> declaration takes precedence over a [=normal=] declaration.
927927
Author and user style sheets may contain [=important=] declarations,
928-
with user [=important=] declarations overriding author [=important=] declarations.
929-
This CSS feature improves accessibility of documents by giving users with special requirements
928+
with [=user-origin=] [=important=] declarations
929+
overriding [=author-origin=] [=important=] declarations.
930+
This CSS feature improves accessibility of documents
931+
by giving users with special requirements
930932
(large fonts, color combinations, etc.)
931933
control over presentation.
932934

@@ -935,8 +937,8 @@ Important Declarations: the ''!important'' annotation</h3>
935937
(Animated values normally override all other rules.)
936938
[[css-animations-1]]
937939

938-
User agent style sheets may also contain [=important=] declarations.
939-
These override all author and user declarations.
940+
[=User agent style sheets=] may also contain [=important=] declarations.
941+
These override all [=author origin|author=] and [=user origin|user=] declarations.
940942

941943
<div class='example'>
942944
The first rule in the user's style sheet in the following example contains an ''!important'' declaration,
@@ -987,16 +989,21 @@ Precedence of Non-CSS Presentational Hints</h3>
987989
The UA may choose to honor presentational hints in a source document's markup,
988990
for example the <code>bgcolor</code> attribute or <{s}> element in [[HTML]].
989991
All document language-based styling must be translated to corresponding CSS rules
990-
and either enter the cascade at the user agent level or
991-
be treated as author level rules with a specificity of zero placed at the start of the author style sheet.
992-
A document language may define whether a presentational hint enters at the UA or author level of the cascade;
992+
and either enter the cascade as [=UA-origin=] rules or
993+
be treated as [=author-origin=] rules with a specificity of zero
994+
placed at the start of the [=author style sheet=].
995+
A document language may define whether such a presentational hint
996+
enters the [=cascade=] as [=UA-origin=] or [=author-origin=];
993997
if so, the UA must behave accordingly.
994998
For example, [[SVG11]] maps its presentation attributes into the author level.
995999

996-
Note: Presentational hints entering the cascade at the UA level can be overridden by author or user styles.
997-
Presentational hints entering the cascade at the author level can be overridden by author styles,
998-
but not by non-''!important'' user styles.
999-
Host languages should choose the appropriate level for presentational hints with these considerations in mind.
1000+
Note: Presentational hints entering the [=cascade=] as [=UA-origin=] rules
1001+
can be overridden by [=author-origin=] or [=user-origin=] styles.
1002+
Presentational hints entering the cascade as [=author-origin=] rules
1003+
can be overridden by [=author-origin=] styles,
1004+
but not by non-important [=user-origin=] styles.
1005+
Host languages should choose the appropriate origin for presentational hints
1006+
with these considerations in mind.
10001007

10011008

10021009
<!--
@@ -1085,22 +1092,26 @@ Erasing All Declarations: the ''unset'' keyword</h4>
10851092
Rolling Back The Cascade: the ''revert'' keyword</h4>
10861093

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

10901097
<dl>
1091-
<dt>user-agent origin
1098+
<dt>[=user-agent origin=]
10921099
<dd>
10931100
Equivalent to ''unset''.
10941101

1095-
<dt>user origin
1102+
<dt>[=user origin=]
10961103
<dd>
10971104
Rolls back the <a>cascaded value</a> to the user-agent level,
1098-
so that the <a>specified value</a> is calculated as if no author-level or user-level rules were specified for this property on this element.
1105+
so that the <a>specified value</a> is calculated
1106+
as if no [=author-origin=] or [=user-origin=] rules were specified
1107+
for this property on this element.
10991108

1100-
<dt>author origin
1109+
<dt>[=author origin=]
11011110
<dd>
11021111
Rolls back the <a>cascaded value</a> to the user level,
1103-
so that the <a>specified value</a> is calculated as if no author-level rules were specified for this property on this element.
1112+
so that the <a>specified value</a> is calculated
1113+
as if no [=author-origin=] rules were specified
1114+
for this property on this element.
11041115
For the purpose of ''revert'', this origin includes the Animation <a>origin</a>.
11051116
</dl>
11061117

0 commit comments

Comments
 (0)