-
-
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
No way to restore the default 30px gutter when using negative margin class #27072
Comments
For example, when we want narrow gutters for mobile screen, we may write as: <!-- 16px gutter (8px * 2) -->
<div class="row mx-n2">
<div class="col px-2">Column</div>
<div class="col px-2">Column</div>
</div> But, there is no way to reset to the default 30px by responsive. It is possible to make it 32px with the following code, but it is not perfect: <!-- 16px gutter (8px * 2) -->
<!-- ≥768px: 32px gutter (16px * 2) -->
<div class="row mx-n2 mx-md-n3">
<div class="col px-2 px-md-3">Column</div>
<div class="col px-2 px-md-3">Column</div>
</div> |
/CC @MartijnCuppens |
Hmm, this is not a simple one. First thing that comes to my mind is to add 2 extra spacers, something like this: $spacers: map-merge(
(
0: 0,
1: ($spacer * .25),
2: ($spacer * .5),
3: $spacer,
4: ($spacer * 1.5),
5: ($spacer * 3),
grid-gutter: $grid-gutter-width,
half-grid-gutter: ($grid-gutter-width / 2),
),
$spacers
); But as expected this adds a lot of css: Bundlesize at this moment:
Bundlesize with suggested
Bundlesize with only
Bundlesize with only
I personally always override the Changing the default values of the @ysds, do you have any suggestions yourself how we could handle this? |
I changed the Plus, the closed issues(#24283, #23999 and more) and the doc says: "Use Why don't we think again about the unit of gutters? |
I do think, in my humble opinion, that moving forward to using |
will bootstrap 5 use display grid |
The new negative margin classes (#26825) allow to change gutters width in responsive. But there is no way to restore the default 30px, since spacing classes are based on rem (16px). I think that this is not a problem, but what do you think?
The text was updated successfully, but these errors were encountered: