Before deployment, is there tool to compress HTML class attribute and CSS selectors?

前端 未结 7 2153
暗喜
暗喜 2020-12-24 10:53

In current project, I was asked for compressing the HTML class attribute and corresponding CSS selectors before deployment. For example, the code on

7条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-24 11:44

    If you really want to rename class names (keeping in mind what Madmartigan said) Google Closure Stylesheets does that. It's an overkill, and YUI Compressor or any other minification + gzipping tool should give you enough performance boost, but it can do it. You'll have to use other Closure tools to make appropriate changes to your .js files and html templates.

提交回复
热议问题