W3C home > Mailing lists > Public > www-style@w3.org > April 2013

[CSS21] Missing whitespace processing step for 'nowrap'

From: Simon Sapin <simon.sapin@exyr.org>
Date: Thu, 11 Apr 2013 18:35:57 +0200
Message-ID: <5166E66D.2080007@exyr.org>
To: www-style list <www-style@w3.org>
Hi,

WeasyPrint 0.18 implements the 'white-space' processing model exactly as 
described in 16.6.1, but fails this test: (The text wraps and some red 
is visible.)

http://test.csswg.org/suites/css2.1/20110323/html4/blocks-018.htm

Indeed, at no point is 16.6.1 is 'nowrap' treated differently from 
'normal'. I think that a step is missing in the algorithm.

Proposed change: after step 4.2 quoted here:
> 2. any space (U+0020) following another space (U+0020)  even a space
> before the inline, if that space also has 'white-space' set to
> 'normal', 'nowrap' or 'pre-line'  is removed.

 add a new 4.3 step:
> 3. If 'white-space' is set to 'nowrap', any remaining space (U+0020)
> is treated as a non-breaking spaces.


This change matches the description of 'nowrap' in 16.6, and makes 
WeasyPrint pass the test.

-- 
Simon Sapin
Received on Thursday, 11 April 2013 16:36:23 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:10 UTC