Skip to content

Instantly share code, notes, and snippets.

@4foot30
Created September 11, 2016 20:46
Show Gist options
  • Save 4foot30/d51ef33196a20d39f24286ee4b426563 to your computer and use it in GitHub Desktop.
Save 4foot30/d51ef33196a20d39f24286ee4b426563 to your computer and use it in GitHub Desktop.
For the Bootstrap grid: turn a .container into a .container-fluid (useful for full-width layouts on tablet)
//
//
// ***** Apply fluid widths to containers (simulate .container-fluid) *****
//
//
.make-fluid(@breakpoint){
.fluid-@{breakpoint}{
width: auto;
}
}
// Extra small grid
@media (min-width: 0) and (max-width: @screen-xs-max) {
.make-fluid(xs);
}
// Small grid
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
.make-fluid(sm);
}
// Medium grid
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
.make-fluid(md);
}
// Large grid
@media (min-width: @screen-md-max) {
.make-fluid(lg);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment