Re: [csswg-drafts] [css-pseudo-4] Proposal: Highlight API (#4307)

Just in case: I've implemented highlights in [Sciter engine](https://sciter.com) 3 years ago and have quite possitive experience with them so far.

Primary usage: spell checker highlights and  syntax colorization.

The only major difference from the Highlight API spec is that I am using `::mark(...)` pseudo element  rather than `::highlight(...)`

Yet it would be very benificial I think to allow `::highlight(...)` to be applied to content of <textarea> and <input> elements:
```
textarea::mark(number) { color: brown; }
textarea::mark(number-unit) { color: brown; }
textarea::mark(string) { color: teal; }
textarea::mark(keyword) { color: blue; }
textarea::mark(symbol) { color: brown; }
textarea::mark(literal) { color: brown; }
textarea::mark(comment) { color: green; }
```
So these can be used as code editors.

Some details and samples:

- https://sciter.com/tokenizer-mark-syntax-colorizer/
- https://sciter.com/mark-feature-is-comming/



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

Received on Saturday, 5 October 2019 01:24:48 UTC