Created
March 11, 2014 17:55
-
-
Save jackmcmorrow/9491278 to your computer and use it in GitHub Desktop.
Bootstrap 3 Media Queries + utilities for text alignment
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
.left {text-align: left;} | |
.center {text-align: center;} | |
.right {text-align: right;} | |
.top {vertical-align: top;} | |
.bottom {vertical-align: bottom;} | |
.block-center {margin: 0 auto;} | |
// var wh = window.innerWidth, size; | |
// if (wh < 768) size = 'xs' | |
// if (wh >= 768) size = 'sm' | |
// if (wh >= 992) size = 'md' | |
// if (wh >= 1200) size = 'lg' | |
// if (wh >= 1400) size = 'xl' | |
@mixin print { | |
@media only print { | |
@content; | |
} | |
} | |
@mixin no-print { | |
@media only print { | |
display: none !important; | |
} | |
} | |
@mixin xs { | |
@media screen and (max-width : 768px) { | |
& {@content;} | |
} | |
} | |
@mixin sm { | |
@media screen and (min-width : 769px) { | |
& {@content;} | |
} | |
} | |
@mixin md { | |
@media screen and (min-width : 992px) { | |
& {@content;} | |
} | |
} | |
@mixin lg { | |
@media screen and (min-width : 1200px) { | |
& {@content;} | |
} | |
} | |
@mixin lg { | |
@media screen and (min-width : 1400px) { | |
& {@content;} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment