Before Deployment, Is There Tool To Compress HTML Class Attribute And CSS Selectors?


Answer :

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.


There is also a project called "rename-css-selectors" if you handle the code with node:

https://www.npmjs.com/package/rename-css-selectors

There are plugins for nearly every build tool (webpack, parcel, gulp, ...):

https://github.com/JPeer264/node-rcs-core#plugins

This will minify all CSS selectors in HTML, JS and CSS files (actually any file you want). I saved 20ish% of the CSS filesize at the end.


This is amazingly short-sighted.


Comments

Popular posts from this blog

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Can Feynman Diagrams Be Used To Represent Any Perturbation Theory?