Re: [csswg-drafts] [css-highlight-api] Can errors that trigger `::grammar-error` styling be created programmatically? (#6526)

Mmm, ,would [`text-decoration-line: spelling|grammar-error`](https://drafts.csswg.org/css-text-decor-4/#text-decoration-line-property) be good enough for this?

Note that the rendering of `text-decoration: wavy red underline;` is pretty different than how a spelling error is rendering in browsers. Also on Mac spelling errors are more like `text-decoration: dotted red underline` but still they're not exactly the same (codepaths are different).

![Screenshot comparing the rendering of wavy underlines with spelling error in Chromium and Firefox on Linux, and also dotted underline and spelling error on Safari on Mac](https://user-images.githubusercontent.com/11602/135423131-59170815-4cc5-4203-a83b-9c4ab2ad3445.png)


PS: Kind of off-topic, but I'm not able to see any grammar error on browsers these days, only spelling errors appear on editable elements (maybe I haven't tested some browser and OS combination, but I did some tests with Chrome, Edge, Safari and Firefox). Anyway the web engines have still the machinery to support this, but it seems it's not being triggered.


-- 
GitHub Notification of comment by mrego
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6526#issuecomment-931100043 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 30 September 2021 09:08:56 UTC