- From: François REMY <francois.remy.dev@outlook.com>
- Date: Sat, 24 Nov 2012 12:42:17 +0100
- To: "Behrang Saeedzadeh" <behrangsa@gmail.com>, "W3C CSS Mailing List" <www-style@w3.org>
I completely agree with you on this. Sometimes, I forget to put the comments and I waste time looking at why my layout is not pixel perfect as I expected. This issue is already logged in CSS Text (level 3) as Issue #3: "There have been requests for the ability to "discard" white space; the current definition has no facility for this". To make it more formal, let's propose something like this: white-space: [ <old-values>? || <whitespace-trim>? ] white-space-trim: auto | trim | trim-line | preserve; white-space: trim; white-space between at the beginning and at the end of text nodes is ignored (aka textnodes are trimmed before rendering); any whitespace sequence inside a text node is substituted into a single white space (0x20) or nothing. white-space: pre trim-line; white-space between at the beginning and at the end of text nodes is ignored up to (and including) the first line break; any whitespace sequence inside a text node is preserved as is. The last one allows <pre> This sentence is the first and last line (now it's the second one out of three) </pre> From: Behrang Saeedzadeh Sent: Saturday, November 24, 2012 11:48 AM To: W3C CSS Mailing List Subject: Any plans to add a method for suppressing white space between inline-block elements? As you know, at the moment, in order to create a somehow readable HTML page, we either are forced to using comments or set the font-size of the parent element to 0 and set it back to 1rem or something similar: <div> <div>foo</div><!-- --><div>bar</div><!-- --><div>baz</div> </div> I think we need a more elegant way for suppressing white space (or any text) inside an element (and not its children) in CSS. Cheers, Behrang Saeedzadeh http://www.behrang.org
Received on Saturday, 24 November 2012 11:42:31 UTC