-
Notifications
You must be signed in to change notification settings - Fork 809
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
Mobile first grid system #182
base: master
Are you sure you want to change the base?
Conversation
@JazzBrotha What issues do you get on larger screens? |
Since the |
@JazzBrotha You can still use |
Yes, but what if I want to have different grid structures of different devices? I can't switch |
@JazzBrotha Have you tried something like this |
Yes, I did. After 1200px it doesn't apply the |
@JazzBrotha Can you show me your code? |
@picturepan2 Sure man. <div class="columns">
<div class="column col-xs-12 col-sm-6 col-md-6 col-lg-4 col-xl-3 col-2">
</div>
</div> |
@JazzBrotha The column width becomes |
@picturepan2 No. What if I want the |
@JazzBrotha I think you can just change |
@picturepan2 Ok. It doesn't work like that for me. The |
@JazzBrotha No. Maybe it is Spectre's bug. Can you show me more code? Or online example? |
@picturepan2 Of course man. I understand completely. Unfortunately I don't have a live example of the non-working grid, as I changed it for my application to work better on larger screens. |
@JazzBrotha Can you try your app with the Responsive Resizer tool? |
I can see that @picturepan2 is concerned about the impact of changing the way grids are created. My suggestion is: take @JazzBrotha solution (which solve every problem related to responsiveness) and use it with other class names (instead of col-xx-xx), keeping both solutions at the same time. That way users can keep their site working and, meanwhile, people who needs responsiveness can use the new solution. Eventually, you can deprecate the old solution. |
I have similar problem with Grid System and want to +1 the Pull Request. Is the solution proposed by @alexandremjacques considered by you, @picturepan2? :) |
Need this as well |
Most grid systems are mobile first, +1 to this. For example, if I need a column to have 100% of the size in mobile phones and from a medium size only have 50% of size. In Spectre: In other frameworks it would be: No need to use. col-6 as a fallback. Because you clearly can't use .col-xl-6, it wouldn't apply to screens that exceed 1280px. Visibility classes also need to be mobile first. They are currently "visible to this size" or "hidden to this size", unlike most frameworks that specify "visible from this size" and "hidden from this size". It is a change of perspective that at first is difficult to understand if you are accustomed to modern practices that focus on "mobile first". |
@jsmsalt The idea behind Spectre grid is targeting the specific size range "breakpoint between", not the "breakpoint up". It covers all situations, for example |
I changed the grid system to a mobile-first approach by changing the queries to
min-width
to avoid display issues on larger screens. I provided Bootstrap 4 breakpoints to fit accordingly. Tested and working.