https://github.com/rowno/postcss-remtopx
PostCSS plugin for converting rem to px
https://github.com/rowno/postcss-remtopx
postcss postcss-plugin
Last synced: 7 days ago
JSON representation
PostCSS plugin for converting rem to px
- Host: GitHub
- URL: https://github.com/rowno/postcss-remtopx
- Owner: Rowno
- License: isc
- Created: 2016-01-15T04:24:56.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-02-13T21:06:15.000Z (about 3 years ago)
- Last Synced: 2024-10-01T09:35:22.351Z (7 months ago)
- Topics: postcss, postcss-plugin
- Language: JavaScript
- Size: 434 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# postcss-remtopx
[](https://travis-ci.org/Rowno/postcss-remtopx)
[](https://david-dm.org/Rowno/postcss-remtopx)PostCSS plugin for converting rem to px.
Getting Started
---------------
Install remtopx: `npm install --save-dev postcss-remtopx`Include remtopx and execute:
```js
var postcss = require('postcss');
var remtopx = require('postcss-remtopx');var output = postcss([remtopx]).process('body { padding: 2rem; }');
// body { padding: 32px; }
```Options
-----```js
var output = postcss([remtopx({ rootFontSize: 14 })]).process('body { padding: 2rem; }');
// body { padding: 28px; }
```### `rootFontSize`
Type: `float` Default: `16`
Changes the root font size used to calculate the rem pixel values.
License
-------
postcss-remtopx is released under the ISC license.Copyright © 2016, Roland Warmerdam.