postcss-mq-optimize

2.0.1 • Public • Published

PostCSS Mq Optimize Build Status

Build Status

PostCSS plugin Removes invalid media queries or its expressions.

/* Input example */
@media (min-width: 200px) and (max-width: 300px) {
  .foo {}
}
@media (min-width: 200px) and (max-width: 300px) and (min-width: 100px) {
  .bar {}
}
@media (min-width: 200px) and (max-width: 300px) and (min-width: 200px) {
  .baz {}
}
@media (min-width: 200px) and (max-width: 300px) and (max-width: 100px) {
  .qux {}
}
@media screen and (max-width: 300px), (max-width: 200px) {
  .quux {}
}
/* Output example */
@media (min-width: 200px) and (max-width: 300px) {
  .foo {}
}
@media (min-width: 200px) and (max-width: 300px) {
  .bar {}
}
@media (min-width: 200px) and (max-width: 300px) {
  .baz {}
}
@media screen and (max-width: 300px), (max-width: 200px) {
  .quux {}
}

Usage

postcss([ require('postcss-mq-optimize') ])

See PostCSS docs for examples for your environment.

Package Sidebar

Install

npm i postcss-mq-optimize

Weekly Downloads

380

Version

2.0.1

License

MIT

Unpacked Size

7.46 kB

Total Files

4

Last publish

Collaborators

  • panec