-
-
Notifications
You must be signed in to change notification settings - Fork 78.8k
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
Offsetting columns is not working #23360
Comments
Same issue here. This is what bootstrap says : "Updated the grid to drop push, pull, and offset in favor of new .order- modifiers and margin utilities." But I do not have a clue how to use .order- and margins as a replacement for offset- |
in this case i think probably must use flex utilities... ? ...the only way i found is to write more html : an empty div with col-md-2 we will have the offset task ... perhaps an other way but i dont see .. |
For now we can either use @jipexu 's solution by adding a blank div with whatever space we need. Another way -
|
the best will be to have some "grided responsive" margin class will allow to define the size of the element and it's "grided responsive" marge in the same html element ... as the offset done before... or i miss something ?... |
I dropped them from the alpha given all the flexbox and margin utilities we were adding. I'm happy to restore the offsets provided they're widely necessary. |
@mdo we just need a way of controlling the size of the margin to match a grid. Either restoring the offset classes or converting them to a margin based name ( |
@fran-worley I agree, margin utils are just not replacements for |
@mdo I recommend leaving the utilities as you have them now in beta;
I think these are migration pains and need some good docs for how to move out of (or point to learn flex box) |
|
|
I haven't seen anyone struggling with the concept of offsets. In my opinion, empty divs are more like hacks, and should be avoided, just like the empty "clearfix" divs. |
Regardless if offset is confusing, that should not dictate whether or not the feature should be in Bootstrap. If someone struggles to understand offset, then they could use empty divs if they need to. That hack should not be standard procedure for those who do understand offset. Empty divs is not an acceptable alternative for a grid framework. |
I've started using beta-1 today, this is the first thing I'm missing. Please bring grid-based offsetting back, they're very useful. I would advise to stay away from the empty div alternative. The primary purpose of HTML should be to semantically wrap content. Using extra HTML to solely achieve a visual detail its a no-no, that's the job of CSS. |
yes i agree empty html tag are not the solution ... we know this ... but for now with beta is the only way to replace some offset lack ... but i think (hope) this will be in next release (with some offset or "responsive grided margin" ... by this we will have a very robust and complete (and finally simple) grid system ... |
@mdo I think the offset columns should be brought back, now it's nearly impossible to have columns to move either direction by any amount of columns apart, some people has suggested to add empty columns to offset columns, but having empty elements seems like not an elegant solution. |
Fixes #23360 by restoring just the offset class generation to our grid framework mixins. Also restores the `make-col-offset` mixin. Docs have been restored to illustrate this behavior and merged with the newer margin utilities examples.
PR is here: #23445 |
Offset needs to be brought back. I'm building a site now using v4 and having a very difficult time achieving my desired layout. About to ditch Bootstrap for Foundation to be honest. |
Please also consider adding back the |
Just my two cents: I'm missing the The quickest way I found to get around the absence of offset is by adding empty DIVs. Definitely not good! |
Interesting, hadn't thought of them that way. Probably not coming back anytime soon given |
Fixes #23360 by restoring just the offset class generation to our grid framework mixins. Also restores the `make-col-offset` mixin. Docs have been restored to illustrate this behavior and merged with the newer margin utilities examples.
@mdo fair enough. Here's the snippet I used to restore them: @each $breakpoint in map-keys($grid-breakpoints) {
@include media-breakpoint-up($breakpoint) {
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
@for $i from 0 through $grid-columns {
.pull#{$infix}-#{$i} {
right: if($i > 0, percentage($i / $grid-columns), auto);
}
}
}
} |
That is right and ml-auto worked for me. I wanted to center it so I did |
I am using Boostrap 4 Beta and facing issues with offsetting columns.
Earlier i used to do offset-md-* and it was working, with BS4 Beta this is removed according to docs.
The new method mentioned in docs is using .ml-auto , when i try to use it with col-md-4 it is offsetting 4 columns. What i want is custom offsetting like
<div class="col-md-4 offset-md-2"></div>
I tried using
<div class="col-md-4 ml-md-2"></div>
but didn't work
Is this is bug or there is another way to do it ?
The text was updated successfully, but these errors were encountered: