Closed Bug 1646098 Opened 4 years ago Closed 3 years ago

Implement aspect-ratio for grid

Categories

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

enhancement

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: boris, Assigned: boris)

References

Details

(Keywords: dev-doc-needed)

Attachments

(2 obsolete files)

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.
Attachment #9181218 - Attachment is obsolete: true

Grid item sizing shares the same code with basic blocks, so no need to do a special handle for it.

No longer depends on: 1690423
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
Resolution: WORKSFORME → FIXED

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

Grid item sizing shares the same code with basic blocks, so no need to do a special handle for it.

And we don't have to handle for transferred size suggestion for non-replaced elements now.

Resolution: FIXED → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: