Re: [css-flexbox] feedback

On 06/10/2014 04:01 PM, Cory Brown wrote:
> Even attempting
> to create some JavaScript that will do this has been a big challenge
> since there doesn't seem to be a straight-forward way to force a row
> break between flex-items.

FWIW, the "page-break-before"/"page-break-after" properties should let
you force wrapping to happen at a particular point, though I'm not sure
that behavior is implemented in all browsers right now.

Spec reference:
 # A break is forced wherever the CSS2.1
 # page-break-before/page-break-after [CSS21] or
 # the CSS3 break-before/break-after [CSS3-BREAK]
 # properties specify a fragmentation break.
http://dev.w3.org/csswg/css-flexbox/#algo-line-break

Testcase/reference (works in Firefox, but doesn't seem to work in Blink):
http://mxr.mozilla.org/mozilla-central/source/layout/reftests/w3c-css/submitted/flexbox/flexbox-break-request-horiz-1a.html
http://mxr.mozilla.org/mozilla-central/source/layout/reftests/w3c-css/submitted/flexbox/flexbox-break-request-horiz-1-ref.html

(The last 3 dashed boxes on the second row there are the cases where I
believe a not-otherwise-necessary break should be forced, due to
"page-break-before".)

If that worked interoperably, would this address your use-case?

~Daniel

Received on Tuesday, 10 June 2014 23:19:30 UTC