mixin for 'container' class in Bootstrap v3

css, less, mixins, twitter-bootstrap-3

Solution

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;
  }
}

Problem

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?

Original source