Last active
August 29, 2015 13:56
-
-
Save acdlite/9168073 to your computer and use it in GitHub Desktop.
Sass/Compass mixin for diagonal stripe pattern backgrounds
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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