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

前端 未结 7 2189
暗喜
暗喜 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:59

    For css there is YUI compressor. It will remove unnecessary white-space, and convert your properties to shorthand if you don't already use it. As for html I don't know any but remember that trimming white space in html is not always safe.

提交回复
热议问题