-
Notifications
You must be signed in to change notification settings - Fork 707
[css-grid-2] Allow minmax where max wins over min #1102
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
maxmin ? |
|
I like the idea of It would have to be max value first, min value second to make sense though. |
If I understood this correctly, the feedback is that sizing properties allows both If that's correct I'd say |
How about adding a new parameter? Just like eg.
I think, no space at smaller viewports, it's an independent situation from |
The Working Group just discussed
The full IRC log of that discussion<dael> Topic: Allow minmax where max wins over min<dael> github: https://github.com//issues/1102 <dael> TabAtkins: Someone brought a use case where they want to set up columns that are like 20% of the grid but no larger then 250px. Obvious way doesn't work the way thtey want because min wins over max. If viewport is large the min will win and it'll be >250. They want priority to min. <Rossen_> what if we call it maxmin <dael> TabAtkins: Seems reasonable. We chose min win over match because it matches CSS> Reasonable to want different order. Suggestion is to add some way to achieve that in grid L2. <Rossen_> meaning max wins vs minmax where min wins? <dael> TabAtkins: We can decide on the functionality addition and not the syntax. It's a minor change to layout algo. THere will need to be a check to say if it's this type of sizing you cna't go above this value. <dael> Rossen_: Support adding. Did we resolve on using maxmin? <dael> TabAtkins: I don't want maxmin because it suggests max comes first in argument. We can figure syntax out later. fantasai and I will recommend something. <dael> Rossen_: The feature request makes sense. <dael> Rossen_: Opinions? Reasons not to put this in grid l2? <dael> Rossen_: Objections to adding a feature that allows max to win over min in Grid L2? <dael> RESOLVED: add a feature that allows max to win over min in Grid L2, name tbd |
So my preference is to go with an optional trailing keyword dictating the behavior. So maybe something like:
Alternate name pairs: |
I prefer the first set |
I like the keyword idea too, could it be just |
It doesn't seem immediately clear what |
I'm fine with the proposal, I'd just note that for non-grid things, we have Adding a My preference would be a three-argument |
@FremyCompany So making |
@FremyCompany That's what we're considering for the "1fr in min position" case (#2611), but that doesn't seem relevant for this issue. |
@tabatkins Yes, this is only relevant now that we resolved #2611 But note that the idea is that a |
@jonjohnjohnson Yes, this is |
Things have changed since that comment. Sebastian |
I like this approach. However, the What do you think? |
A keyword for the case where the minimum value wins is redundant but it also allows to be more explicit. Sebastian |
https://lists.w3.org/Archives/Public/www-style/2016Oct/0076.html
This is a perfectly reasonable use case, but since min wins over max in CSS in general, we weren't able to solve it by inverting the priority (see response on www-style). So we need some other, syntactically-different, solution. Suggestions welcome.
The text was updated successfully, but these errors were encountered: