-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Auto Sizing in xy-grid does not work as expected combined with Responsive Adjustments #11387
Comments
I guess you mean In this case you have to specify the |
Why? Medium should also do the trick for "two". The Problem is that large-4 does not override medium-auto behaviour. |
It does not work with large-6 in "Two" either. As far as I know foundation inherits its sizing from the smaller breakpoints. This is still the case. There is not mich to distribute when there is only one element with auto. |
This is right and how it is intended to work, the class of the current breakpoint gets applied. |
So the current breakpoint should override the smaller breakpoint. That means the described behaviour is faulty. The class .large-4 should override .medium-auto. But It behaves as if "One" and "Three" were set to auto. |
cc @ncoden I guess one cell should not affect another. I'm not yet sure if there is something not correctly working as this is an unexpected behavior. Can this be also reproduced in 6.4.3? |
Yes. |
I'm also suffering from that issue. medium-auto should be overridden by large-4 and such – like the other cell-size classes would do. |
@n00bium you can achieve the desired behavior by simply adding the class <div class="grid-x">
<div class="cell small-12 medium-4 large-auto">One</div>
<div class="cell small-12 medium-6">Two</div>
<div class="cell small-12 medium-auto large-shrink large-4">Three</div>
</div> |
Okay, that is good to know. But it seems a little bit hacky. I am feeling that this should work with one sizing-class per breakpoint. |
Why does it feel hacky? Imo it would feel more hacky if |
This is what we are doing now. See #11397 |
Imo the whole grid is designed in a way that tells the cells their behaviour with a class. The Combination of large-shrink and large-8 works, but you tell that column "use the space you need for your content" and then you override that with "use 8 ouf 12 Columns of the row you are in". So what should that poor little thingh do now? That solution would also add other Problems, for example, why does large-8 override large-shrink. Thats why I think it seems hacky. |
Expected Behavior
if I am defining a grid like this:
I would expect that "One" is 2/12, "Two" is 6/12 and "Three" ist 4/12 columns wide.
Current Behavior
The properties of .medium-auto seem to override .large-4, so the Outcome is:
"One" is 3/12, "Two" is 6/12 and "Three" ist 3/12 columns wide.
Possible Solution
The property flex: 1 1 0px; that is in "size"-auto is not overrieden bis size-# eg. .large-8.
Test Case and/or Steps to Reproduce (for bugs)
Test Case: https://codepen.io/anon/pen/jKjXxN
Context
It should be possible to override behaviour in an mobile-first environment.
But changing the grid-layout from automatic to percentage in different breakpoints is the main reason for using the grid.
Your Environment
The text was updated successfully, but these errors were encountered: