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

Bad PostCSS API #4

Open
ai opened this issue Jul 27, 2015 · 0 comments
Open

Bad PostCSS API #4

ai opened this issue Jul 27, 2015 · 0 comments

Comments

@ai
Copy link

ai commented Jul 27, 2015

PostCSS is not about writing CSS4 code. Many PostCSS users didn’t use cssnext.

This is why PostCSS plugins should not provide mixins or variables.

The correct PostCSS way is a PostCSS plugin, which will replace antiquebrass right in CSS to #cd9575. This plugin will be very easy:

var postcss = require('postcss');

module.exports = postcss.plugin('postcss-crayon', function () {
  return function(css) {
    css.eachDecl(function (decl) {
        decl.value = replaceColors(decl.value);
    });
  };
});

Check put also postcss-brand-colors.

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

1 participant