Hacker News new | ask | show | jobs
by sly010 3394 days ago
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.

1 comments

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.