Wednesday, September 27th, 2006

12 Lessons for Those Afraid of CSS and Standards

Category: Articles, CSS

<p>Ben Henick has got a high level editorial on CSS in 2006 (still!).

The cries of frustration I hear from other developers about CSS are only an echo of the ones I made for years. As a result I like to think that I can relate, and I’m writing to convey the most important lessons I’ve learned so far.

Lessons

1. Everything you know is wrong… sort of
2. It’s not going to look exactly the same everywhere unless you’re willing to face some grief… and possibly not even then
3. You will be forced to choose between the ideal and the practicable
4. Perfection is not when there’s nothing to add, but when there’s nothing to take away
5. Some sites are steaming heaps of edge cases
6. Longer lead times are inevitable
7. Coherent and sensible source order is the best of Good Things
8. Descendant selectors are the beginning and end of genuinely powerful CSS rules
9. In the real world, stylesheet hacks will get your project across the finish line
10. Working around rendering bugs is like playing Whack-a-Mole
11. When you’re drowning in CSS layout problems, make sure of the width and height of the water, float without putting up a struggle, and get clear of the problems
12. Background images will make the difference between the plain and the tastefully embellished

Related Content:

Posted by Dion Almaer at 1:17 am
9 Comments

+++--
3.6 rating from 43 votes

9 Comments »

Comments feed TrackBack URI

No link?
And something is goofy with the CSS on this page — the OL seems to count from 9 to 0, then 1 and 2… the first digit is cut off or something.

Comment by Andy — September 27, 2006

http://alistapart.com/articles/12lessonsCSSandstandards

Comment by Andy — September 27, 2006

@Andy 1: It must be a CSS problem, go figure.

Comment by Michael Benner — September 27, 2006

Andy: heh… sorry about that, and thanks for the link. I converted the ol to manual bullets; as Michael says our CSS is obviously messed up here.

Comment by Ben Galbraith — September 27, 2006

Nicely put. My thoughts and feelings exactly.

Comment by Mike Caputo — September 27, 2006

http://www.luizantonio.com/blog/2006/09/28/12-licoes-para-quem-tem-medo-de-css-e-padroes/

Comment by Kernel Cracker — September 28, 2006

[...] All right, the article is actually 12 Lessons for Those Afraid of CSS and Standards, but if I were to write the same list for mobile development, it would be almost identical. -m [...]

Pingback by Push Button Paradise | Blog Archive | 12 Lessons for mobile development — September 28, 2006

Still writing about CSS in 2206… yep. *sigh* Nothing surprising about it.

For example Firefox 1.5.x, unlike earlier versions, diverts from IE’s treatment of height and hews uncompromisingly to a different interpretation of the spec. In the Real World, the result is that those of us who have stylesheets to feed and water need to add min-height rules in situations where we need that behavior faithfully preserved.

When I posted a bug in fury, the feedback I got was, “IE sucks, but Firefox doesn’t” – even though the spec is written ambiguously enough (I read the relevant sections of the spec, in circles, THREE TIMES before I figured out up from down, fercryinoutloud) that I believe it was a really fascist thing to do. The least they could’ve done was wait until IE7 was out in force.

That story is a perfect snapshot of why articles like the one under discussion are still relevant.

Comment by ben — September 30, 2006

gusepuxyxw

drhpxiko yxdpfdbo xtrjiqbgq

Trackback by opoycpeso — October 13, 2006

Leave a comment

You must be logged in to post a comment.