Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Use a build system or CSS in JS library to hash your class names and keep them private.

Please don't. Human-readable and rarely changing class names are one of the few things keeping customization on the Web still possible.

Just add an application name class selector to the beginning of each style block (perhaps as part of your build so you can do it for dependencies too) and put those classes on your body. For bonus points, put those classes as deep in the tree as reasonable and you have yourself scoped styles - all with zero JS and compiler fuckery.

I've used this method to mix Bootstrap versions on one page as well as two completely different CSS frameworks. Obviously not something you want to do, but you might need to once in a while.



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

Search: