Skip to content

Instantly share code, notes, and snippets.

@ZeeAgency
Created February 28, 2012 09:42
Show Gist options
  • Save ZeeAgency/1931593 to your computer and use it in GitHub Desktop.
Save ZeeAgency/1931593 to your computer and use it in GitHub Desktop.
Untitled
body {
padding: 0px;
width: 1500px;
margin: 0 auto;
font-family: Monaco;
color: #1b8ac9;
}
.sheet {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
position: relative;
float: left;
margin: 30px 30px 30px 0;
background: -webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(0%, rgba(27, 138, 201, 0.4)), color-stop(1px, rgba(255, 255, 255, 0)), color-stop(100%, rgba(255, 255, 255, 0))), -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(27, 138, 201, 0.4)), color-stop(1px, rgba(255, 255, 255, 0)), color-stop(100%, rgba(255, 255, 255, 0)));
background: -webkit-linear-gradient(left, rgba(27, 138, 201, 0.4), rgba(255, 255, 255, 0) 1px, rgba(255, 255, 255, 0)), -webkit-linear-gradient(top, rgba(27, 138, 201, 0.4), rgba(255, 255, 255, 0) 1px, rgba(255, 255, 255, 0));
background: -moz-linear-gradient(left, rgba(27, 138, 201, 0.4), rgba(255, 255, 255, 0) 1px, rgba(255, 255, 255, 0)), -moz-linear-gradient(top, rgba(27, 138, 201, 0.4), rgba(255, 255, 255, 0) 1px, rgba(255, 255, 255, 0));
background: -o-linear-gradient(left, rgba(27, 138, 201, 0.4), rgba(255, 255, 255, 0) 1px, rgba(255, 255, 255, 0)), -o-linear-gradient(top, rgba(27, 138, 201, 0.4), rgba(255, 255, 255, 0) 1px, rgba(255, 255, 255, 0));
background: -ms-linear-gradient(left, rgba(27, 138, 201, 0.4), rgba(255, 255, 255, 0) 1px, rgba(255, 255, 255, 0)), -ms-linear-gradient(top, rgba(27, 138, 201, 0.4), rgba(255, 255, 255, 0) 1px, rgba(255, 255, 255, 0));
background: linear-gradient(left, rgba(27, 138, 201, 0.4), rgba(255, 255, 255, 0) 1px, rgba(255, 255, 255, 0)), linear-gradient(top, rgba(27, 138, 201, 0.4), rgba(255, 255, 255, 0) 1px, rgba(255, 255, 255, 0));
-moz-background-size: 32px 32px;
-webkit-background-size: 32px 32px;
-o-background-size: 32px 32px;
background-size: 32px 32px;
-moz-background-clip: border;
-webkit-background-clip: border;
-o-background-clip: border-box;
-ms-background-clip: border-box;
-khtml-background-clip: border-box;
background-clip: border-box;
-moz-box-shadow: rgba(27, 138, 201, 0.5) 0 0 0 1px inset;
-webkit-box-shadow: rgba(27, 138, 201, 0.5) 0 0 0 1px inset;
-o-box-shadow: rgba(27, 138, 201, 0.5) 0 0 0 1px inset;
box-shadow: rgba(27, 138, 201, 0.5) 0 0 0 1px inset;
}
.sheet:before {
content: '';
display: block;
position: relative;
border-bottom: 3px solid #1b8ac9;
top: -25px;
height: 20px;
text-align: right;
}
.sheet.viewport:before {
content: attr(data-width) "×" attr(data-height);
}
.breakpoint {
position: absolute;
margin-top: -23px;
height: 100%;
-moz-box-shadow: rgba(27, 138, 201, 0.5) 2px 0 0 0;
-webkit-box-shadow: rgba(27, 138, 201, 0.5) 2px 0 0 0;
-o-box-shadow: rgba(27, 138, 201, 0.5) 2px 0 0 0;
box-shadow: rgba(27, 138, 201, 0.5) 2px 0 0 0;
}
.breakpoint:before, .breakpoint:after {
position: absolute;
display: block;
top: -31px;
right: -31px;
width: 60px;
}
.breakpoint:before {
content: '';
top: -12px;
right: -6px;
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-top: 5px solid #1b8ac9;
}
.breakpoint:after {
content: attr(data-width);
padding: 2px 0;
text-align: center;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
-o-border-radius: 4px;
-ms-border-radius: 4px;
-khtml-border-radius: 4px;
border-radius: 4px;
}
<div style="width: 1200px; height: 768px;" data-width="1200" data-height="768" class="sheet">
<div class="breakpoint" data-width="320"></div>
<div class="breakpoint" data-width="600"></div>
<div class="breakpoint" data-width="768"></div>
<div class="breakpoint" data-width="1024"></div>
<div class="breakpoint" data-width="1200"></div>
</div>
<div data-width="1024" data-height="768" class="sheet viewport"></div>
<div data-width="320" data-height="768" class="sheet viewport"></div>
<div data-width="768" data-height="1024" class="sheet viewport"></div>
<div data-width="600" data-height="1024" class="sheet viewport"></div>
{"view":"split","seethrough":"","prefixfree":"1","page":"html"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment