Created
January 21, 2015 10:29
-
-
Save franz-josef-kaiser/620adc8a4bad1f15a855 to your computer and use it in GitHub Desktop.
Twitter Bootstrap: The missing Column for the phone & tablet - with @media queries - Fixes the gap between XS and MD columns with a new `col-s-[1-12]` column that spans between 480px and 768px
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* In your variables.less after the boostrap/less/variables.less were included */ | |
// New width/colums: `col-s-[1-12]` | |
// Fixes the gap between XS and MD | |
@screen-s-min: 480px; | |
@screen-s-max: (@screen-sm-min - 1); | |
@screen-xs-max: (@screen-s-min - 1); | |
/* After the bootstrap/less/grid.less was included */ | |
// XS Breakpoints | |
@media (max-width: @screen-xs-max) { | |
.make-grid(xs); | |
} | |
// S Breakpoints | |
@media (min-width: @screen-s-min) and (max-width: @screen-s-max) { | |
.make-grid(s); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Keep in mind that this will change the behavior of your
col-xs-n
columns. Those are then downsized and get used only for up to480px
screen width.