W3C home > Mailing lists > Public > www-style@w3.org > March 2009

RE: [css-gcpm] order of text replace vs. whitespace processing

From: Ludger Buenger <ludger.buenger@realobjects.com>
Date: Tue, 31 Mar 2009 18:41:03 +0200
Message-ID: <96458C389BF1724995FFD7FAD889263722D517@ex.nc-sb.de>
To: <www-style@w3.org>

Also sprach Håkon Wium Lie:

> I'm open for proposals to change the text on this issue. I am,
> however, worried about imposing constraints on implementations that
> would otherwise not be there.
> 
> When you say 'whitespace' processing, do you refer to the
> 'white-space' property?

I am referring to the time when the algorithm defined in the chapter "white space processing" http://www.w3.org/TR/css3-text/#white-space-processing is applied to a range of text.



Also sprach MURAKAMI Shinyu:
> 
> I think that the text-replace should be applied to the result of the
> white-space processing. Consider the following example:
> 
>     p { text-replace: "Soviet Union" "Russia"; }
> 
>    The following two paragraphs should be same (Hello Russia):
>     <p>Hello Soviet Union!</p>
>     <p>Hello Soviet
>      Union!</p>


Actually, my expectation was to apply it before white space processing.

Imagine the following (non-sense) example:

p { white-space-collapse: collapse;
    text-replace: "HTML" "CSS ";  /* please note the additional white space behind 'CSS' */
}

<p>HTML<u> rulez</u></p>

Using this example I feel there shouldn't be two white spaces between 'CSS' and 'rulez' since we defined white spaces to collapse in the first place.


Therefore this is what our implementation (RealObjects PDFreactor) currently does.
But I think, we can agree, that the current draft(s) do not define this.

Best regards,

Ludger
Received on Tuesday, 31 March 2009 16:41:44 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:17 GMT