Skip to content

Commit

Permalink
Clarify text decorations in ::spelling-error and ::grammar-error
Browse files Browse the repository at this point in the history
Issue w3c#9233
Add a note for authors on the requirements for custom text-decorations inside ::spelling-error pseudo (and grammar).
  • Loading branch information
schenney-chromium authored Nov 25, 2023
1 parent 5ae7930 commit 1b8a41a
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions css-pseudo-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,15 @@ Default UA Styles</h3>
:root::grammar-error { text-decoration-line: grammar-error; }
</pre>

Note: According to the 'text-decoration' specification, when the
'text-decoration-line' property is given with a value of 'spelling-error' or
'grammar-error', the UA is required to ignore other text-decoration
properties and render the default UA spelling or grammar highlight.
Given the recommended UA stylesheet properties above for '::spelling-error' and
'::grammar-error', this means you must explicitly provide a different
'text-decoration-line' value inside '::spelling-error' or '::grammar-error'
to render custom text decorations for spelling and grammar errors.

Some [=highlight pseudo-elements=]
should have <dfn>paired default highlight colors</dfn>--
a default 'color' and 'background-color'
Expand All @@ -755,11 +764,6 @@ Default UA Styles</h3>
or transitioning out a highlight style based on user interactions or timing.
These are not controlled by CSS.

ISSUE: UA tweaks to the presentation of highlights
in ways that <em>are</em> controlled by CSS
are currently under discussion
in <a href='https://github.com/w3c/csswg-drafts/issues/6853'>Issue 6853</a>.

<h4 id="paired-defaults">
Paired Defaults</h4>

Expand Down

0 comments on commit 1b8a41a

Please sign in to comment.