[csswg-drafts] Line breaking with <br> handled differently. (#4658)

faceless2 has just created a new issue for https://github.com/w3c/csswg-drafts:

== Line breaking with <br> handled differently. ==
I thought by now I had the humble `<br>` element pretty well understood, but apparently not. Please take a look at https://jsbin.com/jupalic/edit?html,css,output

I'm adding a forced line break (a preserved newline character) after an inline that has already overflowed the line - the question is, do I get one line break or two?

It seems that the `<br>` element has some special properties I can't reproduce with any other element, as implemented in Chrome/Firefox/Safari anyway. If I follow the overflowing content with a `<span>`, it will begin on a new line (as it should), and I get two line breaks. But if I follow the overflowing content with a `<br>`, it is not moved to a new line before being applied, and I get one line break.

The behaviour of `<br>` should be entirely determined by CSS according to #610, so I think this is an issue. It might be there is some special HTML rule here that I've missed, although I tested with XHTML and got the same result.

Note test B gives different results in Gecko and Blink - the difference appears to be whether the break opportunity before an item of zero width (the left edge of the span) is taken.


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4658 using your GitHub account

Received on Thursday, 9 January 2020 11:36:10 UTC