CSS shorthands (was something else)

Subject: CSS shorthands (was something else)
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 18 Oct 1999 11:35:49 +0100 (BST)
> 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


Current Thread