Skip to content

Instantly share code, notes, and snippets.

@allenmoore
Last active October 12, 2016 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save allenmoore/26bb34f098093c4bd5be8f0b1acac6b8 to your computer and use it in GitHub Desktop.
Save allenmoore/26bb34f098093c4bd5be8f0b1acac6b8 to your computer and use it in GitHub Desktop.
Px to Rem with PostCSS
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