File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -592,21 +592,22 @@ Cascading and Per-Element Highlight Styles</h3>
592
592
<div class="example">
593
593
For example, if an author specified
594
594
<pre>
595
- ::selection { background: blue; }
596
- p.warning { background: red; }
595
+ ::selection { background: blue; }
596
+ p.warning::selection { background: red; }
597
597
</pre>
598
598
and the document included
599
599
<pre>
600
600
<p class="warning">Some <strong>very important information</strong></p>
601
601
</pre>
602
- The highlight would be blue around “very important information”
602
+ The highlight would be blue over “very important information”
603
603
because the <code> <strong></code> element´s ''::selection''
604
604
also matches the ''::selection { background: blue; }'' rule.
605
605
(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
607
608
<pre>
608
- :root::selection { background: blue; }
609
- p.warning { background: red; }
609
+ :root::selection { background: blue; }
610
+ p.warning::selection { background: red; }
610
611
</pre>
611
612
</div>
612
613
You can’t perform that action at this time.
0 commit comments