Last active
October 19, 2019 17:17
-
-
Save juanbrujo/bb3a8897b12773496d72 to your computer and use it in GitHub Desktop.
LESS mediaqueries mixin
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
// Declare your mediaqueries breakpoints | |
@mobile: ~"only screen and (max-width: 529px)"; | |
@tablet: ~"only screen and (min-width: 530px) and (max-width: 949px)"; | |
@desktop: ~"only screen and (min-width: 950px) and (max-width: 1128px)"; | |
@desktop-xl: ~"only screen and (min-width: 1129px)"; | |
// Use them easily in your CSS declaration: | |
element { | |
property: value; | |
@media @tablet { | |
property: tablet-value; | |
} | |
@media @desktop { | |
property: desktop-value | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pretty neat!