Skip to content

Instantly share code, notes, and snippets.

@odelrio
Created January 4, 2016 09:54
Show Gist options
  • Save odelrio/c82fef8f71c082dde8c8 to your computer and use it in GitHub Desktop.
Save odelrio/c82fef8f71c082dde8c8 to your computer and use it in GitHub Desktop.
{LESS} Stripped background generator
.stripped(@direction, @color1, @color2, @size) {
background-image: -webkit-repeating-linear-gradient(@direction, @color1, @color1 25%, @color2 25%, @color2 50%, @color1 50%);
background-image: -moz-repeating-linear-gradient(@direction, @color1, @color1 25%, @color2 25%, @color2 50%, @color1 50%);
background-image: -ms-repeating-linear-gradient(@direction, @color1, @color1 25%, @color2 25%, @color2 50%, @color1 50%);
background-image: -o-repeating-linear-gradient(@direction, @color1, @color1 25%, @color2 25%, @color2 50%, @color1 50%);
background-image: repeating-linear-gradient(@direction, @color1, @color1 25%, @color2 25%, @color2 50%, @color1 50%);
-webkit-background-size: @size * 2 @size * 2;
-moz-background-size: @size * 2 @size * 2;
-o-background-size: @size * 2 @size * 2;
background-size: @size * 2 @size * 2;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment