Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Different column widths for different screen sizes #47
With Tailor I can only set the column widths once, and can't change them depending on the screen size. Am I missing something?
Specifying mobile and tablet specific column widths like in Bootstrap is not currently possible. Bootstrap isn't used in the project, however I am interested in supporting something like this so long as it can be achieved without adversely affecting people who have no use for this level of control.
What you can do in Tailor at the moment:
One factor to overcome is that columns in Tailor are added and resized using drag and drop. I'm putting together a free advanced extension for more advanced features that not everyone will be interested in to avoid "feature bloat" in the core plugin. Perhaps a couple of settings could be added through that to control the individual column widths on various screen sizes.
Interested to get your thoughts on what this could realistically look like in the context of Tailor.
Is it possible for the Tailor canvas to know which device preview "mode" you're currently in? Could the drag-to-resize columns (and classes) be set and saved per "device mode"?
That way you could set your column widths for desktop (a typical default view when working in Tailor) and then switch the view mode to tablet, resize the columns, and both settings would be saved. This way editing is always done in context with the device you're styling for, and doesn't add clutter to the settings screens.
The output would necessarily be something like Bootstrap's
I like the idea, although suspect that it may suffer from some problems (e.g., dragging to resize collapsed columns). Responsive settings of this sort are planned to be part of an upcoming free extension, so I will put some thought into how this could/should work.
Really keen to get feedback from you (and anyone reading this)!
@andrew-worsfold Thanks for improve the column element that now uses percentage instead of 12 grid.
However I think it would be awesome if there is a field to manually enter the width because I have a little problem resizing the column using the mouse to get the exact width for example 1/3 column currently I get 33.4% which should be 33.3333333333%
I know it very tiny difference between 33.4% and 33.3333333333% but the displayed result quite make a big difference with 33.3333333333% I get 370px which is perfect pixel but with 33.4% I get only 369.45px, some of image inside becomes blurry because the column size is lower than 370px
Another benefit of adding column width field is ability to set different column widths on mobile and tablet. Now I take a sidebar as example I want to have a 1/3 (33.3333333333%) on desktop/tablet and I want to make it full width on mobile devices. Here is what I get currently:
Look at the mobile view, the content is narrowed than the sidebar that looks a bit weird though. I know there is a visibility options which can be used to hide it on phones but that's not the point.
I look forward to hear your though on it.
EDIT: Forgot to mention that the mobile view is using 480px instead of 320px