-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
Discussion: manipulating flex-basis/height/width on container #45
Comments
The ideal would be to have a compact syntax to effect this more precise control over height / width (depending on direction of the flex container). Something like the following would make sense to me:
|
I think the API should use "basis" as it is the "official" flexbox nomenclature but if it turns out that some combination of height/width (and the min/max variants) is better supported than flexi could transform this to these instead of
|
@ksnyde I've mulled this over for a while, and I really love the idea of converting It gets tricker because much of what you'd want here probably needs to change dynamically at runtime. Consider this simple potential API which would only work if flex direction does not change and breakpoints aren't considered.
If this was all we allowed, this could be made to work. But what happens when...
Here, we are now in a situation in which we MUST either track the parent (difficult, it's not always the immediate parent, and even when it is other expressions (like The situation only gets worse as you consider alternative such as:
If we ditch the ability to use |
Imagine if life were actually as simple as you first imagined it. We'd be productive but it sure would be dull. 😆 |
My hunch is that "non-percentage" use of |
Also flexi does provide -- in effect -- percentage
This is effectively a fixed width/height of 25%:
No I can't have a fixed width of a non-standard % but considering how much complicated that is I think the compromise more than meets the much over-used "80/20 rule". |
@ksnyde The Slack discussion linked in the issue has been purged, and I'm having trouble parsing what the desired feature is. Would you mind a summary of the feature, as well as the usage pattern(s) it enables? |
Stemming from this slack conversation:
It was decided further discussion was appropriate. The discussion revolves around the ability to exercise precise height or width on a flex item within a horizontal or vertical flexbox group. The "flex" version of this would be to use the
flex-basis
property but Chris has pointed out that Safari has a bug when using "%" values (in my tests though fixed px/rem/em values work fine).It may be that the more traditional form of adding height/width style properties is better supported but in either case the goal is to be able to build something like this:
In this case we want even spacing between components but in the one case (aka, the green one) we want to precisely state the size/height of the container.
The text was updated successfully, but these errors were encountered: