S
S
Sweet Cookies2018-04-17 17:14:25
css
Sweet Cookies, 2018-04-17 17:14:25

User agent stylesheet and spelling error color?

Friends, an unusual question is how to change the color of a spelling error in chrome, unfortunately chrome does not have classes to override the wavy underline orph. errors, it looks like this thing works on api?
where to dig, explain the mechanism, if possible?
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Bogachev, 2018-04-17
@sfi0zy

In the distant bright future, most likely we will have ::spelling-error and ::grammar-error pseudo-elements , we will override the standard underline from CSS. At the moment, nothing can be done so simply from CSS.
In the developer version of Chrome, there is a chrome.automation API , in which, in theory, using the getTree () method, you can get some kind of tree similar to the DOM, but in fact it is not, and again, in theory, it should have elements of the AutomationNode type for words that are misspelled and have some properties like color and underlining. I myself have never used it, but intuition tells me that it is worth digging in this direction.
PS: If you need a solution for the site "here and now", then I think it would be better to completely disable the spell check from the browser side and insert a custom one instead, there are ready-made solutions on the network.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question