Skip to content

Instantly share code, notes, and snippets.

@allenmoore
Last active October 12, 2016 16:00
Show Gist options
  • Select an option

  • Save allenmoore/26bb34f098093c4bd5be8f0b1acac6b8 to your computer and use it in GitHub Desktop.

Select an option

Save allenmoore/26bb34f098093c4bd5be8f0b1acac6b8 to your computer and use it in GitHub Desktop.

Revisions

  1. Allen Moore revised this gist Oct 12, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions postcss.js
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,6 @@
    var pxtorem = require( 'postcss-pxtorem' ),
    pxtoremOptions = {
    replace: false,
    rootValue: 16,
    unitPrecision: 10,
    propWhiteList: [
  2. Allen Moore revised this gist Oct 12, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion postcss.js
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@ var pxtorem = require( 'postcss-pxtorem' ),
    rootValue: 16,
    unitPrecision: 10,
    propWhiteList: [
    'font', 'font-size', 'letter-spacing', 'top', 'right', 'bottom', 'left', 'width', 'max-width', 'height', 'max-height', 'padding', 'padding-top', 'padding-right', 'padding-bottom', 'padding-left', 'margin', 'margin-top', 'margin-right', 'margin-bottom', 'margin-left']
    'font', 'font-size', 'letter-spacing']
    };

    module.exports = {
  3. Allen Moore created this gist Oct 12, 2016.
    32 changes: 32 additions & 0 deletions postcss.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    var pxtorem = require( 'postcss-pxtorem' ),
    pxtoremOptions = {
    rootValue: 16,
    unitPrecision: 10,
    propWhiteList: [
    'font', 'font-size', 'letter-spacing', 'top', 'right', 'bottom', 'left', 'width', 'max-width', 'height', 'max-height', 'padding', 'padding-top', 'padding-right', 'padding-bottom', 'padding-left', 'margin', 'margin-top', 'margin-right', 'margin-bottom', 'margin-left']
    };

    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'
    }
    ]
    }
    };