Answer the question
In order to leave comments, you need to log in
How to use Gupl-cssnano presets (newbie question)?
Hello!
Just started to learn Gupl and faced the need:
.pipe(cssnano({
autoprefixer: {browsers: supported, add: true, cascade: false, grid: true}, //работает. Остальное - нет
discardOverridden: {removeAll: false},
cssDeclarationSorter: {order: 'smacss'},
//discardComments: {removeAll: false},
discardComments: false,
cssDeclarationSorter: false,
mergeIdents: true
}))
.popover-title, .popover-content{
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif
}
body, label, select, input[type=text], textarea{
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif
}
body, label, select, input[type=text], textarea, .popover-title, .popover-content{
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif
}
Answer the question
In order to leave comments, you need to log in
CSSnano works dozens of times slower and is not the best choice in other respects. Use CSSO or gulp-clean-css with default settings - that's enough if you don't want to mess around with settings.
If you are using version 4 of cssnano, try specifying both preset and your options. For example:
.pipe(cssnano(['default', {
cssDeclarationSorter: false,
discardOverridden: false,
discardComments: false,
mergeIdents: true
}]))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question