Open Bug 1868027 Opened 11 months ago Updated 11 months ago

Grid Item with Intrinsic Sizing and Zero Computed Size Lets Margin Contribute to Overflow

Categories

(Core :: Layout: Grid, defect)

Firefox 120
defect

Tracking

()

People

(Reporter: misuser8, Unassigned)

Details

Attachments

(2 files)

Attached file grid1.html

User Agent: Mozilla/5.0 (Windows NT 10.0; rv:120.0) Gecko/20100101 Firefox/120.0

Steps to reproduce:

  1. Place a div element with "width" property value greater than 0
    and "overflow" property value "visible"
    on a grid column track the size of which is specified as "auto".
  2. Put another div element with "margin-left" property value greater than 0 inside the above grid item.
  3. Specify inner div's "width" value as "calc(100% - [margin-left])" and "min-width" value as "0".
  4. Set grid item's "width" property value to 0; this way the inner div's width will also become 0 (see attached html document).

Actual results:

Grid container overflows.
Setting grid item's "width" property to any value greater than 0 (even 0.1px) prevents overflowing.

Expected results:

I expect grid container not to overflow just like it behaves in Chrome browser.

Attached file Minimized test case

When we Grid with intrinsic size, then that column ends up being 0px sized, we somehow let the margin box contribute to the overflow?

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: margin-left causes grid container overflow → Grid Item with Intrinsic Sizing and Zero Computed Size Lets Margin Contribute to Overflow
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: