M
M
myskypesla2016-05-24 17:39:13
JavaScript
myskypesla, 2016-05-24 17:39:13

How to do combine css?

Tell me how to combine css properties or maybe a warning about duplicate selector when generating a project in gulp?
There is main.scss with code:

@import "global.scss";
body {
    color:  #fff;
}

And there is a global.scss file with the code:
body {
    background: green;
}

The output is main.css with the code:
body {
    color: #fff;
}
body {
    background: green;
}

And it needs to be like this:
body {
    color: #fff;
    background: green;
}

I know what gulp-clean-css does, but I don't need css file minification, and you can't turn it off in gulp-clean-css.
Suggest a solution?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Serj-One, 2016-05-24
@Serj-One

I use gulp-csso If, in fact, minification is not needed, it is perfectly disabled, you can leave only the necessary optimizations.

D
Deodatuss, 2016-05-24
@Deodatuss

you can specify a parameter in clean-css keepBreaks:trueand it should not minify, apparently.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question