ggkovacs / Node Px2rem
Licence: mit
Pixel to rem postprocessor
Stars: ✭ 31
Projects that are alternatives of or similar to Node Px2rem
Gulp Postcss
Pipe CSS through PostCSS processors with a single parse
Stars: ✭ 749 (+2316.13%)
Mutual labels: postcss
Concise.css
A CSS framework that's lightweight and easy-to-use. Give up the bloat. Stop tripping over your classes. Be Concise.
Stars: ✭ 941 (+2935.48%)
Mutual labels: postcss
Gatsby Starter Alchemy
A Gatsby starter with PostCSS powers ✨🔮
Stars: ✭ 23 (-25.81%)
Mutual labels: postcss
Turretcss
Turret is a styles and browser behaviour normalisation framework for rapid development of responsive and accessible websites.
Stars: ✭ 729 (+2251.61%)
Mutual labels: postcss
Sapper Template Firebase
Starter Rollup template for Sapper apps with Firebase functions based on https://github.com/nhristov/sapper-template-rollup.
Stars: ✭ 29 (-6.45%)
Mutual labels: postcss
Postcss Position
PostCSS plugin that adds shorthand declarations for position attributes
Stars: ✭ 26 (-16.13%)
Mutual labels: postcss
Postcss Start To End
PostCSS plugin that lets you control your layout (LTR or RTL) through logical rather than physical rules
Stars: ✭ 18 (-41.94%)
Mutual labels: postcss
Grunt Csswring
DEPRECATED. Minify CSS files using PostCSS-based CSSWring
Stars: ✭ 12 (-61.29%)
Mutual labels: postcss
Universal React Base
[OUTDATED] Super basic example to get you started with Universal (😦) React/Redux (+ API requests). Lightweight and straightforward.
Stars: ✭ 6 (-80.65%)
Mutual labels: postcss
Postcss Register Custom Props
PostCSS plugin that transforms custom property registration in CSS to JS
Stars: ✭ 20 (-35.48%)
Mutual labels: postcss
Postcss Interpolate
PostCSS plugin for values interpolation between breakpoints.
Stars: ✭ 9 (-70.97%)
Mutual labels: postcss
Jekyll Boilerplate
Helpful files to get started working on a new Jekyll website
Stars: ✭ 30 (-3.23%)
Mutual labels: postcss
Postcss Icon
PostCSS plugin that adds `css icons` from icon sets
Stars: ✭ 20 (-35.48%)
Mutual labels: postcss
Postcss Banner
PostCSS plugin to add text banner and footer to resulting file
Stars: ✭ 13 (-58.06%)
Mutual labels: postcss
Pixel to rem
Version: 2.0.5
Installation
Run npm install node-px2rem
Usage
'use strict';
const fs = require('fs');
const px2rem = require('node-px2rem');
const css = fs.readFileSync('main.css', 'utf8');
const processedCSS = px2rem.process(css, {
rootValue: 16
});
fs.writeFile('main-rem.css', processedCSS, (err) => {
if (err) {
throw err;
}
console.log('Done.');
});
API
Options
Type: Object | Null
Default:
{
rootValue: 16,
unitPrecision: 5,
propertyBlackList: [],
propertyWhiteList: [],
replace: false,
mediaQuery: false,
minPx: 1
}
-
rootValue
(Number) The root element font size. -
unitPrecision
(Number) The decimal numbers to allow the REM units to grow to. -
propertyBlackList
(Array) The properties that can't change from px to rem. -
propertyWhiteList
(Array) The properties that can change from px to rem -
replace
(Boolean) Replaces rules containing rems instead of adding fallbacks. -
mediaQuery
(Boolean) Allow px to be converted in media queries. -
minPx
(Number) If minimum px greater than or equal can change from px to rem.
License
MIT © 2021 Gergely Kovács ([email protected])
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].