Closed
Bug 1282821
Opened 8 years ago
Closed 7 years ago
[css-flexbox] Flex items that are sized to content should use max-content size (not fit-content)
Categories
(Core :: Layout, defect, P3)
Core
Layout
Tracking
()
RESOLVED
DUPLICATE
of bug 1374540
Tracking | Status | |
---|---|---|
firefox50 | --- | affected |
People
(Reporter: dholbert, Unassigned)
References
(Blocks 1 open bug, )
Details
(Keywords: dev-doc-complete)
Attachments
(1 file)
482 bytes,
text/html
|
Details |
Right now, for content-sized flex items (with default values "flex-basis:auto; width:auto"), we give them a flex base size of "fit-content", basically. I think this is what the spec used to require.
But now, we should use "max-content", per this chunk of current spec:
# Otherwise, size the item into the available space
# using its used flex basis in place of its main size,
# treating a value of 'content' as 'max-content'
('content' there is a value we don't explicitly support, but it's the value that corresponds to the "flex-basis:auto; width:auto" behavior)
https://drafts.csswg.org/css-flexbox/#hypothetical-main-size
See also this Chrome bug, where Chrome's behavior is actually correct and we're wrong, I believe:
https://bugs.chromium.org/p/chromium/issues/detail?id=623504
(Edge matches Chrome on this, too.)
Daniel, do you think http://codepen.io/anon/pen/KbEzC is the same issue? The four flex items should not have the same size because flex-basis: auto and a different max-content size should lead to different flexing being applied.
(from https://bugs.chromium.org/p/chromium/issues/detail?id=414197)
Reporter | ||
Comment 3•8 years ago
|
||
Yes.
Updated•8 years ago
|
Keywords: dev-doc-needed
Updated•7 years ago
|
Priority: -- → P3
Reporter | ||
Comment 4•7 years ago
|
||
(I think this is a prereq for bug 1377253 -- to be able to accurately cache/reuse content measurements across multiple reflows, as I'd like to do there, it will be important that these measurements aren't influenced by the size of the container.)
Blocks: 1377253
Reporter | ||
Comment 5•7 years ago
|
||
Actually I think this is a dupe of bug 1374540 (whose fix landed a few days ago) -- and the attached testcase and comment 2 each give EXPECTED RESULTS in Nightly.
(Comment 0's spec-text-quote is the same as bug 1374540 comment 3.)
--> duping and transferring blocking relationship
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Comment 6•6 years ago
|
||
The note reviewed here: https://github.com/mdn/browser-compat-data/pull/2151 is now live on MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/flex, so I'm marking this dev-doc-complete.
Keywords: dev-doc-needed → dev-doc-complete
Comment 7•6 years ago
|
||
(In reply to Will Bamberg [:wbamberg] from comment #6)
> The note reviewed here: https://github.com/mdn/browser-compat-data/pull/2151
> is now live on MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/flex,
> so I'm marking this dev-doc-complete.
Rel note added: https://developer.mozilla.org/en-US/Firefox/Releases/61#CSS
You need to log in
before you can comment on or make changes to this bug.
Description
•