Cc-plugin-audit: Defensive supply-chain security analysis on plugin auto-update
github.com1 pointsby Sottilde0 comments
@mixin buttonGradient($color){
@include basicBackgroundGradient($color);
&:hover, &.hover{
@include basicBackgroundGradient(hover-color($color));
}
&:active, &.active{
@include basicBackgroundGradient(active-color($color));
}
}
@mixin basicBackgroundGradient($color, $percent:12%){
background: $color;
@include background-image(linear-gradient($color, darken($color, $percent)));
}
Then, anywhere I want a green button to be created, I use the style @include buttonGradient(green);. Or any color. Keeping a stylesheet full of site-wide colors is incredibly useful and being able to modify them via functions like darker() and lighter() really saves time. Consider that this simple include actually generates 18 lines of CSS each time I invoke it - in the words of an old boss, now you're really cookin with gas.