W3C home > Mailing lists > Public > www-style@w3.org > September 2010

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 8 Sep 2010 07:56:44 -0700
Message-ID: <AANLkTi=2wQXO_nBU_EQFWrkDGDJkat3VE=p7ue7C7ARG@mail.gmail.com>
To: Henri Sivonen <hsivonen@iki.fi>
Cc: fantasai <fantasai.lists@inkedblade.net>, www-style@w3.org
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.

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:49:47 UTC