Last active
October 2, 2015 17:34
-
-
Save mfurlend/3fefd98458272d612376 to your computer and use it in GitHub Desktop.
Display your current viewport (xs, sm, md or lg) context when using Bootstrap
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
/*Detect Your Current Viewport Context | |
This small CSS snippet will display your current viewport (xs, sm, md or lg) context when using Bootstrap. It can be useful for testing responsive sites, or demoing responsive behaviors on different viewports. Hope it helps someone out there! | |
*/ | |
body::before { | |
content: "xs"; | |
position: fixed; | |
top: 0; | |
left: 0; | |
z-index: 9999999; | |
background-color: #000; | |
color: #fff; | |
} | |
@media (min-width : 768px) { body::before { content: "sm"; }} | |
@media (min-width : 992px) { body::before { content: "md"; }} | |
@media (min-width : 1200px) { body::before { content: "lg"; }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment