Created
September 30, 2016 18:38
-
-
Save etelford/87e8c7825a8c2e7532ecce99f94d88d3 to your computer and use it in GitHub Desktop.
Bootstrap Responsive Debugging
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
<div id="u-debug-size"> | |
<div id="u-debug-size__inner"></div> | |
</div> |
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
#u-debug-size { | |
z-index: 100000; | |
position: fixed; | |
bottom: 0; | |
left: 0; | |
width: 100%; | |
height: 100px; | |
display: block; | |
} | |
#u-debug-size__inner { | |
position: absolute; | |
bottom: 0; | |
left: 0; | |
} | |
#u-debug-size__inner { | |
padding: 10px; | |
} | |
@media (max-width: $screen-xs-max) { | |
#u-debug-size__inner { | |
color: darken(red, 30%); | |
background: lighten(red, 40%) | |
} | |
#u-debug-size__inner::before { | |
content: 'x-small'; | |
} | |
} | |
@media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) { | |
#u-debug-size__inner { | |
color: darken(orange, 30%); | |
background: lighten(orange, 40%) | |
} | |
#u-debug-size__inner::before { | |
content: 'small'; | |
} | |
} | |
@media (min-width: $screen-md-min) and (max-width: $screen-md-max) { | |
#u-debug-size__inner { | |
color: darken(yellow, 30%); | |
background: lighten(yellow, 40%) | |
} | |
#u-debug-size__inner::before { | |
content: 'medium'; | |
} | |
} | |
@media (min-width: $screen-lg-min) { | |
#u-debug-size__inner { | |
color: darken(blue, 30%); | |
background: lighten(blue, 40%) | |
} | |
#u-debug-size__inner::before { | |
content: 'large'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment