Last active
November 23, 2015 00:06
-
-
Save danieltorscho/3fa8794f5b495e125301 to your computer and use it in GitHub Desktop.
Media queries uses alongside with Twitter Bootstrap 3
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
// Media Queries Mixins | |
@xs: ~'max-width: @{screen-xs-max}'; | |
// @media(@xs){} | |
@smmin: ~'min-width: @{screen-sm-min}'; | |
// @media(@smmin) and (@smmax){} | |
@smmax: ~'max-width: @{screen-sm-max}'; | |
// @media(@smmin){} | |
@mdmin: ~'min-width: @{screen-md-min}'; | |
// @media(@mdmin) and (@mdmax){} | |
@mdmax: ~'max-width: @{screen-md-max}'; | |
// @media(@mdmin){} | |
@lg: ~'min-width: @{screen-lg-min}'; | |
// @media(@lg){} | |
/* -------------------------------------------------------------- */ | |
/**** MEDIA QUERIES FOR RESPONSIVE ****/ | |
/* -------------------------------------------------------------- */ | |
@media (max-width: 767px) { | |
} | |
// Media queries | |
/* Extra small devices (phones, less than 768px) */ | |
/* No media query since this is the default in Bootstrap */ | |
/* Small devices (tablets, 768px and up) */ | |
@media (min-width: @screen-sm-min) { | |
.header { | |
.logo { | |
float: none; | |
text-align: center; | |
a { | |
margin: 0 auto; | |
} | |
} | |
} | |
} | |
/* Medium devices (desktops, 992px and up) */ | |
@media (min-width: @screen-md-min) { | |
.header { | |
.logo { | |
float: left; | |
text-align: left; | |
} | |
} | |
} | |
/* Large devices (large desktops, 1200px and up) */ | |
@media (min-width: @screen-lg-min) { | |
} | |
// Occasionally expanded media queries | |
@media (max-width: @screen-xs-max) { | |
} | |
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { | |
} | |
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) { | |
} | |
@media (min-width: @screen-lg-min) { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment