https://github.com/neurosnap/postcss-scale-media-query
Scale media query `-width` by some percentage
https://github.com/neurosnap/postcss-scale-media-query
media-query postcss postcss-plugin scale
Last synced: 2 months ago
JSON representation
Scale media query `-width` by some percentage
- Host: GitHub
- URL: https://github.com/neurosnap/postcss-scale-media-query
- Owner: neurosnap
- Created: 2017-04-08T14:05:17.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-26T20:58:13.000Z (about 9 years ago)
- Last Synced: 2025-03-09T13:02:54.672Z (over 1 year ago)
- Topics: media-query, postcss, postcss-plugin, scale
- Language: JavaScript
- Homepage:
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
Postcss Scale Media Query [](https://travis-ci.org/neurosnap/postcss-scale-media-query)
=========================
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
-------
```bash
npm install postcss-scale-media-query
```
Use
---
```js
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; }'
```