Open Bug 1918169 Opened 2 years ago Updated 2 months ago

Percent height nested within in flex layout does not account for additional space from page breaks

Categories

(Core :: Layout: Flexbox, defect, P3)

Firefox 131
defect

Tracking

()

People

(Reporter: paul.baernreuther, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

Attached file percentInFlex.html —

Steps to reproduce:

The attached html has an element with height 100% nested within a horizontal flexbox. Additionally its children, when printed to pdf, avoid breaking inside leading to additional space between some of the elements. Apparently, this additional space is not accounted for and the "Content below" that should in any case appear below the main element seems to be shifted to the top by exactly this amount of additional space. The same would hold for additional space due to repeating headers of a table.

Steps to reproduce:

  • Open the attached html file
  • Press Ctrl P to print to PDF.

Actual results:

The red "Content below" overlaps the breaking elements.

Expected results:

The "Content below" should still be positioned below the breaking elements.

Cross posting the same bug in chromium: https://issues.chromium.org/issues/365922171

The Bugbug bot thinks this bug should belong to the 'Core::Printing: Output' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Printing: Output
Product: Firefox → Core

This is probably hard to fix... Ting-Yu has looked at a lot of the flex fragmentation code. Maybe you know if this happens to be an easy fix?

Severity: -- → S3
Status: UNCONFIRMED → NEW
Component: Printing: Output → Layout: Flexbox
Ever confirmed: true
Flags: needinfo?(aethanyc)
Priority: -- → P3
See Also: → 939897

This has no easy fix. We need to account for the extra space between the content block-end and the actual page or column block-end, and enlarge the final size of the flex container.

Blocks: 521204, 939897
Flags: needinfo?(aethanyc)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: