html - Gulp SASS random() failing on ubuntu server -
this question has answer here:
i having issues random()
function in sass when compiling on ubuntu server.
currently working fine locally if run gulp tasks on ubuntu box gulp-sass
output generated once.
this sass:
@function multipleboxshadow($stars, $opacity) { $value: '#{random(2000)}px #{random(2000)}px rgba(255, 255, 255, #{$opacity})'; @for $i 2 through $stars { $value: '#{$value} , #{random(2000)}px #{random(2000)}px rgba(255, 255, 255, #{$opacity})' } @return unquote($value) } @mixin starbase($speed, $size, $amount, $opacity) { box-shadow: multipleboxshadow($amount, $opacity); animation: animstar $speed linear infinite; } #stars { @include starbase(50s, 1px, 700, 1); }
and output on ubuntu box when using gulp-sass:
#stars { animation: animstar 100s linear infinite; box-shadow: 321px 321px rgba(255, 255, 255, 1) , 321px 321px rgba(255, 255, 255, 1) , 321px 321px rgba(255, 255, 255, 1) etc etc.... }
as can see generating random number once , using same value repetitions unlike on local machine output random each time.
if try use sass compiler outside of grunt sass sass/default.css style/default.css
random() fails completly:
#stars { animation: animstar 100s linear infinite; box-shadow: random(2000)px random(2000)px rgba(255, 255, 255, 1) , random(2000)px random(2000)px rgba(255, 255, 255, 1) etc etc.... }
is there need install on ubuntu box random() compile correctly? assumed came native sass.
here sassmeister demo correct compiling: http://sassmeister.com/gist/165fe1dcc831220c8717
turns out had wrong version of sass installed on server, should of checked first. works using sass compiler, sass-gulp
still generates random() once however
Comments
Post a Comment