[css-pseudo-4] Should highlights paint for Control Characters, esp. tab
@schenney-chromium is already working on this.
Since Jun 25, 2026.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 24
Description
I believe the spec should be explicit about which, if any, ASCII control characters should be potential targets of highlight pseudos. For reference, the CSS Text Decorations spec says "Characters belonging to the Unicode classes for control codes and unassigned characters (Cc, Cf, Cn) are skipped...". That includes tabs.
However, chromium does paint tabs for selection, and has a bug (or feature) that it will draw underlines and highlights for tab characters when used in ::selection.
I see 2 possible resolutions:
- Adopt the Text Decoration behavior for highlights and make ::selection that uses such features follow the same rules.
- Special case the tab character as a control character that text decorations and highlights do apply to.
I don't think the behavior for text decorations and highlight should be different, given that text decorations can be used as highlights.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.