Skip to content

yusphy45/postcss-pxn2rem

Repository files navigation

PostCSS Pxn2rem

PostCSS plugin for convert pxn to rem for options(markBaseWidth, columns).

.foo {
  /* Input example */
  height: 37.5pxn;
}
.foo {
  /* Output example */
  height: 1rem;
}

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-pxn2rem')({ markBaseWidth: 375, columns: 10 }),
    require('autoprefixer')
  ]
}

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published