CSS shorthands (was something else)
> H=E5kon Wium Lie writes > border: thick solid red; > is expanded into: > [12 lines of stuff] true, but in degrees of inconvenience (for an XML parser based system) the composite value `thick solid red' is much harder to deal with (and has rippling side effects like presumably not being able to have a colour called thick, or a font called `10pt helevetica' etc). The fact that the `border' property is short hand for setting all four borders is far less of a problem. So you could look at a syntax where the above just expanded to three settings, border-color: red etc. However given the choice between having both forms of minimisation, and having neither, I'd have neither and take the fully expanded version that you quote. > Note, however, that your style sheets will become significantly longer > if you abolish shorthand properties If you use XML you have to give up caring about that. After all just about the main difference between xml and sgml was the abandoning of almost all minimisation and shortref features, that makes the system so much simpler, at the price of making document instances considerably more verbose. Note I'm not arguing for a change in CSS, that is already out in the field and changing the syntax now probably is not worth it, but I do not really see that for an XMl based system `compatibility with CSS' has to mean reproduction of the exact syntax of these composite values. If the XML syntax maps to the expanded form and there is a clearly defined mapping between the two, this would seem to be sufficient. David XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format