postcss-mobile-only-mqs

0.0.2 • Public • Published

postcss-mobile-only-mqs

PostCSS plugin to remove non-mobile media queries.

body {
  font-size: 14px;
}
 
@media (min-width: 768px) {
  body {
    font-size: 16px;
  }
}
body {
  font-size: 14px;
}

Usage

Check your project for existing 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-exclude-blocks')(options),
    require('autoprefixer')
  ]
}

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

Options

options.maxBreakpoint (string) To allow for larger mobile styling, media queries below this breakpoint will be preserved.

/postcss-mobile-only-mqs/

    Package Sidebar

    Install

    npm i postcss-mobile-only-mqs

    Weekly Downloads

    19

    Version

    0.0.2

    License

    MIT

    Unpacked Size

    5.15 kB

    Total Files

    6

    Last publish

    Collaborators

    • laurenashpole