I wonder if we’ll ever see CSS in XML-format. Imagine creating styles like:
I doubt there’s any real benefit to it, just an odd thought.
As a vehicle for delivering CSS to the browser, what a pain the rear to code... on the other hand, as a vehicle for delivering CSS that's meant to be parsed for other purposes*, it would make things much, much easier.
*I began a project a year or so ago that would take a URL, grab the stylesheet associated with that URL (had to be an external stylesheet), read through it, compare style attributes to the HTML tags in the originating document, and display the styles that were unused or extraneous.
The process of parsing the CSS would have been MUCH easier with something like this, because everyone's CSS would look the same, essentially. As it stands now, everyone writes their stylesheets differently, and so walking through one with little more than a few REGEX's makes things really hairy... :-)
Actually converting a given stylesheet to XML can't be that difficult. Writing an CSS2XML program could be a way to kill a few afternoons :)
But the thing with CSS is that it is easy enough to parse. There is no need for the extreme verbosity of XML to write simple styles. As the styles in the CSS are simply represented as a list (AFAIK), using a powerful nested structure would be overkill.