In code listings, text input examples, text editors and similar it can be important to display whitespace characters unambiguously. There are a number of Unicode characters available, e.g. centered dot ·
or open box ␣
(␣
), some are even specifically intended for this purpose in one context or the other, e.g. space control symbol ␠
and blank input symbol ␢
.
Tabulators and line breaks are often shown as arrows →
/ ⇥
and ↩︎
/ ↵
/ ↲
.
As far as I know, there currently is no CSS way to display alternate glyphs for whitespace. Assuming it should be possible, which existing or new property (and hence module) would be the right place?
pre, code, textarea.showinvisibles {
white-space: pre-visible;
font-variant-alternates: visible-controls; /* high level, assumes support by the font (format) */
font-feature-settings: "vwsp" 1; /* low level, assumes support by the font (format) */
text-transform: visible-whitespace;
}