Created
September 19, 2014 21:18
-
-
Save patrickbjohnson/24e1a647243c6ed2481f to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or 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
| // ---- | |
| // 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); | |
| } |
This file contains hidden or 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
| .block { | |
| background-color: #0879b2; | |
| foo: bar; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment