For flex items in a vertical flex container, only treat heights as definite (for resolving % heights on children) if the flex-basis (or flex container's height) is also definite
Categories
(Core :: Layout, defect, P2)
Tracking
()
People
(Reporter: dholbert, Assigned: dholbert)
References
(Blocks 1 open bug, )
Details
(Whiteboard: [webcompat], [wptsync upstream])
Attachments
(4 files)
Assignee | ||
Comment 1•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Assignee | ||
Comment 2•10 years ago
|
||
![]() |
||
Comment 3•10 years ago
|
||
Assignee | ||
Comment 4•10 years ago
|
||
Comment 5•9 years ago
|
||
Comment 8•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Assignee | ||
Comment 9•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Comment 10•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 13•6 years ago
|
||
wpt.fyi link for the test mentioned in comment 10: https://wpt.fyi/results/css/css-flexbox/percentage-heights-003.html
![]() |
||
Updated•6 years ago
|
Comment 14•6 years ago
|
||
Migrating Webcompat whiteboard priorities to project flags. See bug 1547409.
Comment 15•6 years ago
|
||
See bug 1547409. Migrating whiteboard priority tags to program flags.
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Comment 17•6 years ago
|
||
We should try to fix this soonish, given the webcompat issues involved here. Taking.
Comment 18•5 years ago
|
||
(note that LinkedIn fixed their home page)
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 19•5 years ago
|
||
Updated•5 years ago
|
Assignee | ||
Comment 20•5 years ago
|
||
As of this bug, flex items in a vertical flex container will sometimes be
considered to have "indefinite" sizes, i.e. percent sizes in them will no
longer resolve. To work around this, they need to provide a definite flex-basis
(e.g. as part of the "flex" shorthand property) if we want percent sizes to
resolve (instead of being treated as "auto") inside of them.
Updated•5 years ago
|
Assignee | ||
Comment 21•5 years ago
•
|
||
The "part 1" patch here is needed in order to avoid failing this test:
https://searchfox.org/mozilla-central/source/browser/components/sessionstore/test/browser_590563.js
(johannh, I hope you don't mind reviewing that change, as someone who's worked on the file in question, info-pages.inc.css
.)
Without part 1's tweak to info-pages.inc.css
, the "main" patch (part 2) makes us fail some sizing checks in browser_590563.js
, because about:sessionrestore
ends up rendering with a 0-height "list of tabs to restore" area. That area is actually a height:100%
element inside of a flex item in a vertical flex container, and the flex item has the default flex-basis:auto
and the flex container is also auto-sized, which means the flex item's height is now considered indefinite (as of this bug), which means the height:100%
ends up behaving as height:auto
and collapsing away to nothing because it's got no content. (This is the new way that this markup is supposed to render.)
My patch in part 1 changes to give that flex item a definite flex basis (0px), which makes its final size be considered definite as well, which means the height:100%
can resolve against the final size. It won't actually end up being 0px in height, because (a) it's got a min-height:12em
, and (b) it's still got a flex-grow of 1 so it'll absorb any excess space that its flex container has.
Assignee | ||
Comment 22•5 years ago
|
||
(AFAICT from some local testing, part 1 doesn't change the current rendering of about:sessionrestore. It simply prevents it from breaking when I apply part 2.)
Comment 23•5 years ago
|
||
Comment 26•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6063bd9bccb1
https://hg.mozilla.org/mozilla-central/rev/55e700b5f42e
Assignee | ||
Comment 30•5 years ago
|
||
Good news! I've gone through the list of associated webcompat issues and dependencies/dupes, and I've verified that they are all indeed fixed in latest Nightly, version 71.0a1 (2019-09-06) (64-bit)
Also worth noting: for some of the testcases that were posted here early-on, the testcases' expectations are now incorrect, due to subsequent spec changes (e.g. comment 6 and comment 9).
In particular, the linked jsfiddle (http://jsfiddle.net/mLkp7L1j/4/ ) and the "somewhat minimized TC" attachment (https://bug1092007.bmoattachments.org/attachment.cgi?id=8663193 ) didn't actually change their rendering as part of this bug, since they predated additional spec changes. But we do match Chrome's rendering on both of those testcases, so our (unchanged) rendering on both of those should be OK from a compat & spec-compliance perspective.
Here's a better "real" testcase for the final incarnation of the spec change that this bug covered: attachment 8601759 [details] (from duplicate bug 1161771). That testcase did change its rendering when this patch landed (such that the red area is now only as tall as the text, instead of being as tall as its container).
Updated•5 years ago
|
Assignee | ||
Comment 31•5 years ago
|
||
DONTBUILD because this is comment-only.
This patch is just addressing a typo in a code comment that was left as a
review nit, which I forgot to address before landing.
Comment 32•5 years ago
|
||
Comment 33•5 years ago
|
||
bugherder |
Assignee | ||
Updated•5 years ago
|
Description
•