-
Notifications
You must be signed in to change notification settings - Fork 715
Should min-content
really include the width/height of flex-basis: 0%
scrollable items?
#12182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is in conflict with constraint (1), so I'm going to ignore it. You are using
Yeah, no browser supports |
Thank you for replying @Loirooriol!
How so?
You're right that I overcomplicated the example. Sure, I can replace both the But we're back to the same problem, because
That's a shame. The way you phrase it seems to imply that it's not necessarily what the spec says? |
If you have min and max constraints you need to specify which wins. From the "however" in (2) I can infer that the min wins over the max. But I can't infer what happens if the min from (2) conflicts with the max from (1). Also I don't understand what min you want in (2). When you say "I assume" you mean you don't know either?
Yes, see #6457 (comment) Anyways, this sounds vaguely related to https://drafts.csswg.org/css-sizing-4/#intrinsic-contribution-override, but hard to say since I'm not really understanding what you want. |
Ok, sorry, I should have phrased it better. I want the card's height to be
Thank you, that's good news. I will try to find issues in the browsers' bug trackers, and if I can't find them, create them. :) |
Consider the following CodePen (in Chrome, because it uses
calc-size
).I want the card's height to be based on its content and on the viewport's height, in a way that doesn't seem possible:
max-content
).min-content
).To achieve 1, uncomment
max-height: max-content;
– looks likemax-content
is computed correctly, great.But to achieve 2, the only way I could find was to use
flex-basis: 0
instead offlex-basis: 0%
, but thenmax-content
is the same asmin-content
, and there is no way to size the card based on its content anymore.I feel like the
min-content
whenflex-basis
is0%
should be the same as when it is0
, that is, it shouldn't include the height of the body since it is scrollable (which I imagine should be the same foroverflow: hidden
). That way, it would be possible to satisfy both requirements by usingmin-content
in themin-height
, andmax-content
in themax-height
.Hopefully that makes sense!
The text was updated successfully, but these errors were encountered: