Tags: namespaces

Proposal - CSS Namespaces

CSS has no proper namespaces

The other day I was thinking about CSS and the practices that come with it. It’s a good idea to have a lot of shared elements on your website; this means you can use a common CSS file for all pages and more specific stylesheets that load on top of that if necessary. However, as these specific styles may have overlap, you have to either keep these in separate files (and not concatenate them: an extra request) or have different classes on different pages to differentiate them from each other. That’s quite tedious, considering the specificity might be a large chunk of CSS, prepending every selector with the class selector for that page is few extra precious bytes and keystrokes.


Posted 2012-06-19T05:00:00.000Z.