CSS highlight pseudo-elements representing text that the UA has flagged as misspelled or grammatically incorrect, and text-decoration-line property values representing the UA's default decorations for spelling mistakes and grammar mistakes. This features includes the implementation of two pseudo-elements: ::spelling-error and ::grammar-error; and two new values for the text-decoration-line property: spelling-error and grammar-error.
Motivation
Authors should be able to customise the appearance of spelling/grammar mistakes. For example, the UA’s default colour for a mistake might be of inadequate contrast with some background colours. The pseudo-elements would enable this, while the text-decoration-line values would allow the UA stylesheet to express the default decoration, as well as allow authors to decorate other text as if it was a spelling/grammar mistake (e.g. for a custom spell checker).
Demo
Specification
Status in Chromium
No active development (tracking bug)
Consensus & Standardization
Owners
Last updated on 2021-01-07