W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2019

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

From: Andrew via GitHub <sysbot+gh@w3.org>
Date: Sat, 05 Oct 2019 01:24:47 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-538604436-1570238686-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:54 UTC