W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2014

Re: [whatwg] HTML spec incorrectly suggests that <br> can have its rendering changed with CSS

From: Stewart Brodie <stewart.brodie@antplc.com>
Date: Thu, 23 Jan 2014 11:16:40 +0000
To: <whatwg@whatwg.org>
Message-ID: <gemini.mzupzs00ang0g0fig.stewart.brodie@antplc.com>
Daniel Holbert <dholbert@mozilla.com> wrote:

> So: to reflect reality, it might be better to specify <br> in a way that
> doesn't suggest it's as customizable with CSS. (for the "white-space"
> property in particular, but probably others as well)
> 
> For reference, here's a page with a few testcases:
>   http://people.mozilla.org/~dholbert/tests/br-tests.html
> The browsers that I tested[1] all agree on the rendering (basically, not
> honoring any of the <br> styling), with one minor exception[2].
> 
> Thanks,
> ~Daniel
> 
> [1] I tested the following browsers:
>  Firefox 26
>  Opera 12.16
>  Chrome 34.0.1788.0 dev
>  IE 11

> [2] I only noticed one rendering difference -- IE11 honors "border" on
> <br>, unlike the other browsers that I tested. (It still doesn't honor
> e.g. "display"/"width"/"height", though.)


I get different results on your test case for the bottom two tests.  In
Chrome 33 and Opera 12.16 (Linux), there is a line break; in Firefox 26
there isn't.

This matches a fault report that we had from a customer a few years about a
page that didn't lay out properly in our browser (but did in Opera) that I
tracked down to being that we permitted br elements to be styled, just like
Firefox (26.0) does.  I've put a suitably anonymised version of the test
case on my own website:

     http://www.metahusky.net/~stewart/css/br/br-rendering.html

And yes, the real page really did have the first line of its stylesheet as:

     * { position: absolute; margin: 0px; float: left }


-- 
Stewart Brodie
Team Leader - ANT Galio Browser
ANT Software Limited
Received on Thursday, 23 January 2014 11:17:21 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:15 UTC