Skip to content

Instantly share code, notes, and snippets.

@korkey128k
Created July 15, 2014 21:54
Show Gist options
  • Save korkey128k/a578440a9cf2937d5e70 to your computer and use it in GitHub Desktop.
Save korkey128k/a578440a9cf2937d5e70 to your computer and use it in GitHub Desktop.
A Pen by Corey Smith.
<div class="checker"></div>
@import "bourbon";
body {
min-height: 100%;
background: #dcdcdc;
}
$border-width: 20px;
$gradient-calc: percentage(($border-width/1px)/10);
.checker {
position: relative;
width: 100%;
height: $border-width;
&:nth-of-type(2n) {
//left: $border-width * 3;
}
}
.checker:before, .checker:after {
@include background(linear-gradient(to left, white 50%, black 50%, black 100%));
content: '';
position: absolute;
top: 0;
left: -$gradient-calc;
width: ($gradient-calc*2) + 100;
height: $border-width/2;
background-size: $border-width $border-width;
background-repeat: repeat-x;
}
.checker:before {
//box-shadow: 0 1px 1px rgba(black, .3);
}
.checker:after {
top: $border-width / 2;
margin-left: $border-width / 2;
//left: $border-width * 3;
//box-shadow: 0 1px 1px rgba(white, .3);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment