grunt-pixrem
grunt-pixrem copied to clipboard
Target all CSS files?
Anyway of targeting all .css
files within a directory?
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.
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.
@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'],
}
}
},