Last active
August 29, 2015 14:12
-
-
Save marcus-herrmann/0f813a23db715b911b50 to your computer and use it in GitHub Desktop.
Named mediaquery indicator
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
// More about that approach: http://bigger-on-the-inside.net/articles/named-mediaquery-indicator | |
/* For example in your project wide settings partial */ | |
@mixin mqindicator($mqname) { | |
@if $debug == true { | |
body:before { | |
position: fixed; | |
top: 0; | |
right: 0; | |
z-index: 100000 ; | |
display: inline-block; | |
padding: 5px 10px; | |
background: red; | |
color: #fff; | |
content: ''; // resetting | |
content: $mqname; | |
} | |
} | |
} | |
/* Actual breakpoints, preferably in their own partials. | |
Find an example for the mixin breakpoint() and config | |
here: http://codepen.io/marcus/pen/azmage */ | |
@include breakpoint('beta') { | |
@include mqindicator('beta'); | |
// Other rules... | |
} | |
@include breakpoint('alpha') { | |
@include mqindicator('alpha'); | |
// Other rules... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment