https://github.com/rowno/postcss-remtopx
PostCSS plugin for converting rem to px
https://github.com/rowno/postcss-remtopx
postcss postcss-plugin
Last synced: 12 months 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 10 years ago)
- Default Branch: master
- Last Pushed: 2022-02-13T21:06:15.000Z (over 4 years ago)
- Last Synced: 2025-06-03T05:24:01.905Z (about 1 year ago)
- Topics: postcss, postcss-plugin
- Language: JavaScript
- Size: 434 KB
- Stars: 6
- Watchers: 2
- 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.