// Diagonals
@mixin diagonal($rotation, $background, $height, $pos: after) {
&:#{$pos} {
content: "";
display: block;
position: absolute;
width: 100%;
height: $height;
background: #{$background};
transform: skewY($rotation); // Skew it
z-index: 0;
// If the screen is really large,
// Reduce your rotation angle
@media (min-width: 2000px) {
transform: skewY($rotation / 2);
}
@content; // Insert more CSS if needed
}
}