Re: [css-break] slicing content

On 01/24/2015 05:47 PM, Håkon Wium Lie wrote:
> 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.
> [...]
>
>    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.

They're not really fragmentation break opportunities in the sense that
the layout will reflow around the break, but it is allowed to "break"
the content by slicing it if it won't otherwise fit on a single page.

> 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.

We discussed both options and concluded that it's better to default to
"no dataloss". In some cases (say, an illustrative photograph), it's
not a big deal if half the image doesn't show up. But in others (a
graph, a map, a diagram) it's much more important that the image be
entirely present, even if it is broken across two pages because it
won't fit on one page.

(We do require that you try to keep it together, just as if break-inside:
avoid had been specified! So the break will only be introduced if there
would otherwise be dataloss. If you can push it to the next page and not
introduce a break, then you must do that.)

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

Perhaps a 'break-inside: forbid' value? That would prevent breaking and
require the item to clip at the edge of the fragmentainer? My concern
is that in most cases where we are running into this problem, it's because
the author didn't think about their design very carefully. For example,
s/he could have specified

   @media print {
      max-height: 100vh;
      max-width: 100vh;
   }

in order to make sure the item fits on a page. Or do something else.
I'm having trouble thinking of a case where the author would actually
want the image to clip at some random point depending on the paper/
ereader/screen size.

~fantasai

Received on Sunday, 25 January 2015 02:55:37 UTC