user1987630
user1987630

Reputation:

mixin for 'container' class in Bootstrap v3

A mixin for container class in Bootstrap v3 could not be found but there is container-fixed() which is near.

Help me with ways by which i can use container class through mixins?

Upvotes: 3

Views: 6150

Answers (1)

Slawa Eremin
Slawa Eremin

Reputation: 5415

You can import "grid.less" from bootstrap and simply use:

.your-container{
  .container();
}

or copy from bootstrap into your class:

.your-container{
  .container-fixed();

@media (min-width: @screen-sm) {
    width: @container-sm;
  }
  @media (min-width: @screen-md) {
    width: @container-md;
  }
  @media (min-width: @screen-lg-min) {
    width: @container-lg;
  }
}

Upvotes: 8

Related Questions