Last active
October 12, 2016 16:00
-
-
Save allenmoore/26bb34f098093c4bd5be8f0b1acac6b8 to your computer and use it in GitHub Desktop.
Px to Rem with PostCSS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var pxtorem = require( 'postcss-pxtorem' ), | |
pxtoremOptions = { | |
replace: false, | |
rootValue: 16, | |
unitPrecision: 10, | |
propWhiteList: [ | |
'font', 'font-size', 'letter-spacing'] | |
}; | |
module.exports = { | |
dist: { | |
options: { | |
map: { | |
inline: false, | |
annotation: 'assets/css/dist/' | |
}, | |
processors: [ | |
pxtorem( | |
pxtoremOptions | |
) | |
] | |
}, | |
files: [ | |
{ | |
expand: true, | |
cwd: 'assets/css/src/', | |
src: [ '**/*.css' ], | |
dest: 'assets/css/dist/', | |
ext: '.css' | |
} | |
] | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment