Re: [css-display] Explaining <br>

[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