-
-
Notifications
You must be signed in to change notification settings - Fork 78.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
Add a class of helpers for vertical spacing between elements? #4286
Comments
👍 +1 for this, thought I would add that it needs to be responsive. I have wished for this in most all of my projects. Essentially, Bootstrap give us this great modular architecture like http://smacss.com talks about, so I don't want to have to go in and get specific about spacing, particularly because these spacers would need to be "responsive aware". So they should probably pivot on the LESS variable for |
If you need a column to not be collapsed, add a |
Making a column not be collapsed is just one of the possible uses. |
I'd like to see this added as well. It'll help with situations where the first element is a fixed-position toolbar -- at the moment this obviously entails that the second element will be pushed up and hidden behind the first element. To get around this I have to add a couple of empty Perhaps, in addition to spacers, there could be vertical offsets to compliment the horizontal offsets. |
@MichaelRushton - While these would be nice to have in bootstrap, they also are handy to use even outside of bootstrap. Or at least I find them so. https://github.com/mg1075/CssBuildingBlocks |
Wondering if this is the same solution I'm looking for: Setting a fixed margin / min-height isn't going to work responsive, unless you add different values for every breakpoint. Wondering if there's a better solution? |
We tried spacing classes based on REMS. It works, but has many caveats. We found we only need to adjust our grid gutters on mobile (desktop and tabletish viewports share the same gutters) so we only needed two sets of prefixed surgical classes. .m-spacer and .spacer. Not sure if it helps, but food for thought. |
This is just what I was wondering too: some helper classes to space elements vertically! |
@MichaelRushton @mg1075 I was just curious to know whether this "spacer" solution has been added in core of Bootstrap or not? |
Another one interested in "spacer" functionality in Bootstrap |
+1 To me, one of the main ideas of Bootstrap is that you create basic pages (like for an admin interface) without any custom CSS at all. The only thing that seems to be lacking for that is a set of vertical spacing classes. It seems to really make sense to me. |
Ditto. Would like to stay informed on this. |
+1 here too. This is something very common in blog template designing, for example. |
I agree with @mjbaldwin, please consider this. |
+1 Vertical spacing is a must for a grid system like this. |
+1 It is really necessary for anything but the most basic websites. |
+1 |
This is what I do for that and other situations, one reset file with just a few tweaks.
|
+1 |
1 similar comment
+1 |
one of the main ideas of Bootstrap is that you create basic pages...+1 Vertical spacing is a must for a grid system like this. |
+1 |
2 similar comments
+1 |
+1 |
@mdo -- this issue already has 17 (by my count) people asking for this funcionality. Any chance of it ever coming up? Or at least re-opening the issue to keep track of it? |
@mjbaldwin Having a more flexible vertical rhythm would be great, but it has to be implemented without compromising simplicity or approachability. Right now the system isn't as flexible as it likely could, but it's consistent and easy enough to change. I won't be opening this particular issue, but I'm always open to new ideas. |
Being able to lay out content vertically in a responsive way would be extremely useful. This use-case comes up a lot in my projects. |
For stuff like this I would just roll your own:
use
Actually, I don't need it I adjust for mobile with a little tiny max-width since it's less crufty than adding spacers.
|
+1 |
+1 |
5 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
+1 for some sort of control over vertical rythem |
This has been added to our internal planning document for possible consideration for Bootstrap v4.There is no point in posting further comments on this issue. |
Hooray! The conversation's at an end! We can afford to be belligerent!
I might have a floppy disk with a few 1x1px gifs if anyone wants one. |
+1 |
When using the grid 960 system, and then moving to bootstrap's system, I've found it very handy to have a set of .css classes to draw from for adjusting the vertical spacing between elements and/or filling empty grid elements. Perhaps you could consider adding a similar set to bootstrap? I hope what I'm trying to convey makes sense. There certainly could be mis-uses of the spacer "helpers", but I think on the whole, they would be of benefit as an additional scaffolding feature.
HTML
CSS
The text was updated successfully, but these errors were encountered: