Skip to content

Instantly share code, notes, and snippets.

@patrickbjohnson
Created September 19, 2014 21:18
Show Gist options
  • Select an option

  • Save patrickbjohnson/24e1a647243c6ed2481f to your computer and use it in GitHub Desktop.

Select an option

Save patrickbjohnson/24e1a647243c6ed2481f to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.4)
// Compass (v1.0.1)
// ----
@function random-decimal($ceil){
$decimal: random($ceil) * 0.1;
@return $decimal;
}
@mixin foo(){
foo: bar;
}
@mixin random-rgba($attr, $color: 255, $alpha: 10){
@if function-exists(random-decimal){
#{$attr}: rgba( random($color),random($color), random($color), random-decimal(200));
@if mixin-exists(foo){
@include foo;
} @else {
&:before {
content: "Custom mixin 'foo' is nto found. Check your shit";
}
}
} @else {
&:before {
content: "Custom function 'random-decimal' is not found. Please go find it";
}
}
}
.block {
@include random-rgba(background-color);
}
.block {
background-color: #0879b2;
foo: bar;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment