Skip to content

Instantly share code, notes, and snippets.

@acdlite
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acdlite/9168073 to your computer and use it in GitHub Desktop.
Save acdlite/9168073 to your computer and use it in GitHub Desktop.
Sass/Compass mixin for diagonal stripe pattern backgrounds
@mixin diagonal-stripe-pattern-background($color-1, $color-2, $ratio, $size) {
$ratio: percentage($ratio / 2);
@include background(linear-gradient(-45deg,
$color-1 (50% - $ratio),
$color-2 (50% - $ratio),
$color-2 50%, $color-1 50%,
$color-1 (100% - $ratio),
$color-2 (100% - $ratio)));
@include background-size($size $size);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment