W3C home > Mailing lists > Public > www-style@w3.org > July 2008

Re: <br> and generated-content

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 1 Jul 2008 11:17:28 -0500
Message-ID: <dd0fbad0807010917v41fa21fbr3e1e1c4f709318e6@mail.gmail.com>
To: "Boris Zbarsky" <bzbarsky@mit.edu>
Cc: "Daniel Glazman" <daniel.glazman@disruptive-innovations.com>, "www-style@w3.org" <www-style@w3.org>
On Tue, Jul 1, 2008 at 10:47 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

>
> Daniel Glazman wrote:
>
>> It's off-topic but since we deal with <br> here, I urge
>> browser vendors to fully support ::before and ::after on <br>.
>> This allows very simple effects like
>>
>> body[showBRs="true"] br::before {
>>  content: "\0000b6"; /*  */
>> }
>>
>
> So in a UA which implements <br> using generated ::before this would remove
> the line-break, and in a UA which implements <br> using generated ::after
> this would leave the line-break, right?
>
> And in a UA which treats <br> as a replaced element this may or may not do
> anything at all?
>
> I don't see anything wrong with requiring that <br> not be a replaced
> element, but that seems like an HTML decision, not a CSS one.
>
> -Boris
>
> Actually, it seems explicitly *not* an HTML decision.  HTML says that the
<br> element produces a line-break; it has *no* instructions on *how* to
produce this, nor should it.  Whether <br> is implemented with ::before,
::after, or as a replaced element (or in any other way) is completely the
domain of CSS.  This should be obvious merely from the fact that we're
wondering which *CSS selectors* apply to the element and how we can use
them.

Having <br>'s treatment under CSS be standardized across UAs is a worthwhile
goal as long as the element remains within html (and it likely always will,
as it does have semantic meaning).

~TJ
Received on Tuesday, 1 July 2008 16:18:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:10 GMT