Closed Bug 1346533 Opened 8 years ago Closed 8 years ago

[css-grid] Possible bug relating to height of Grid auto track when percentage height is used inside grid-item as pseudo element.

Categories

(Core :: Layout, defect)

52 Branch
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: me, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36 Steps to reproduce: The Grid row track height of some rows in a CSS Grid layout does not appear to be calculated correctly. The grid item in this case has an element that uses the padding-bottom with a percentage height technique to create an element with a fixed aspect ratio. This is causing display issues in Firefox. The same example works fine in Chrome 57. CodePen link here: https://codepen.io/rctneil/pen/vxgGar Actual results: Grid row track height not calculating correctly Expected results: See CodePen in Chrome: https://codepen.io/rctneil/pen/vxgGar Row track height should be correctly calculated.
Attached image actual.png
Attached image expected.png
Blocks: css-grid
Component: Untriaged → Layout
Flags: needinfo?(mats)
OS: Unspecified → All
Product: Firefox → Core
Hardware: Unspecified → All
Summary: Possible bug relating to height of Grid auto track when percentage height is used inside grid-item as pseudo element. → [css-grid] Possible bug relating to height of Grid auto track when percentage height is used inside grid-item as pseudo element.
Flags: needinfo?(mats)
Firefox is resolving grid item percentage padding (and margin) against the size in the same axis, e.g. padding-top percentages are resolved against the height of the grid area (which is 'auto' in this case, so the padding is zero). This is compliant with the CSS Grid spec. (and we do the same on flex items, fwiw) The reported testcase depends on a bug in Chrome, this one to be precise: https://bugs.chromium.org/p/chromium/issues/detail?id=229568
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: