W3C home > Mailing lists > Public > www-style@w3.org > January 2015

[css-break] slicing content

From: Håkon Wium Lie <howcome@opera.com>
Date: Sat, 24 Jan 2015 23:47:28 +0100
Message-ID: <21700.8448.666570.708119@opera.com>
To: www-style@w3.org
Consider this test case:

  http://www.wiumlie.no/2014/tests/multicol-clip.html

which has three-column fixed-height elements with a tall image and some
large-font text; neither the image nor the large-font text fit into
the fixed-width element.

Webkit-derived implementations resolve this overconstrained situation
by slicing the image and the text into "stripes" that are placed in
different columns. The thinking is, presumably, that as much content
as possible should be visible.

Other implementations (I've tested IE, Mozilla, Presto, Prince,
Antenna House) move the tall content to the next column (since it
doesn't fit in the current column) and clips the content at the bottom
(due to overflow: hidden being set).

But, what do to the specs say? [css-multicol] doesn't say anything,
and rightly so. [css-break], on the other hand, lists rules for finding
possible break points:

  A) between sibling boxes..
  B) between line boxes..
  C) between content and child content..

  http://www.w3.org/TR/css3-break/#possible-breaks

Based on these rules, I conclude that neither line boxes nor images should be striped. 

However, the draft goes on to say:

  The UA is not required to fragment the contents of monolithic
  elements, and may instead either slice the element's graphical
  representation as necessary to fragment it or treat its box as
  unbreakable and overflow the fragmentainer. In both cases it must
  treat the element as having ‘break-inside: avoid’, i.e. only slice
  or overflow at the fragmentainer edge if there are no possible break
  points on the fragmentainer.

This text seems to contradict A/B/C by allowing break points to be added
inside (presumably monolithic) images. The above text doens't
explicitly allow break points inside line boxes, unless line boxes are
somehow regarded as monolithic elements.

So, I'd like to clarify where/if break points can be added inside line
boxes and images. 

My own suggestion would be to not allow them at all. It seems wrong to
display the upper half of a line in one column (or region, or page)
and the lower half on the next. And I'm sure many
designers/photographers would object to their images being sliced and
diced.

However, if do allow break points inside line boxes and/or images, we should
probably have a way of turning slicing off.

Cheers,

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome
Received on Saturday, 24 January 2015 22:47:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:51:56 UTC