Skip to content

Commit 543c040

Browse files
committed
[css-pseudo-4] Set text-shadow: none on root ::selection. Fix ::spelling-error/::grammar-error rules to also use :root::pseudo pattern for proper overrideability. #3605
1 parent cc43a39 commit 543c040

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

css-pseudo-4/Overview.bs

+5-2
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,11 @@ Selecting Highlighted Content: the ''::selection'', ''::inactive-selection'', '
464464

465465
The following addition is made to the default UA stylesheet:
466466
<pre><code class="lang-css">
467-
::spelling-error { text-decoration-line: spelling-error; }
468-
::grammar-error { text-decoration-line: grammar-error; }
467+
/* Represent default spelling/grammar error styling in an adjustable way */
468+
:root::spelling-error { text-decoration-line: spelling-error; }
469+
:root::grammar-error { text-decoration-line: grammar-error; }
470+
/* Ensure contrast on text with shadows */
471+
:root::selection { text-shadow: none; }
469472
</code></pre>
470473

471474
Note: A future level of CSS may introduce ways to create

0 commit comments

Comments
 (0)