Re: [csswg-drafts] [css-text-3] Line breaking with <br> handled differently. (#4658)

After some more testing, the behaviour of `<br>` can be fully defined by the existing CSS rules from issue 610 plus one additional rule - a break before a `<br>` element is not allowed.

I don't know how much appetite there is for this, but - if fully defining the behaviour of `<br>` in CSS is desirable - can I suggest a new property:

  `inline-break-before: avoid | auto`

which would determine if a break opportunity exists before the inline element it's applied on.

Setting this to "avoid" on a `<br>` would fully define the current behaviour. I know single-purpose properties are not wanted, but this would also be useful for several other situations:

* Currently a break opportunity exists between two replaced inlines or inline-blocks. This property, perhaps with a corresponding `inline-break-after`, would suppress the break opportunity without having to use additional markup to wrap the two elements with a `white-space: nowrap`.

* There are situations where generated content must be kept with the previous text, no matter what. I'm specifically thinking of [footnote call](https://www.w3.org/TR/css-gcpm-3/#footnote-call) in GCPM, but I'm sure there are others. As the content is generated, it won't always be practical to require markup that wraps both the content and its previous sibling with `white-space: nowrap`.



-- 
GitHub Notification of comment by faceless2
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4658#issuecomment-573814268 using your GitHub account

Received on Monday, 13 January 2020 18:52:27 UTC