Closed Bug 1270891 Opened 9 years ago Closed 2 years ago

[css-flex][css-break] Flexbox container honors forced breaks also when not inside a fragmentainer

Categories

(Core :: Layout, defect)

defect

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox49 --- wontfix
firefox113 --- fixed

People

(Reporter: MatsPalmgren_bugz, Assigned: TYLin)

References

(Blocks 1 open bug)

Details

(Keywords: testcase)

Attachments

(2 files)

Attached file testcase (deleted) —
I don't see anything inside the Flexbox spec that says we should honor these properties unless the flexbox container is inside a fragmentainer. We're essentially treating the flexbox container itself as a fragmentainer which seems wrong to me. Specifically, 9.3.5 says "(or until a forced break is encountered, see §10 Fragmenting Flex Layout)": https://drafts.csswg.org/css-flexbox/#main-sizing But all of §10 only applies on the condition there is a fragmentainer. https://drafts.csswg.org/css-flexbox/#pagination so the "until a forced break is encountered" only applies on condition there is a fragmentainer. Neither css-flexbox nor css-break mentions that a flexbox container can act as a fragmentainer, AFAICT. https://drafts.csswg.org/css-break
I can sympathize with the use case though - forcing the item to start a new row. I think we should ask the CSSWG for a separate feature to support this use case, and possibly make it work for Grid item placement and block line breaking too.
Yeah, looks like this spec-text has changed. When I implemented this behavior, the spec said: > Otherwise, starting from the first uncollected item, > collect consecutive items one by one until [...], > or until a forced break is encountered. [...] > 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. Here's a snapshot of the spec from back then https://www.w3.org/TR/2014/WD-css-flexbox-1-20140325/#algo-line-break
Summary: [flexbox][css-break] Flexbox container honors forced breaks also when not inside a fragmentainer → [css-flex][css-break] Flexbox container honors forced breaks also when not inside a fragmentainer
(I'm mostly out today, but I'll take a closer look at this over the weekend or next week, and perhaps email the editors to clarify whether they think forced line-breaking should be possible.)
Flags: needinfo?(dholbert)

I wonder if our current behavior is what wrap-before/wrap-after:flex is supposed to do:
https://www.w3.org/TR/css-text-4/#wrap-before

Severity: normal → S3

(In reply to Mats Palmgren (inactive) from comment #4)

I wonder if our current behavior is what wrap-before/wrap-after:flex is supposed to do:
https://www.w3.org/TR/css-text-4/#wrap-before

Filed bug 1822586 to implement wrap-before/wrap-after.

Assignee: nobody → aethanyc
Status: NEW → ASSIGNED
Flags: needinfo?(dholbert)
Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/c8cc6f915008 Don't honor forced break properties when generating flex lines. r=dholbert
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: