Re: css draft specification
Mike Batchelor writes:
|Bert Bos once wrote...
|> |Comments welcome.
|> | http://www.w3.org/hypertext/WWW/Style/css/draft.html
|> | http://www.w3.org/hypertext/WWW/Arena/0.97.html
|I think the KISS rule should apply to the first style sheet specification.
|Keep it very basic, very simple, and it is more likely to be implemented.
|A lot of this seems too complex *for now*. An example of what I
|> ** Links
|> Setting per-element link properties can also be done with
|> context-dependent addressing. If a link in a P should look differently
|> from a link in an H1, one can use a syntax like:
|> *P*A: text.color = #00F # A inside P
|> *H1*A: text.color = (1.0, 0.0, 0.0) # A inside H1
|This can be done more simply with classes:
|a.paragraph: font.color = #00F
|a.level1: font.color = #F00
|<h1>This is a <a href="next.html" class=level1>link</a> inside a level
|This is a <a href="next.html" class=paragraph>link</a> inside a
I don't mind if the first version of the style sheet language doesn't
allow context dependent addressing, but eventually it will have to be
CLASS can't really be a substitute for this, for we want stylesheets
to apply to read-only documents as well.
And we've been careful not to make it too complex. For example, it
won't be possible to select an element based on whether it is the last
one or not, on what follows it, or on siblings other than its
immediate predecessor. What's left is the immediate predecessor and
the stack of parent elements. It can't be too difficult to keep a
stack of open elements. In fact, I don't see how you can do without.
Bert Bos Alfa-informatica
<email@example.com> Rijksuniversiteit Groningen
<http://www.let.rug.nl/~bert/> Postbus 716, NL-9700 AS GRONINGEN