stylus / nib

Stylus mixins, utilities, components, and gradient image generation
http://stylus.github.io/nib
MIT License
1.91k stars 249 forks source link

linear-gradient(join()) #218

Closed martinkadlec0 closed 10 years ago

martinkadlec0 commented 10 years ago

HI, I'm using grunt-contrib-stylus (0.37.0) to convert my *.styl files. All my gradients like:

background: linear-gradient(to right, #d1d1d1 0%, #eee 0%);
or
background: linear-gradient(left, #d1d1d1 0%, #eee 0%);

get converted to:

-(webkit|...)-background: linear-gradient(join());
background: linear-gradient(join());

Is this a bug or am I doing something wrong?

martinkadlec0 commented 10 years ago

radial-gradients work fine

notslang commented 10 years ago

For me, when I compile:

@import nib

p
  background: linear-gradient(to right, #d1d1d1 0%, #eee 0%);
  background: linear-gradient(left, #d1d1d1 0%, #eee 0%);

I get:

p {
  background: -webkit-linear-gradient(left, #d1d1d1 0%, #eee 0%);
  background: -moz-linear-gradient(left, #d1d1d1 0%, #eee 0%);
  background: -o-linear-gradient(left, #d1d1d1 0%, #eee 0%);
  background: -ms-linear-gradient(left, #d1d1d1 0%, #eee 0%);
  background: linear-gradient(to right, #d1d1d1 0%, #eee 0%);
  background: -webkit-linear-gradient(left, #d1d1d1 0%, #eee 0%);
  background: -moz-linear-gradient(left, #d1d1d1 0%, #eee 0%);
  background: -o-linear-gradient(left, #d1d1d1 0%, #eee 0%);
  background: -ms-linear-gradient(left, #d1d1d1 0%, #eee 0%);
  background: linear-gradient(to right, #d1d1d1 0%, #eee 0%);
}

Perhaps you're using an outdated version of nib, or maybe you have some other syntax issue?

martinkadlec0 commented 10 years ago

The package.json says I'm using "version": "1.0.1", however when I print require('nib').version it says 0.8.2 .. ??

anyway, I found out the problem happens only if I use "imports: ['nib']" option in grunt instead of @import in the css files

notslang commented 10 years ago

hmm... that is quite strange. perhaps it's an issue in grunt? ... anyway, imma close this