Skip to content

Commit 82c63d5

Browse files
committed
[css-pseudo-4] Fix broken example. :(
1 parent 5dbeb6a commit 82c63d5

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

css-pseudo-4/Overview.bs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -592,21 +592,22 @@ Cascading and Per-Element Highlight Styles</h3>
592592
<div class="example">
593593
For example, if an author specified
594594
<pre>
595-
::selection { background: blue; }
596-
p.warning { background: red; }
595+
::selection { background: blue; }
596+
p.warning::selection { background: red; }
597597
</pre>
598598
and the document included
599599
<pre>
600600
&lt;p class="warning">Some &lt;strong>very important information&lt;/strong>&lt;/p>
601601
</pre>
602-
The highlight would be blue around “very important information”
602+
The highlight would be blue over “very important information”
603603
because the <code>&lt;strong></code> element´s ''::selection''
604604
also matches the ''::selection { background: blue; }'' rule.
605605
(Remember that ''*'' is implied when a tag selector is missing.)
606-
The style rules that would give the intended behavior are
606+
The style rules that would give the intended behavior
607+
(red highlight within <code>p.warning</code>, blue elsewhere) are
607608
<pre>
608-
:root::selection { background: blue; }
609-
p.warning { background: red; }
609+
:root::selection { background: blue; }
610+
p.warning::selection { background: red; }
610611
</pre>
611612
</div>
612613

0 commit comments

Comments
 (0)