Last active
August 29, 2016 19:42
-
-
Save apollwebservices/ee4cb9911b9d4ad2dd233d0e1481b921 to your computer and use it in GitHub Desktop.
Easy Media Queries Shortcodes w/ Testing Tags
This file contains hidden or 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
| // Breakpoint Variables | |
| // ------------------------- Source: http://blog.scur.pl/2012/06/variable-media-queries-less-css/ | |
| @highdensity: ~"only screen and (-webkit-min-device-pixel-ratio: 1.5)", | |
| ~"only screen and (min--moz-device-pixel-ratio: 1.5)", | |
| ~"only screen and (-o-min-device-pixel-ratio: 3/2)", | |
| ~"only screen and (min-device-pixel-ratio: 1.5)"; | |
| @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)"; |
This file contains hidden or 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
| // Example Shortcode Usage | |
| section { | |
| margin: 3%; | |
| @media @mobile { | |
| display: block; | |
| margin-top: 4em; | |
| width: 85%; | |
| } | |
| @media @tablet { | |
| width: 37%; | |
| } | |
| @media @desktop, @desktop-xl { | |
| width: 40%; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment