Skip to content

Commit 3a34c44

Browse files
committed
[css-pseudo] Switch example to use a non-inherited property for cascaded-inheritance.
1 parent a2818cf commit 3a34c44

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

css-pseudo/Overview.bs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -541,16 +541,16 @@ Cascading and Per-Element Highlight Styles</h3>
541541
<div class="example">
542542
For example, if the following rules were applied:
543543
<pre>
544-
p::selection { background: red; color: yellow; }
545-
em::selection { background: green; }
544+
p::selection { background: green; color: yellow; }
545+
em::selection { color: orange; }
546546
</pre>
547547
to the following markup:
548548
<pre>
549549
&lt;p>Highlight this <em>and this</em>.&lt;/p>
550550
</pre>
551-
The highlighted would be yellow throughout,
552-
with a red background outside the <code>&lt;em></code> element
553-
and a green background inside it.
551+
The highlight would be green throughout,
552+
with a yellow text outside the <code>&lt;em></code> element
553+
and a orange text inside it.
554554
</div>
555555

556556
Issue: This could alternately be described in terms of inheritance.

css-pseudo/Overview.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,8 +1021,8 @@ <h3 class="heading settled" data-level="3.3" id="highlight-cascade"><span class=
10211021
<div class="example">
10221022
For example, if the following rules were applied:
10231023

1024-
<pre>p::selection { background: red; color: yellow; }
1025-
em::selection { background: green; }
1024+
<pre>p::selection { background: green; color: yellow; }
1025+
em::selection { color: orange; }
10261026
</pre>
10271027

10281028

@@ -1033,9 +1033,9 @@ <h3 class="heading settled" data-level="3.3" id="highlight-cascade"><span class=
10331033
</pre>
10341034

10351035

1036-
<p>The highlighted would be yellow throughout,
1037-
with a red background outside the <code>&lt;em></code> element
1038-
and a green background inside it.</p>
1036+
<p>The highlight would be green throughout,
1037+
with a yellow text outside the <code>&lt;em></code> element
1038+
and a orange text inside it.</p>
10391039

10401040

10411041
</div>

0 commit comments

Comments
 (0)