Chromium spelling and grammar features
Publikováno: 29.6.2021
Delan Azabani digs into the (hopefully) coming soon ::spelling-error
and ::grammar-error
pseudo selectors in CSS. Design control is always nice. Hey, if we can style scrollbars and style selected text, why not this?
The squiggly lines that indicate possible spelling or grammar errors
…
The post Chromium spelling and grammar features appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.
Delan Azabani digs into the (hopefully) coming soon ::spelling-error
and ::grammar-error
pseudo selectors in CSS. Design control is always nice. Hey, if we can style scrollbars and style selected text, why not this?
The squiggly lines that indicate possible spelling or grammar errors have been a staple of word processing on computers for decades. But on the web, these indicators are powered by the browser, which doesn’t always have the information needed to place and render them most appropriately. For example, authors might want to provide their own grammar checker (placement), or tweak colors to improve contrast (rendering).
To address this, the CSS pseudo and text decoration specs have defined new pseudo-elements
::spelling-error
and::grammar-error
, allowing authors to style those indicators, and newtext-decoration-line
valuesspelling-error
andgrammar-error
, allowing authors to mark up their text with the same kind of decorations as native indicators.
This is a unique post too, as Delan is literally the person implementing the feature in the browser. So there is all sorts of deep-in-the-weeds stuff about how complex all this is and what all the considerations are. Kinda like, ya know, web development. Love to see this. I’ve long felt that it’s weird there is seemingly such little communication between browser engineers and website authors, despite the latter being a literal consumer of the former’s work.
Direct Link to Article — Permalink
The post Chromium spelling and grammar features appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.