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.
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.
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.