Re: [CSS21][CSS3 Text] Re: Treating carriage return as white space in layout

On Wed, Sep 8, 2010 at 5:10 AM, Henri Sivonen <hsivonen@iki.fi> wrote:
> On Sep 8, 2010, at 10:22, fantasai wrote:
>
>>    # Newlines in the source can be represented by a carriage
>>    # return (U+000D), a linefeed (U+000A) or both (U+000D U+000A),
>>    # or by some other mechanism that identifies the beginning
>>    # and end of document segments, such as the SGML RECORD-START
>>    # and RECORD-END tokens. The CSS 'white-space' processing
>>    # model assumes all newlines have been normalized to line feeds.
>>
>>  Drop the last sentence. Add
>>
>>    | Any such newline representation is considered to be a <dfn>line
>>    | break character</dfn> in the CSS white space processing rules.
>>    |
>>    | CSS does not define how newlines are represented in the source.
>>    | In the absence of specific document language rules to the contrary,
>>    | all linefeeds (U+000A), carriage returns (U+000D), and CRLF sequences
>>    | (U+000D U+000A) in the source text are considered line break
>>    | characters.
>
> Is 'source text' a special term in CSS that means text in the document tree? I think 'source text' is confusing, because the whole point of my concern is that a carriage return doesn't appear literally in HTML (or XML) source but does appear in the resulting DOM.
>
> Can this be changed to talk about text in the document tree?

Not sure if it's explicitly defined, but yeah, it would be talking
about the document tree.  CSS never sees the literal HTML; that's a
layering violation.

~TJ

Received on Wednesday, 8 September 2010 14:58:12 UTC