Works with rework-variables?
njj opened this issue · comments
Nick commented
I've been trying for an hour or so now to get this plugin to work with variables and can't seem to get anything to work correctly. Here's my setup.
module.exports = function(grunt) {
var rework_import = require('rework-import');
var rework_vars = require('rework-vars');
grunt.initConfig({
rework: {
'dest/index.css': 'src/index.css',
options: {
toString: { compress: false },
use: [
rework_import,
rework_vars
]
}
}
});
grunt.loadNpmTasks('grunt-rework');
grunt.registerTask('default', ['rework']);
}
The output is identical to the input.
Nick commented
Actually after a bit of poking around it appears that media queries are not being converted for some reason, while regular variables are fine.
@media (min-width: var(--screen-sm-min)) {
.full-width-section {
padding-left: 35px;
}
}
Which is a separate issue here: reworkcss/rework-vars#17
Tamas Szebeni commented
For reference here is a fix:
rework_vars({})
so when declare as use, you need to invoke it with options.