Re: [css-break] Breaking inside an inline-block element?

On 07/10/2013 05:16 PM, François REMY wrote:
> Hi,
>
> Can I please ask a clarification on the CSS Fragmentation spec?
>
> The "unforced break points" section states that Class 2 breakpoints
> are available "Between line boxes inside a block container box".
> My first question is: is an inline-block element a "block container
> box" or not?

Technically, yes.

> My second qusestion is:
>
> Provided you've a set of inline-block elements to be displayed in a
> multi-column layout, so that the inline-block elements have so tall
> lines they don't fit in any of the columns vertically, but are so
> few wide that multiple ones can find horizontally in one line if
> needed {see attached test case}...
>
> [ xxx yyy zzz |             ]
> [ xxx yyy zzz |             ]
> [ xxx yyy zzz |             ]
> [ xxx yyy zzz |             ]
> [ xxx yyy zzz |             ]
> [ xxx yyy zzz |             ]
> [ xxx yyy zzz |             ]
>    xxx yyy zzz
>    xxx yyy zzz
>    xxx yyy zzz
>    xxx yyy zzz
>
> ... if a browser choose to use a break point between the lines of one
> of the inline-block element, does that break point inside the
> inline-block element force all the other inline-block elements to be
> moved to the next column too (so that you can only see one inline-block
> element per column)...
>
> [ xxx         |     yyy     ] ...
> [ xxx         |     yyy     ] ...
> [ xxx         |     yyy     ] ...
> [ xxx         | xxx yyy     ] ...
> [ xxx         | xxx yyy     ] ...
> [ xxx         | xxx yyy     ] ...
> [ xxx         | xxx yyy     ] ...
>
>
> ... or can the browser make the assumption that the break point inside
> the inline-block is only valid for that particular inline-box and
> therefore display the sibling inline-box elements.
>
> [ xxx yyy zzz | xxx yyy zzz ]
> [ xxx yyy zzz | xxx yyy zzz ]
> [ xxx yyy zzz | xxx yyy zzz ]
> [ xxx yyy zzz | xxx yyy zzz ]
> [ xxx yyy zzz |             ]
> [ xxx yyy zzz |             ]
> [ xxx yyy zzz |             ]

I think breaking within an inline-block is very poorly understood by
the specs at this time. One of the interesting complications is that
a breakpoint within an inline block is by definition inside a non-
breakable unit (the line box). Another is that baseline alignment
of inline blocks can create some weird situations when fragmentation
of one box causes its height to increase. You could get an unsolveable
situation if the breakpoints don't line up across inline-blocks within
a line.

I'm not really sure what to do here. I could try to define how
inline-blocks break (and make them similar to table cells in that
regard). But then there's the question of how the suppression of
breaking within a line box plays in with that. Right now breaking
in or between table rows is not suppressed in any way, but for
inline blocks it might have to be.

~fantasai

Received on Monday, 13 January 2014 23:29:51 UTC