Open Bug 1646098 Opened 9 months ago Updated 13 days ago

Implement aspect-ratio for grid

Categories

(Core :: Layout: Grid, enhancement, P2)

enhancement

Tracking

()

ASSIGNED

People

(Reporter: boris, Assigned: boris)

References

(Depends on 1 open bug, Blocks 2 open bugs)

Details

(Keywords: dev-doc-needed)

Attachments

(1 file, 1 obsolete file)

Implement aspect-ratio for display: grid.

Basically, we support aspect-ratio on Grid layout already, but I'm still checking some special cases, like Automatic minimum size of grid items with aspect-ratio. We don't have wpt for gris layout for aspect-ratio now, so I will add some in this bug.

Assignee: nobody → boris.chiou
Priority: P3 → P2
Status: NEW → ASSIGNED

(In reply to Boris Chiou [:boris] from comment #4)

Need to check this issue:
https://codepen.io/jensimmons/pen/JjRZVwg?editors=1100

Looks like we only apply aspect-ratio on those grid items (nsBlockFrame), but not on nsGridContainerFrame, so the grid layout looks weird in this case.

Depends on: 1690422
Depends on: 1690423
Blocks: 1672073
No longer blocks: aspect-ratio
Blocks: aspect-ratio
Attachment #9175739 - Attachment is obsolete: true

Need to update:
https://software.hixie.ch/utilities/js/live-dom-viewer/saved/8914

grid item: <div style="height: 100px; justify-self: stretch; aspect-ratio: 1/1; background: green;"></div>
we should update to stretch, instead of using ar.

Attachment #9181218 - Attachment description: Bug 1646098 - Automatic Minimum Size of Grid Items for aspect-ratio property. → Bug 1646098 - Fix Automatic Minimum Size of Grid Items for aspect-ratio property.
You need to log in before you can comment on or make changes to this bug.