A
A
Adel Khalitov2017-04-06 15:44:19
css
Adel Khalitov, 2017-04-06 15:44:19

How to remove duplicate styles from style2.css file that are in style1.css?

There is a style1.css file

h1 {
   font-size: 1px;
}
h2 {
   font-size: 2px;
}

And the style2.css file
h2 {
   font-size: 2px;
}
h3 {
   font-size: 3px;
}

And it should remain at the output in some n-th css file
h3 {
   font-size: 3px;
}

If it's gulp-uncss, then I can't figure out how to build the logic. I
don't need to delete unused styles, I need to find duplicates of two files and remove them from style2.css.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alex stephen, 2017-04-06
@SaveLolliPoP

Glue all the files into one and throw them into any CSS optimizer .
In principle, you can do this on the fly, for example, using php .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question