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

Not working with postcss-js? #48

Closed
rtsao opened this issue Dec 4, 2015 · 2 comments
Closed

Not working with postcss-js? #48

rtsao opened this issue Dec 4, 2015 · 2 comments

Comments

@rtsao
Copy link

rtsao commented Dec 4, 2015

It seems rtlcss isn't working with postcss-js:

var postcss = require('postcss-js');
var rtlcss = require('rtlcss');
var autoprefixer = require('autoprefixer');

var process = postcss.sync([ rtlcss, autoprefixer ]);

var css = {'.foo': {
  borderColor: 'red green blue black',
  left: '5px',
  transition: 'width 5s'
}};

console.log(process(css));
/*
{'.foo': {
  borderColor: 'red green blue black',
  left: '5px',
  WebkitTransition: width 5s ease,
  transition: 'width 5s ease'
}}
*/

Example:
http://requirebin.com/?gist=df4a18c20ba922ad02c2

@rtsao rtsao changed the title Not working with rtlcss? Not working with postcss-js? Dec 4, 2015
@MohammadYounes
Copy link
Owner

You need to create an rtlcss instance as:

var process = postcss.sync([ rtlcss(), autoprefixer ]);

Then I need to fix an issue caused by not having a source file, which will cause an exception here

Give me a minute to publish a fix.

Thanks!

@MohammadYounes
Copy link
Owner

Fix released in 1.7.2

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

2 participants