Closed Bug 1786087 Opened 2 years ago Closed 2 years ago

css grid collapse when changing writing-mode in slotted elements

Categories

(Core :: Layout, defect)

Firefox 103
defect

Tracking

()

RESOLVED DUPLICATE of bug 1310551

People

(Reporter: academyckc, Unassigned)

Details

Attachments

(1 file)

Steps to reproduce:

I have made a sample https://github.com/RedAndBlu/report-bug-firefox
open the file bug.html

Actual results:

the grid doesn't display correctly but collapse.
but if you toggle on and off grid-area: side and grid-area: nav in the console it fix itself.
I tested it on android and linux

Expected results:

you can compare with chromium (it easier to see it visually)

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

Component: Untriaged → Layout
Product: Firefox → Core

I think this is essentially a dupe of bug 1310551.

Unfortunately, Firefox's implementation of writing-modes has some cases where orthogonal flows (vertical-in-horizontal or vice versa) ends up attempting to measure content, and failing because we haven't laid out that content yet, and falling back to 0.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE

thank you for the bug report, BTW!

but if you toggle on and off grid-area: side and grid-area: nav in the console it fix itself.

Yeah, I can confirm that this fixes the layout.

This is part of the known-issue; we get the wrong value (zero) the first time we query the orthogonal-flow for its content-size, and then we get a chance to lay out the content and discover its true size, and then we use the correct result the next time it's queried for a relayout.

(It's not really a complete/robust workaround, though; various things [e.g. closing devtools in this case] will cause Firefox to do a more-thorough relayout and invalidate the content measurements, which may make the content size be measured as 0 again.)

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: