[css-highlight-api] Should ::highlights be printed?

Open
#7,499 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
css
Domain
documentation

Research direction

Start by reviewing the CSS Highlight API specification and its treatment of ::selection and ::target-text. Resolve whether ::highlight styles should appear in printed documents, considering semantic highlights versus find-on-page or spellcheck use cases, then clarify the decision in the spec.

Written by the indexing model from the issue text.

Description

css-highlight-api-1

Highlight pseudos are currently not printed, at least in the Chromium implementation.

Considering other pseudos like ::selection and ::target-text, it makes sense for these not to show up on printed documents. But for ::highlight it's less clear. Highlights used for emphasizing parts of the text might be appropriate to print. In some applications highlights could convey specific semantic value, e.g. a language-teaching application might use differently-colored highlights to demonstrate which parts of a sentence are verbs vs adverbs vs adjectives, etc. The user would likely expect these highlights to be printed.

On the other hand, highlights used for custom find-on-page or spellcheck probably shouldn't be printed.

Whatever we decide, we should probably add some clarity about this to the spec.

Thanks @mrego for raising this point.

Dominant language
Bikeshed
Stars
4.9k
Forks
816
Avg merge
2d 18h
Merged PRs (30d)
24

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from w3c/csswg-drafts

All issues in w3c/csswg-drafts

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.