1.2.0 • Published 3 months ago

postcss-media-revers v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

postcss-media-revers

PostCSS media revers plugin.

/* Input example */
.foo {
  color: #7f7f7f;
  width: 100px;
}
/* Output example */
@media (min-width: 1281px) {
  .foo {
    color: #7f7f7f;
    width: 100px;
  }
}

Options

revertMediaPoint: Int (default: 1281)

Media point Integration point for a task

banNames: Array (template: "_ban")

Ban check file includes

exclude: Array RegExp (template: new RegExp('/styles/includes/'))

Exclude all files to regular path

onlyPX: Boolean (default: false)

/* Input example */
.foo {
  color: #7f7f7f;
  width: 100px;
}
/* Output example */
@media (min-width: 1281px) {
  .foo {
    width: 100px;
  }
}

Usage

Step 1: Install plugin:

npm install --save-dev postcss postcss-media-revers

Step 2: 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 do not use PostCSS, add it according to official docs and set this plugin in settings.

Step 3: Add the plugin to plugins list:

module.exports = {
  plugins: {
+   'postcss-media-revers': {
      revertMediaPoint: Int,
      banNames: ['fileName']
    }
  }
}
1.2.0

3 months ago

1.1.4

11 months ago

1.1.3

11 months ago

1.1.2

11 months ago

1.1.1

12 months ago

1.1.0

12 months ago

1.0.8

12 months ago

1.0.7

12 months ago

1.0.6

12 months ago

1.0.5

12 months ago

1.0.4

12 months ago

1.0.3

12 months ago

1.0.2

12 months ago

1.0.1

12 months ago

0.0.0

12 months ago