Last active
December 16, 2015 07:28
-
-
Save chetan/5399040 to your computer and use it in GitHub Desktop.
helper for debugging responsive css stuff
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
/* | |
via: http://johanbrook.com/design/css/debugging-css-media-queries/ | |
add the following to the header first: | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
*/ | |
@media only screen and (min-width: 768px) and (max-width: 979px){ | |
body::before{ | |
content: "Tablet media query (768 < 979) fired"; | |
font-weight: bold; | |
display: block; | |
text-align: center; | |
background: rgba(255,255,0, 0.9); | |
position: absolute; | |
top: 0; | |
left: 0; | |
right: 0; | |
z-index: 99; | |
} | |
} | |
@media only screen and (max-width: 767px){ | |
body::before{ | |
content: "Mobile media query (0 < 767) fired"; | |
font-weight: bold; | |
font-size: .8em; | |
display: block; | |
text-align: center; | |
background: rgba(255,0,0, 0.8); | |
position: absolute; | |
top: 0; | |
left: 0; | |
right: 0; | |
z-index: 99; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment