Skip to content
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

How to set gutter, margin and breakpoins to my needs? #241

Open
andrealopezmora opened this issue Mar 21, 2017 · 5 comments
Open

How to set gutter, margin and breakpoins to my needs? #241

andrealopezmora opened this issue Mar 21, 2017 · 5 comments

Comments

@andrealopezmora
Copy link

andrealopezmora commented Mar 21, 2017

I need to set gutter, margins and breakpoints to other values, what's the best way to achieve that?
Thanks.

@baj84
Copy link

baj84 commented May 13, 2017

+1

@jan-dh
Copy link

jan-dh commented Jun 22, 2017

You can do this

Gutter

You can find adjust the gutter by changing the following:

  1. Make a gutter variable: $gutter: 30px;;
  2. Divide the negative margin in the .row by 2: margin-right: -$gutter/2; ...
  3. Change out the padding-right and padding-left by $gutter/2

Breakpoints
At the bottom of the css file you see 3 breakpoints defined. You can change them out by Sass-variables and adjust them to your needs.

@CruelMoney
Copy link

@jan-dh what css file are you referring to?

@jdockwarder
Copy link

jdockwarder commented Jul 8, 2018

@jan-dh How do you set the padding for all the col-x elements? If I'm not totally wrong, then you need to select all col-(xs|sm|md|lg) elements and re-set the padding and do all that again for each new breakpoint.

UPDATE
Just add this add the beginning of your CSS:

.row {
  margin-right: -$gutter/2;
  margin-left: -$gutter/2;
}
[class|="col"]:not([class*="offset"]) {
  padding-left: $gutter/2;
  padding-right: $gutter/2;
}

@xeaone
Copy link

xeaone commented Nov 10, 2021

@jan-dh You got us pointed in the right direction but the | is "equal to or starts with". Which work if you always start with flexbox classes so I think the following is in improvement.

.row {
  margin-left: 0;
  margin-right: 0;
}
[class~="col"]:not([class*="offset"]),
[class*="col-"]:not([class*="offset"]) {
  padding-left: 0;
  padding-right: 0;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants