grunt-pixrem icon indicating copy to clipboard operation
grunt-pixrem copied to clipboard

Target all CSS files?

Open lukewhitehouse opened this issue 10 years ago • 3 comments

Anyway of targeting all .css files within a directory?

lukewhitehouse avatar Oct 16 '14 10:10 lukewhitehouse

I'm a rookie with grunt, but I would expect you can use http://gruntjs.com/configuring-tasks#compact-format, http://gruntjs.com/configuring-tasks#custom-filter-function or even better http://gruntjs.com/configuring-tasks#globbing-patterns to target multiple css files. The pixrem source looks like it's supported, too.

RiZKiT avatar Oct 27 '14 08:10 RiZKiT

Hey Luke, if you haven't fixed this issue yet you can use grunt-contrib-concat to merge you css files first and then you could run pixrem on the concatenated file.

roryashfordbentley avatar Nov 17 '14 11:11 roryashfordbentley

@roikles The main problem I was having was that I had a ie.css and styles.css using Jake's IE fallback method and @RiZKiT I tried the last method but it didn't seem to work, ended up going with one of the others as you can see here:

pixrem: {
    options: {
        rootvalue: '1em'
    },
    dist: {
        files: {
             '<%= dirs.assets %>/css/styles.css': ['<%= dirs.assets %>/css/styles.css'],
             '<%= dirs.assets %>/css/ie.css': ['<%= dirs.assets %>/css/ie.css'],
        }
    }
},

lukewhitehouse avatar Nov 17 '14 16:11 lukewhitehouse