Skip to content

Instantly share code, notes, and snippets.

@raystation
Last active August 29, 2015 14:02
Show Gist options
  • Save raystation/0869cefc230bb8216d07 to your computer and use it in GitHub Desktop.
Save raystation/0869cefc230bb8216d07 to your computer and use it in GitHub Desktop.
will tell you what break point you are on
/*
Responsive Indicator
==================================================
Raystation
http://rayuen.com
*/
.responsive-indicator {
width: 20px;
height: 20px;
position: fixed;
top: 10px;
left: 10px;
z-index: 9999;
opacity: 0.9;
border-radius: 50%;
background-color: rgba(0,0,0,1);
-webkit-transition: background-color 1s;
-moz-transition: background-color 1s;
transition: background-color 1s;
}
/* Larger than 960px (devices and browsers) */
@media only screen and (min-width: 960px) {
.responsive-indicator { background-color: rgba(255,0,0,1); }
}
/* Smaller than standard 960 (devices and browsers) */
@media only screen and (max-width: 959px) {
.responsive-indicator { background-color: rgba(0,0,0,1); }
}
/* Tablet Portrait size to standard 960 (devices and browsers) */
@media only screen and (min-width: 768px) and (max-width: 959px) {
.responsive-indicator { background-color: rgba(0,0,0,0.8); }
}
/* All Mobile Sizes (devices and browser) */
@media only screen and (max-width: 767px) {
.responsive-indicator { background-color: rgba(0,0,0,0.5); }
}
/* Mobile Landscape Size to Tablet Portrait (devices and browsers) */
@media only screen and (min-width: 480px) and (max-width: 767px) {
.responsive-indicator { background-color: rgba(0,0,0,0.3); }
}
/* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */
@media only screen and (max-width: 479px) {
.responsive-indicator { background-color: rgba(0,0,0,0.1); }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment