Skip to content

PostCSS plugin to prepend a selector in front of all your rules.

License

Notifications You must be signed in to change notification settings

tillschander/postcss-prefix-all-rules

Repository files navigation

PostCSS Prefix All Rules

PostCSS plugin to prepend a selector in front of all your rules.

/* Input example */
.foo { }

.bar,
.baz { }
/* Output example */
.pre .foo { }

.pre .bar,
.pre .baz { }

Usage

Check you project for existed PostCSS config: postcss.config.js in the project root, "postcss" section in package.json or postcss in bundle config.

If you already use PostCSS, add the plugin to plugins list:

module.exports = {
  plugins: [
+   require('postcss-prefix-all-rules')({ prefix: '.pre' }),
    require('autoprefixer')
  ]
}

If you do not use PostCSS, add it according to official docs and set this plugin in settings.

About

PostCSS plugin to prepend a selector in front of all your rules.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published