andyford's comments

andyford | 8 years ago | on: Shoelace.css – A back to the basics CSS starter kit

I'm glad to see another viable CSS non-framework and Shoelace looks very promising. I haven't put it through its paces yet, but found a nitpicky thing... why have a "table td" selector? You can't have a td outside of a table anyway. This is top of mind for me because I was just grappling with Bootstrap's lovely specificity nightmare ".table > tbody > tr > td"

andyford | 15 years ago | on: Top Programming Fonts

The lowercase 'e' in Monofur is a deal breaker. Too reminiscent of italics. And the mixed baseline numerals don't help either. Otherwise it's pretty nice. Of the 10, Inconsolata deserves to be #1.

andyford | 15 years ago | on: Ask HN: Anyone have a really smart way to organize css?

Like many of the other commenters, I break the code into reset, global elements, layout, modules/blocks, and then special overrides if any.

I'll admit it's a personal preference, but as a team consideration I don't recommend the 'all properties on one line' approach. It's discouraged in other languages so why do it in CSS?

Definitely check out OOCSS as well as the Natalie Downe talk both posted by in the comments already.

I can't overstate how highly I recommend Sass/SCSS. It's been mentioned already as "for Ruby". Yes, you need Ruby installed to use Sass/SCSS but you do not need to be working on a Ruby project to use it. You can run "sass --watch (directory name)" from the command line and sass will automatically compile your .scss (or .sass) files to .css files upon save. Even if you're scared of the command line I assure you, it's easy! If you're a TextMate user, there's also a great SCSS bundle here: https://github.com/kuroir/SCSS.tmbundle (it was enough for me to abandon CSSEdit for good)

One thing that hasn't been discussed in this thread yet is the organization of properties within a declaration block. It's a good idea to have an approach and stick with it. Alphabetizing the properties is one approach. I wrote about my preferred approach a couple years ago here: http://fordinteractive.com/2009/02/order-of-the-day-css-prop... (also check out the SitePoint discussion linked in the "Further Reading" section of the post)

page 1