Dave Woods - Freelance Web Design Warwickshire

Are we getting carried away with CSS3?

I’ve been trying to catch up a lot recently with the progress of CSS3 and how it can be used positively to improve code and simplify both the HTML and CSS.

CSS.info is a great resource for this kind of information and a lot of the content is useful, but the recent post on Lists to get more decorative which contains information on the new lists module got me thinking that some of the modules being talked about may not be all that useful and we might just be getting carried away with the buzz and excitement.

Sure, we all want curved corners, multiple columns and multiple background images but do we really need a new CSS module for every possible eventuality?

The new lists module contains a wider range of glyphs, markers and counters whilst also allowing the designer to style a list without using extra HTML markup.

li::marker

This CSS3 markup will allow the designer to target the marker for the list directly so that different CSS values can be applied independently of the text instead of surrounding the text with a .

It may be useful for that rare occasion when you need the marker to be a different size and colour to the text but in reality how often is it needed?

In my experience, I’ve wanted a nice shiny graphic as my list marker and due to support for list-style-image being extremely flaky cross browser, I’ve resorted to removing the list-style-type, using a background-image on the <li> and adjusting the left padding accordingly.

A few people on CSS.info accused this of being a hack, but it’s valid code and works cross browser as far back as IE5.x so I don’t really understand the rational behind those comments especially as it’s the most commonly accepted method for currently styling a list.

Summary

Don’t get me wrong, I’m all in support of CSS3 but are we not in danger of over-complicating it? I’m not suggesting it’s perfect at the moment or that a lot of CSS3 won’t be wonderfully useful but it would be much more useful for me personally if the browser manufacturers could get consistency for the list-style-image property when CSS3 becomes a standard rather than introducing minimal changes that this new list module seems to introduce.

6 comments on “Are we getting carried away with CSS3?

  1. Peter Gasston

    Hi Dave,

    Just to address one point you made:

    “A few people on CSS.info accused this of being a hack, but it’s valid code and works cross browser as far back as IE5.x so I don’t really understand the rational behind those comments especially as it’s the most commonly accepted method for currently styling a list.”

    The key phrase there is ‘most commonly accepted method for currently styling a list’; it’s true, and it’s not really a hack; but it IS a workaround, same as the ‘sliding doors’ method of styling lists; they work, they overcome problems we currently face, and they use valid CSS; they’re the best way of doing something NOW, but not the best way of doing something EVER.

    CSS3 is a complete and definitive rewrite of the CSS standard; that means that every aspect gets looked at, not just the enhanced stuff. Styling lists is a problem, and the new Lists module is an attempt at a solution.

  2. Dave Post author

    @Peter, thanks for the comments.

    I appreciate that using a background image isn’t ideal but the article on CSS3.info seems to suggest that this module can be used to get around the fact that browsers implement the list-style-image differently.

    It may be useful in the right situations but as you’ve pointed out, hopefully the way that lists are currently rendered will be looked at for CSS3 as along with forms they’re probably the most difficult elements to style.

    I’m all for CSS3 and your articles on CSS3.info give me a lot of insight so please don’t take this as a personal attack on yourself or CSS3. This article was aimed more to highlight that we should also be considering what fixes need to be implemented into CSS3 instead of just introducing new modules as workarounds for problems that already exist.

    @Joost, maybe that’s in an ideal world but with the current implementation of CSS I don’t think we’re that far away apart from dealing with issues to do with lists and forms. Then the fun of different implementations across browsers of CSS3 begins :)

  3. Michael from Pro Blog Design

    Well said. There are a few modules that I’m very excited about (The obvious ones like background+border images, and advanced selectors), but that’s it. The rest isn’t needed anywhere near as badly as those few modules.

    It’s a shame that the extras are able to hold up the implementation of CSS3 for so much longer…

  4. Peter Gasston

    @ Dave: Please, don’t worry; I didn’t read this as an attack at all.

    @ Michael: One of the good things about CSS 3 is that it is being introduced in modular format, rather than all in one go; for example, the Selectors module is already at an advanced stage and already pretty well implemented in modern browsers.