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

One-line css classes is horrible, even if you don't have scanning tools at your disposal. It makes it harder to work with your CSS and know what is going on.

I prefer this style, indent the last brace:

http://stopdesign.com/css/base.css

With decent commenting and closing bracket indented, CSS is real easy to browse and understand which section of your page / site you are working on.

The only other option I'd consider is Google's recommendation for defining one attribute, and piling on a ton of selectors that require that attribute. It's totally difficult to maintain but at the same time it makes your site load slightly faster if you have time to spare. Wish there was a program to do convert CSS coding styles automatically...

Also, blueprint.css style of doing CSS where you append a bunch of classes to each HTML element makes me want to stab my eye with a pencil.

my 0.02



Use Blueprint as a blueprint. Remove the span-4's and append-1's after you've created an id or class that does the same thing.

When I use Blueprint I'm able to rapidly create websites (the base typography is the best part of Blueprint) and then you can just gut it out once a site is complete.


Last time I used Blueprint, it was with SASS & Compass, which lets you mix in the blueprint.css rules in the CSS, keeping the HTML clean and semantic instead of a stupid version of tables with all the "span-4" nonsense.




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

Search: