#913: CSS Spelling and Grammar Customization

Visit on Github.

Opened Nov 3, 2023

こんにちは TAG-さん!

I'm requesting a TAG review of CSS ::spelling and ::grammar pseudo classes, and the text-decoration-line: spelling/grammar-error property values.

CSS highlight pseudo-elements allow developers to style text that the UA has flagged as misspelled or grammatically incorrect, and line decorations exposing the UA’s default decorations for spelling and grammar errors. These features allow authors to choose more legible colors for the default spelling and grammar errors, highlight misspelled words with background colors or other decorations, and implement custom spell checking with native appearance. For example, authors may customize the appearance of spelling/grammar mistakes when the UA’s default color for a mistake has inadequate contrast with the background color.

Further details:

  • [Yes] I have reviewed the TAG's Web Platform Design Principles
  • Relevant time constraints or deadlines: WebKit are currently implementing, chromium wants to ship it.
  • The group where the work on this specification is currently being done: CSS
  • Major unresolved issues with or opposition to this specification: None
  • This work is being funded by: Bloomberg

You should also know that...

These features have been enabled under experimental web platform features in chromium since August 2022, and I'm only requesting review now because there's an Intent to Ship and it was discovered that no TAG review was ever done.

We'd prefer the TAG provide feedback as (please delete all but the desired option):

💬 leave review feedback as a comment in this issue and @-notify [schenney-chromium]

Discussions

2023-11-13

Minutes

Peter: maybe we can fast-track.

2023-11-20

Minutes

Peter: spelling and grammar already exist - so this is about highlighting text without modifying the DOM... custom highlight ...

Dan: So maybe it should be called "custom highlights" ?

Peter: the explainer is just talking about the highlight API...

some discussion

Peter: I don't think the explainer goes into it...

Dan: should we close this?

Peter: custom styling...

Amy: it's in the open questions... overrides...

Peter: that might be for overlapping -- when you have a highlight and spelling error which one wins? You can have 2 highlights that are overlapping... what do you do with that?

Dan: I think we should leave it up to them....

Peter: yeah.

<blockquote> Hi @schenney-chromium - thanks for the opportunity to review this. We're happy to see this proceed. ✨✨ </blockquote>

agreed and closed with satisfied

2023-11-20

Minutes

Amy: my question - shouldn't the user agent be in charge of picking a color?

Yves: in the explainer it talks about range... but not specification of different types of ranges... the ranges should be indicated in some way...

Dan: let's talk more about this at the plenary