Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nib and Stylus variables do not work well together #333

Open
mitar opened this issue Aug 29, 2016 · 3 comments
Open

nib and Stylus variables do not work well together #333

mitar opened this issue Aug 29, 2016 · 3 comments

Comments

@mitar
Copy link

mitar commented Aug 29, 2016

For this example:

@import 'nib'

$input-transition ?= all .3s

.test
  transition $input-transition

The output without nib is:

.test {
  -webkit-transition: all;
  -moz-transition: all;
  -o-transition: all;
  -ms-transition: all;
  transition: all;
}

But it should be more something like:

.test {
  -webkit-transition: all 0.3s;
  -moz-transition: all 0.3s;
  -o-transition: all 0.3s;
  -ms-transition: all 0.3s;
  transition: all 0.3s;
}

If I do not use a variable, it works.

@skozin
Copy link

skozin commented Sep 26, 2016

Hitting the same issue.

This:

.test
  $opacity-trans = opacity 0.2s linear
  transition $opacity-trans

incorrectly produces

.test {
  transition: opacity;
  /* prefixed variants */
}

However, this:

.test
  $opacity-trans = opacity 0.2s linear
  transition $opacity-trans, color 0s linear

correctly produces

.test {
  transition: opacity 0.2s linear, color 0s linear;
  /* prefixed variants */
}

Do you know of any workarounds apart from not using variables or adding dummy items to the list (like color 0s linear in the example above)?

@mitar
Copy link
Author

mitar commented Sep 26, 2016

I started using stylus with autoprefixer to solve this issue for me.

@Patrick-Fieger
Copy link

Same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants