[csswg-drafts] [css-text] Show invisible characters (#8874)

Crissov has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-text] Show invisible characters ==
Especially for rendering source code and editing text, non-printing whitespace and control characters should optionally be shown ”with ink“. 

Although these sometimes use a deemphasized, grayish color, I think this would best be done within [`text-transform`](https://drafts.csswg.org/css-text-4/#text-transform-property) or perhaps even in a new sub-property. Since [`@text-transform`](https://specs.rivoal.net/css-custom-tt/) has not gotten anywhere yet, I‘m proposing new bikesheddable values:

- `visible-spaces`: show U+0020 SPACE as middle dot, U+0009 HORIZONTAL TABULATOR as right arrow (at least in LTR contexts), and perhaps more, especially from U+2000…6F
- `visible-keys`: show U+0020 SPACE as U+2423 ␣
- `visible-controls`: show C0 control codes, i.e. U+0000…20 and U+007F (but _not_ C1, U+0080…9F) as their respective Control Picture from U+2400…21, e.g. ␠
- `visible-whitespace`: show U+0009…0D, U+001C…1F and U+0085 as …
- `visible-breaks`: show CR and LF as PARAGRAPH SIGN, and LINE BREAK as arrow, keep their line breaking behavior
- `visible-lines`: show CR, LF and CR+LF as U+2424 ␤

<!--Where `text-space-collapse: collapse`, i.e. with `white-space: normal` or `nowrap`, or `preserve-breaks`, i.e. `pre-line`, -->

PS: It is quite possible this was discussed before, but I could not find a respective issue, so it might have been only on www-style long ago.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8874 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 25 May 2023 05:59:55 UTC