Re: [csswg-drafts] [selectors] What a whitespace character is (#3754)

The issue was about aligning the definitions of white space across CSS, HTML, and Selectors. These definitions are not currently aligned: there are two

- [Infra spec's “ASCII white space”](https://infra.spec.whatwg.org/#ascii-whitespace), which is used for syntactic white space - currently U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, or U+0020 SPACE
- CSS Text’s [“document white space”](https://www.w3.org/TR/css-text-3/#white-space), which is used for formatting, currently spaces (U+0020), tabs (U+0009), and segment breaks (which are defined roughly equivalent to "line feeds and whatever else the host language thinks is a newline").

There was a point during which these two sets of characters were aligned. However, because HTML parsing converts various segment break sequences to line feeds in the DOM, it was decided that carriage returns in CSS should be treated like miscellaneous formatting control characters, not as white space. Likewise form feeds. See https://github.com/w3c/csswg-drafts/issues/1990 and https://github.com/w3c/csswg-drafts/issues/855

Currently the definition of `:empty` references “document white space”. Form feeds do not currently qualify as “document white space”, and neither do carriage returns. They are to be rendered as visible control characters. Thus the original premise of that thread, that the various definitions of white space should be aligned, is not satisfied.

-- 
GitHub Notification of comment by fantasai
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3754#issuecomment-493106550 using your GitHub account

Received on Thursday, 16 May 2019 15:05:49 UTC