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

Improve container #13616

Closed
matplane opened this issue May 17, 2014 · 1 comment
Closed

Improve container #13616

matplane opened this issue May 17, 2014 · 1 comment
Milestone

Comments

@matplane
Copy link

I suggest this improvement on the .container mixin. I think it's a nice way to use containers with multiple grid system.

Suggested new mixins with @gutter param.

My pull request is ready if you are ok with that.

.container-fixed(@gutter: @grid-gutter-width) {
  margin-right: auto;
  margin-left: auto;
  padding-left:  (@gutter / 2);
  padding-right: (@gutter / 2);
  &:extend(.clearfix all);
}

.container(@gutter: @grid-gutter-width) {
  .container-fixed(@gutter);

  @media (min-width: @screen-sm-min) {
    width: @container-sm;
  }
  @media (min-width: @screen-md-min) {
    width: @container-md;
  }
  @media (min-width: @screen-lg-min) {
    width: @container-lg;
  }
}
@cvrebert cvrebert added this to the v3.2.1 milestone May 17, 2014
@mdo mdo removed this from the v3.2.1 milestone Jun 10, 2014
@mdo mdo mentioned this issue Jun 10, 2014
@mdo mdo closed this as completed in e069709 Jun 10, 2014
@mdo
Copy link
Member

mdo commented Jun 10, 2014

Nice catch—this completes the custom grid mixins. Didn't realize we were just missing this one part.

Worth noting though that your calling of the mixing with the variable isn't necessary for the base styles. Given that @grid-gutter-width is the default value, it'll be there unless you customize it.

@mdo mdo added this to the v3.2.0 milestone Jun 10, 2014
stempler pushed a commit to stempler/bootstrap that referenced this issue Nov 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants