Sponsored by Best Buy
Best Buy Employees Turn Carolers For A Day view!
www.youtube.com/bestbuy - Go behind the scenes to see real employees croon their way to star in Best Buy's holiday campaign.
22 Comments
- AdverseEntropy, on 10/12/2007, -1/+11I definitely agree with all these points, especially about the organization. I've seen and written some really messy code, and it slows the flow exponentially.
- MattLat, on 10/12/2007, -0/+10I agree with all of them except #2 - a lot of times I'm actually styling the entire document, and rather than go through and style ever individual element, it's nice to, you know, use the cascading part of css. You go more specific when you want to change things when it's appropriate. That's where specificity comes in.
- nomad111, on 10/12/2007, -0/+8Most gifted programmers have ***** looking sites.. so maybe the reverse is true ; )
- tzmguitarist, on 10/12/2007, -0/+6He clarifies this with "Judi" who replied at the bottom. In his edit he states that you should find the lowest common elements and default style those. For instance, if all your h2 tags have 0px padding, then why type it 5 times?
- rasterbator, on 10/12/2007, -3/+9James Worthy knows CSS?
- Dracos, on 10/12/2007, -0/+4#1 is generally a good idea, I find other means of organising the rules works better.
In point #2, he basically says he doesn't like the first C in CSS: Cascading. Anything declared in default styles can be overridden with class, id, inline styles, or more specific rules. Default styles lead to consistency in a design, because they are have the least specificity.
He contradicts himself between #3 and #4.
In #3, he blatantly advocates abusing semantic tags merely for visual effect. 'em' and 'strong' are the semantic replacements for 'i' and 'b' (respectively). Convention says that they correspond visually, not any spec. He should define span.bold and span.italic instead if all he wants to do is mess with visual display. Ten in #4, he says use the tags as they're intended.
#5 is the best point he makes. Declaring span.red may work with the current design's color scheme for displaying error messages, but if the colors change dramatically and span.red doesn't literally show red text, then the rule doesn't say what it means. Calling it span.error is future-proof. - MattLat, on 10/12/2007, -1/+5Two different things entirely, actually.
- MattLat, on 10/12/2007, -0/+4@tzmguitarist
That's what I'm saying. If every anchor tag on your page is green, except for one place, you should have a{color:green;} and then in the specific place, go #menu a{color:red;}
Instead of not having the A at all, and every place you want your a to be green, go through and tell it that it's green. - nomad111, on 10/12/2007, -0/+3Article has some good insights for people coming into css design. I think naturally these things happen after practice. I have stared at my style sheets in awe at the lack of organization when I first started. After time passes you learn Oranization is a good foundation for really helping any design... and your own sanity.
- bakagaigin, on 10/12/2007, -1/+4Programming is for Design flunkies.
- pornel, on 10/12/2007, -0/+3One of the few webdev-related articles really worth a digg. Doesn't even mention AJAX! :D
- inactive, on 10/12/2007, -0/+3I do both well and you're a moron.
- hello2usir, on 10/12/2007, -5/+7You had me up until the second blah.
- Daychilde, on 10/12/2007, -0/+2(I think tzmquitarist was just pointing out that he updated it -- I think everyone here agrees on this point)
- fforw, on 10/12/2007, -0/+2Not using "default styles" is BS. "Default styles" define the way the standard elements look in the main content unless they're somewhere in a menu or sidebar or footer or whatever.
- CrimsonBlur, on 10/12/2007, -0/+1As nomad111 said, all of these techniques eventually come to the surface as you have more experience writing large stylesheets, but it is an excellent article even for experienced developers, and especially helpful for novices to skip over all of the time spent making confusing and sometimes broken stylesheets. All of his advice is spot-on and relevant, as are his critiques of other "lists".
- starmanjones, on 10/12/2007, -0/+1this is good. i read the previous tips article and had the same thoughts. this guy is giving good tips on the process. the other one just copying out of a book somewhere and it was describing the optimal end state... not how you get there with as little back tracking and confusion as possible.
- CrimsonBlur, on 10/12/2007, -0/+1Yeah, you're right about point #2. Now that I read it again, I agree that is bad advise. Not only that but as you said he totally ignores the fact that the C in CSS is there specifically because it has this property, and it's a Good Thing.
- armbar, on 10/12/2007, -0/+1Point #1, organizing can probably be better implemented using separate files as well. Content with Style published an article about using different CSS files for layout, color, typography, etc. It definitely helps for keeping things organized. http://www.contentwithstyle.co.uk/Articles/17/
#2 is too much of a blanket statement--you should do some sort of defaults on a lot of elements just to get them to look the same across browsers. Margins, padding, and font sizing are the main offenders. I recommend creating a base css file that sets font sizing for the site, and then margins and padding for block-level elements, such as headers, p and ul/ol/dl.
I don't care for the small tag, but I agree with the premise of #3. #'s 4 and 5 are right on. - tuna1, on 10/12/2007, -9/+2It's a joke.
- idiggeverything, on 10/12/2007, -17/+2Blah, Blah, Blah.
- tuna1, on 10/12/2007, -22/+1Web design is for programming flunkies.


What is Digg?