Returning a Random Position and Color With SASS -
i'm trying create random color , position drop shadows sass. far have found , got positioning working, struggling random color. code follows:
@import compass @function multiple-box-shadow ($n, $sc) $value: '#{random(2000)}px #{random(2000)}px $sc' @for $i 2 through $n $value: '#{$value} , #{random(2000)}px #{random(2000)}px $sc' @return unquote($value) @return unquote($sc) $shadows-small: multiple-box-shadow(700, '#0000ff') $shadows-medium: multiple-box-shadow(200, '#00ff00') $shadows-big: multiple-box-shadow(100, '#ff0000')
you can do:
rgb(random(256)-1, random(256)-1, random(256)-1);
Comments
Post a Comment