-
Notifications
You must be signed in to change notification settings - Fork 13.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
feat request: make grid responsive by screen size #6050
Comments
These sizes should be configurable. Specifically which lines of code would you liked changed? |
No I know how to do that. (In fact I think you guys did it in a similar way I did in the past in sass). I've meant like add it to a future installment. |
Do you mean for ionic1 or ionic2? So far these numbers have been working great for us: https://github.com/driftyco/ionic/blob/2.0/ionic/components/grid/grid.scss#L13 |
This would be for ionic 2. I don't meant to change it, but like add option so that the grid is implemented for different sizes. Like this grid will be implemented if the screen size is large. In other words if I do this:
The grid will just act different depending on the screen size. |
#### Short description of what this resolves: Implement responsive columns widths in a grid. Similar to other frameworks. #### Changes proposed in this pull request: - Implement responsive column - Add an attribute of X-width-10 to a column will trigger the width to be 10% for that breakpoint Ex: `<ion-col lg-width-25 sm-width-50 width-100></ion-col>` **Ionic Version**: 2 **Fixes**: ionic-team#6050
As per my suggestion else where, I believe Ionic's grid needs to be enhanced at some point in the future. I would highly recommend basing it off something like bootstrap 4. |
+1 for a responsive grid system a la Bootstrap! |
@mikewagz Please add a thumbs up on the original comment, we can sort issues by these. :) |
@brandyscarney I came across this answer: http://stackoverflow.com/questions/36018146/ionic-2-responsive-grid Is there somewhere in the ionic 2 docs that mention the use of the |
@seanmavley Unfortunately it probably isn't documented. I am currently working on improving the grid system and with the improvements I'll be writing new documentation for it. I'll update this issue once I have something for you all to try. Thanks! |
Hey everyone, I have been working on the new grid system based on Bootstrap 4. Here is a stand alone example of it: grid.zip I've released a nightly if you'd like to try it out, using this nightly should still work with the old system:
And here is a document (a work in progress) where I have written up some information on it: Ionic Grid API The old grid system will eventually go away, but for now it should still work. If you see your current grid completely break or if you have feedback on the new system please let me know. Thanks! :) |
@brandyscarney - I really appreciate the work you're doing on the grid system, it has the potential to make Ionic much more flexible for various devices. I personally can't wait to upgrade our startup's iPad version to take advantage of this. I checked out the doc you posted and had a question with how you're implementing the columns. If we're going for Bootstrap-style syntax, I'm not sure how to interpret the example:
Wouldn't it make more sense to have the various column specifiers by screen width, such as:
This example would indicate a 100%-column on small screen, 50%-column on medium screens, and a 33%-column on large screens. Also, offsets would accompany these if needed, like:
This example would be a full row on small screens and a centered 50% column on anything larger. This methodology seems like the way we're all used to using a grid, as popularized by Bootstrap, Materialize etc. Any chance that is desirable/doable? Thanks for building an awesome framework! EDIT: After looking at the .zip it looks like this is how it is implemented, with the |
@mikewagz I'm glad you like it! To explain the following example:
I am adding Thanks for the feedback. :) |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Hi,
This is not an issue more of a suggestion. I am doing a Windows 10 desktop app, and I was thinking "If I decided to do an app that worked for desktop and mobile I would have to make the grid work on different screen sizes".
So my suggestion is that the grid works on different screen sizes like:
width for mobile: width < 600px
width-m for tablets: width > 600px
width-L for Desktops: width > 1200px
or something similar. Same with the offsets.
The text was updated successfully, but these errors were encountered: