Easy way to combine multiple CSS files into one?

I have several different skins for the site, and I expect that I will do additional skinning soon. It is currently configured in great detail:

/theme1/myCss.css

/theme2/myCss.css

/theme3/myCss.css

/theme4/myCss.css

....

I want to move everything that each theme has into a shared css file that each theme can use

/common/myCommonCss.css

Is there a tool that can compare CSS declarations in each file, determine if they match, and then tag them (or ideally cut / copy) to another file?

+4
source share
2 answers

tools such as Kdiff, Notepad ++, in addition to comparison, will work for you.

+1
source

You cannot combine CSS files without knowing the HTML markup. For example, these two selectors are identical at first glance:

.class1 .class2{color:red;} .class1 > .class2{color:red;} 

But they differ for different HTML markups. So you need a tool that your html knows.

If you are using php then this tool is useful.

0
source

Source: https://habr.com/ru/post/1379540/


All Articles