Tools to optimize (remove redundancy and merge) CSS? [closed]

孤街醉人 提交于 2019-11-28 05:14:25

I don't particularly understand what you mean by "clean unused CSS", but in any case, I'll throw two tools at you, and maybe one will work (the good ol' shotgun approach).

CSS Lint seems to point out "duplicate properties". There are a range of articles covering some of what it does. But a test with the two definitions you had,

a { color: #fff; }
a { color: #000; }

it didn't do much of anything. While ...

Code Beautifier did combine the two selectors, opting for the latter of the two (i.e. the style that's actually applied). Resulting in:

a {
  color:#000;
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!