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

Re: [css-display] Explaining <br>

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 24 Mar 2016 11:32:55 -0700
Message-ID: <CAAWBYDATM8AKseYO3uZGcfhCyF0_N_Wfqxyg+Rizag0=3e7_8g@mail.gmail.com>
To: www-style list <www-style@w3.org>
[abracadabra, this thread is NECRO'D!]

On Thu, Jun 12, 2014 at 4:05 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> At the January f2f, we figured out a decent hack that seems to explain
> the rendering of <br> properly:
>
> br {
>   display-box: contents;
>   content: "\a";
>   white-space: pre;
> }
>
> However, when Hixie was planning to add this to the HTML style sheet,
> dbaron objected to it on performance reasons:
> https://www.w3.org/Bugs/Public/show_bug.cgi?id=25503
>
> So, David, how bad is this?  Should we go with a different solution,
> like a dedicated 'display' value just for <br> (Hixie suggested
> "display: newline;" in the linked bug).

The HTML spec has had `display: newline` in its CSS section for quite
a while.  In addition, it's using `display: break-opportunity` to
explain the magic of <wbr>.

Unless the group decides that the above CSS is actually the best (and
can come up with something equivalent for <wbr>), I plan to add
"newline" and "break-opportunity" to the Display spec.  Any
objections?

~TJ
Received on Thursday, 24 March 2016 18:33:42 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:01 UTC