Hacker News new | past | comments | ask | show | jobs | submit login

While I am not aware of any open source framework doing this, as long as the programmer holds itself to a few basic rules, this should be possible. If all html/js/css is generated by a template language, you keep the css classes easily parsable and you avoid using dynamic classnames in js (data properties are better for that anyway), you can just replace all classes with random ids.

In fact this is how gettext() works.




The Closure Compiler is open source and can do this.


Nice! I didn't know the closure compiler toolkit handles css/html templates too. That explains why googles classnames are mangled.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: