Here’s a question for web designers. It’s a bit of a clich question and I’m not advocating it at all, I’m purely curious.
As a designer, do you think you would find CSS more intuitive if it had been XML based, rather than the syntax they did choose?
I ask because it’s on my mind and I’m curious (especially in light of Andy Clarke’s comment at @media about CSS not being as easy for designers as the programmers who invented it).
For example, rather than writing:
p {<br /> font-family: "Lucida Grande", sans-serif;<br />}
strong, em {<br /> color: green;<br />}What if you could write:
<style><br /><applyto>p</applyto><br /> <font family="'Lucida Grande', sans-serif"><br /></style>
<style><br /> <applyto>strong<applyto><br /> <applyto>em</applyto><br /> <font color="green"><br /></style>
Of course, ‘applyto’ could be named ‘selector’, properties could all be standalone elements rather than the element/attribute I picked vaguely at random above. My question concerns whether you think you’d have found CSS easier to pick up and work with if you had a syntax which was ultimately beared more simility to HTML.
To re-emphasise, I’m not saying that CSS should change, or that the real CSS syntax is in any specific way inferior or anything controvertial like that. But if you could choose, which would you use? This is the kind of question that probably gets a certain type of person very upset, sorry about that.