1.0.1 • Published 7 years ago

postcss-scale-media-query v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

Postcss Scale Media Query Build Status

The goal of this postcss plugin is to scale all media query -width by some percentage.

This will only alter the values of the following media query features:

  • min-width
  • max-width
  • min-device-width
  • max-device-width

Install

npm install postcss-scale-media-query

Use

const postcss = require('postcss');
const ScaleMediaQuery = require('postcss-scale-media-query');

const css = '@media (min-width:480px) { color: red; }';
const updatedCss = postcss([
  ScaleMediaQuery({ scale: 1.5 }),
]).process(css).css;

console.log(updatedCss);
// '@media (min-width:720px) { color: red; }'