- From: Kang-Hao (Kenny) Lu <kennyluck@csail.mit.edu>
- Date: Thu, 29 Mar 2012 19:27:22 +0800
- To: Boris Zbarsky <bzbarsky@MIT.EDU>
- CC: "Marat Tanalin | tanalin.com" <mtanalin@yandex.ru>, WWW Style <www-style@w3.org>
(12/03/29 8:42), Boris Zbarsky wrote: > On 3/28/12 5:23 PM, Marat Tanalin | tanalin.com wrote: >> Currently, it's somewhat tricky to use `display: inline-block` to >> create gapless layout For your information, this was brought up[1] as a use case for 'text-space-collapse: discard;'. > Yes, that's one of the main motivators for the proposal. Do your have other use cases besides this one? Specifically, do we need a value that keeps whitespaces from getting dropped, esp. in 'table'/'inline-table'/'flexbox'/'inline-flexblox'? A scenario (not sure if I should call it a use case) would be: a Web Author wants to create empty cells (for padding maybe?) without typing as much as <td></td> and he/she would like to just type a space instead. The problem is, even if we have something like 'white-space-box: keep;' (strawman), it is still quite limited because you can't create two empty cells by typing two spaces. A weirder solution: we treat each whitespace as a 'table-cell' if 'white-space-box: keep;' is specified. (12/03/29 6:47), Boris Zbarsky wrote: > On 3/28/12 3:43 PM, Tab Atkins Jr. wrote: >> So this would control whether or not we throw away direct text-node >> children of an element. > > Whitespace-only text-node children. More precisely, some defintion of inter-element whitespace, as I don't think we want to remove a whitespace-only text-node between two non-whitespace text-nodes and CSS 2.1 doesn't seem to require UAs to normalize text nodes before other processing (correct me if I'm wrong here). Other thing, if we end up not dropping inter-element whitespaces unconditionally for flexboxes, 'text-space-collapse: discard;' as it is currently defined in CSS4 Text[2] doesn't work because it turns the whitespace into a zero width non-joiner (U+200C) (why, by the way?) and it would still generate an anoymous flexbox item, I presume. And again, 'text-space-collpase' is inheritable and it's not clear to me if that is better or we need something else. [1] http://lists.w3.org/Archives/Public/www-style/2011Jul/0538 [2] http://dev.w3.org/csswg/css4-text/#white-space-rules Cheers, Kenny
Received on Thursday, 29 March 2012 11:27:56 UTC