[css-break-4] Should margin-break apply to elements or fragmentation containers? · Issue #3314 · w3c/csswg-drafts (original) (raw)
In PDFreactor we have a property that works pretty much identically to margin-break
(with a more convoluted name):
https://www.pdfreactor.com/product/doc_html/index.html#css-property-ro-truncate-margin-after-break
https://drafts.csswg.org/css-break-4/#break-margins
There is, however, one major difference: Our property applies to the fragmentation containers.
Our reasons for this were:
- It avoids lists of selectors or universal selectors.
.columcontainer
instead of.columcontainer h1, .columcontainer h2, .columcontainer p
or.columcontainer *
and@page
instead ofhtml, body, h1, h2, p
or*
- It reduces complexity for both the implementers and authors. Nested break-adjoining elements with varying
margin
andmargin-break
values may result in hard-to-predict results, especially when the interaction with margin collapsing (e.g. in which order they are applied) is not obvious.
Of course, I understand that the finer granularity of the per-element approach may solve some complex cases, but, to be honest, I haven't been able to come up with any.
While we will, of course, implement the specification when it is mature, I would like to know your opinions on these two approaches.