Skip to content

Commit d7f41c4

Browse files
committed
[css-cascade-4][css-cascade-5] Give presentational hits their own origin. #6659
1 parent 2a9093b commit d7f41c4

File tree

2 files changed

+34
-10
lines changed

2 files changed

+34
-10
lines changed

css-cascade-4/Overview.bs

+22-6
Original file line numberDiff line numberDiff line change
@@ -1163,19 +1163,24 @@ Precedence of Non-CSS Presentational Hints</h3>
11631163
The UA may choose to honor presentational hints in a source document's markup,
11641164
for example the <code>bgcolor</code> attribute or <{s}> element in [[HTML]].
11651165
All document language-based styling must be translated to corresponding CSS rules
1166-
and either enter the cascade as [=UA-origin=] rules or
1167-
be treated as [=author-origin=] rules with a specificity of zero
1168-
placed at the start of the [=author style sheet=].
1166+
and enter the cascade as rules in either
1167+
the [=UA-origin=] or a special-purpose <dfn>author presentational hint origin</dfn>
1168+
between the regular [=user origin=] and the [=author origin=].
1169+
For the purpose of [=cascading=]
1170+
this [=author presentational hint origin=] is treated as an independent [=origin=],
1171+
but for the purpose of the ''revert'' keyword
1172+
it is considered part of the [=author origin=].
1173+
11691174
A document language may define whether such a presentational hint
11701175
enters the [=cascade=] as [=UA-origin=] or [=author-origin=];
11711176
if so, the UA must behave accordingly.
1172-
For example, [[SVG11]] maps its presentation attributes into the author level.
1177+
For example, [[SVG11]] maps its presentation attributes into the [=author origin=].
11731178

11741179
Note: Presentational hints entering the [=cascade=] as [=UA-origin=] rules
11751180
can be overridden by [=author-origin=] or [=user-origin=] styles.
1176-
Presentational hints entering the cascade as [=author-origin=] rules
1181+
Presentational hints entering the cascade as [=author presentational hint origin=] rules
11771182
can be overridden by [=author-origin=] styles,
1178-
but not by non-important [=user-origin=] styles.
1183+
but not by non-[=important=] [=user-origin=] styles.
11791184
Host languages should choose the appropriate origin for presentational hints
11801185
with these considerations in mind.
11811186

@@ -1311,6 +1316,17 @@ Changes</h2>
13111316
<h3 id="changes-2018">
13121317
Changes Since the 28 August 2018 Candidate Recommendation</h3>
13131318

1319+
Non-trivial changes since the <a href="https://www.w3.org/TR/2021/WD-css-cascade-4-20210319/">19 March 2021 Working Draft</a> include:
1320+
1321+
<ul class=non-normative>
1322+
<li id="change-2021-preshint-origin">
1323+
Defined [=author presentational hint origin=] to handle author-origin presentational hints,
1324+
instead of relying on zero-specificity and source order,
1325+
to correctly define their interaction with the [=encapsulation context=]
1326+
aspect of the cascade.
1327+
(<a href="https://github.com/w3c/csswg-drafts/issues/6659">Issue 66749</a>)
1328+
</ul>
1329+
13141330
Non-trivial changes since the <a href="https://www.w3.org/TR/2020/WD-css-cascade-4-20200818/">18 August 2020 Working Draft</a> include:
13151331

13161332
<ul class=non-normative>

css-cascade-5/Overview.bs

+12-4
Original file line numberDiff line numberDiff line change
@@ -1699,17 +1699,22 @@ Precedence of Non-CSS Presentational Hints</h3>
16991699
The UA may choose to honor presentational hints in a source document's markup,
17001700
for example the <code>bgcolor</code> attribute or <{s}> element in [[HTML]].
17011701
All document language-based styling must be translated to corresponding CSS rules
1702-
and either enter the cascade as [=UA-origin=] rules or
1703-
be treated as [=author-origin=] rules in their own [=cascade layer=]
1704-
placed as the lowest [=layer=] in the [=author origin=].
1702+
and enter the cascade as rules in either
1703+
the [=UA-origin=] or a special-purpose <dfn>author presentational hint origin</dfn>
1704+
between the regular [=user origin=] and the [=author origin=].
1705+
For the purpose of [=cascading=]
1706+
this [=author presentational hint origin=] is treated as an independent [=origin=],
1707+
but for the purpose of the ''revert'' keyword
1708+
it is considered part of the [=author origin=].
1709+
17051710
A document language may define whether such a presentational hint
17061711
enters the [=cascade=] as [=UA-origin=] or [=author-origin=];
17071712
if so, the UA must behave accordingly.
17081713
For example, [[SVG11]] maps its presentation attributes into the [=author origin=].
17091714

17101715
Note: Presentational hints entering the [=cascade=] as [=UA-origin=] rules
17111716
can be overridden by [=author-origin=] or [=user-origin=] styles.
1712-
Presentational hints entering the cascade as [=author-origin=] rules
1717+
Presentational hints entering the cascade as [=author presentational hint origin=] rules
17131718
can be overridden by [=author-origin=] styles,
17141719
but not by non-[=important=] [=user-origin=] styles.
17151720
Host languages should choose the appropriate origin for presentational hints
@@ -1867,6 +1872,9 @@ Changes since the 29 August 2021 Working Draft</h3>
18671872
* Revert the ordering of unlayered styles.
18681873
(See [[#changes-2021-06]] and
18691874
<a href="https://github.com/w3c/csswg-drafts/issues/6284">Issue 6284</a>)
1875+
* Defined presentational hints to use the [=author presentational hint origin=]
1876+
instead of layers, matching update to [[CSS-CASCADE-4]].
1877+
(<a href="https://github.com/w3c/csswg-drafts/issues/6659">Issue 6659</a>)
18701878

18711879
<h3 id="changes-2021-08">
18721880
Changes since the 8 June 2021 Working Draft</h3>

0 commit comments

Comments
 (0)