W3C home > Mailing lists > Public > www-style@w3.org > June 2014

Re: [css-flexbox] feedback

From: Daniel Holbert <dholbert@mozilla.com>
Date: Tue, 10 Jun 2014 16:19:02 -0700
Message-ID: <53979266.8070104@mozilla.com>
To: Cory Brown <oh.wise.man@gmail.com>, www-style@w3.org
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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:22 UTC