Contact emails
mste...@opera.com
Spec
https://drafts.csswg.org/css-break-3/#breaking-controls
Summary
Add support for the modern fragmentainer break controlling properties
break-after, break-before and break-inside. Currently, Blink only
supports page-break-{after,before,inside} for printing and
-webkit-column-break-{after,before,inside} for multicol. Additionally,
the current state of the foo-break-after and foo-break-before properties
support in Blink is limited. Most importantly, there's no support for
the "avoid" value.
These new properties are meant to unify how breaks are controlled in any
type of fragmentation context - paged media (printing), multicol, and
CSS regions (which Blink doesn't support).
The CSS fragmentation spec says that the CSS 2.1 properties
page-break-after, page-break-before and page-break-inside are shorthands
for their corresponding generic break-after, break-before and
break-inside counterparts. I indend to do the same for the
-webkit-column-break* properties.
Motivation
The web deserves clean and fully functional generic fragment break
controlling properties!
Currently, the only thing that works in an rather interoperable way,
without vendor prefixes, is the properties for page breaking
(page-break-after, page-break-before, page-break-inside). Useful for
printing.
For multicol, the situation is much worse. It's a prefix soup. We have
desperate attempts like this on the web:
"break-inside:avoid-column; -moz-break-inside:avoid-column;
column-break-inside:avoid; -webkit-column-break-inside:avoid;
-moz-column-break-inside:avoid; -o-column-break-inside:avoid;"
-moz-break-inside, -moz-column-break-inside, -o-column-break-inside:avoid
have never been supported by anyone, AFAIK.
The various layout engines also generally have limited support for the
properties that they recognize. Mozilla has very limited support (it
seems to only support page-break-inside:avoid in a multicol
context!). Apart from that, only automatic breaking in Mozilla. MSIE has
partial support for the modern properties (break-after, break-before and
break-inside), while Blink and WebKit have partial support for prefixed
properties. Only the following declarations are currently supported:
-webkit-column-break-after: auto | always;
-webkit-column-break-before: auto | always;
-webkit-column-break-inside: auto | avoid;
(note that the column-break-foo properties are not defined in any spec,
but I suppose they must have been at some point in history)
There's no way in Blink to specify that breaks should be avoided before
or after a block, for instance. One would think that authors generally
would very much like to avoid breaking between a header block and the
first paragraph of the chapter, for instance.
Interoperability and Compatibility Risk
Low risk.
These properties are currently partially supported by IE (and to a
fuller extent, by Presto).
Since this change is about funneling everything into break-after,
break-before and break-inside, and treating everything else as
shorthands for those, declaration sequences like this:
"-webkit-column-break-inside:avoid; page-break-inside:auto;"
will work differently compared to how it works now.
-webkit-column-break-inside:avoid will map to break-inside:avoid, but it
will be overwritten by the page-break-inside:auto, which will map to
break-inside:auto. I don't expect that to me much of an issue, though.
According to httparchive, break properties in any form (*break-after,
*break-before, *break-inside) are used on 25.99% of the sites. A
majority of the sites only use page-break-* properties. Filtering out
those, we're left with 2.17% of all sites that use the other break
properties (vendor-prefixed + the generic ones (break-after,
break-before and break-inside)).
The generic break-after, break-before and break-inside properties are
used on 1.38% of all sites. They typically occur alongside with prefixed
properties for column breaking; e.g.:
"-webkit-column-break-inside:avoid; -moz-column-break-inside:avoid;
break-inside:avoid-column;"
Ongoing technical constraints
None
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes.
OWP launch tracking bug
https://crbug.com/223068
Link to entry on the feature dashboard
https://www.chromestatus.com/feature/5630943616303104
Requesting approval to ship?
No.
--
---- Morten Stenshorne, developer, Opera Software ASA ----
------------------
http://www.opera.com/ -----------------