$white:#ffffff80; //white
$clr1:#998aff80; //purple
$clr2:#8ae8ff80; //baby blue
$clr3:#fffeb580; //yellow
$clr4:#ff6eff50; //pink
$clr5:#9cffe480; //green
$clr6:#ffd49c80; //orange
$clr7:#ff8a8d80; //red
$clr8:#3850eb50; //blue
*{
margin:0;
box-sizing:border-box;
}
body{
height:100vh;
display:flex;
align-items:center;
justify-content:center;
}
.patterns {
height:100%;
width:100%;
display:grid;
grid-template-columns: repeat(4,1fr);
border:15px solid white;
}
.plaid {
margin:15px;
}
// plaid styles counter clockwise
.plaid:nth-child(1){
background:repeating-linear-gradient(to right, $clr1 0 16%, transparent 0 28%), repeating-linear-gradient($clr2 0 17%, transparent 0 28%);
}
.plaid:nth-child(2){
background: repeating-linear-gradient(45deg, transparent 0 8%, $clr3 0 14%),repeating-linear-gradient(-45deg, $white 0 6%, $clr4 0 14%), repeating-linear-gradient(-45deg, transparent 0 2%, $clr8 0 4%);
}
.plaid:nth-child(3){
background:repeating-linear-gradient($clr5 0 5%, transparent 0 13.6%) ,repeating-linear-gradient(to right, $clr6 0 10%, $white 0 13.6% );
}
.plaid:nth-child(4){
background: repeating-linear-gradient(45deg, $clr7 0 3%, transparent 0 6%),repeating-linear-gradient(-45deg, $clr8 0 3%, $white 0 6%);
}
.plaid:nth-child(5){
background: repeating-linear-gradient(45deg, transparent 0 10%, $clr5 0 12%),repeating-linear-gradient(-45deg, transparent 0 12%, $clr7 0 20%), linear-gradient(45deg, transparent 0 10%, $clr2 0 25%, transparent 0 45%, $clr2 0 55%, transparent 0 70%, $clr2 0 100%) ;
}
.plaid:nth-child(6){
background:repeating-linear-gradient(to right, $white 0 15%, $clr5 0 45%), repeating-linear-gradient(transparent 0 15%, $clr8 0 45%),
repeating-linear-gradient(to right, transparent 0 20%, $clr8 0 25%);;
}
.plaid:nth-child(7){
background: repeating-linear-gradient(45deg, $clr2 0 5%, transparent 0 15%),repeating-linear-gradient(-45deg, $clr4 0 12%, $white 0 25%),repeating-linear-gradient($clr2 0 12%, $white 0 25%);
}
.plaid:nth-child(8){
background: repeating-linear-gradient( to right, $white 0 10%, transparent 0 20%),repeating-linear-gradient( $clr2 0 7%, transparent 0 10%),linear-gradient( to right, $clr8 0 70%, $clr6 0 100%);
}
评论