Re: A nit and an addition for the current draft

Bert Bos (bert@let.rug.nl)
Mon, 18 Sep 1995 15:54:54 +0200 (METDST)


Bill Perry writes:
|Bert Bos writes:
|> Steve Grimm writes:
|>
|> |The nit: The text-background attribute has an ambiguous value type.
|> |
|> |<style>
|> | body: text-background="bluegreen"
|> |</style>
|> |
|> |There's no way for a parser to know if "bluegreen" is a relative URL or a
|> |color name. Perhaps there should be two attributes for background, with a
|> |defined order of precedence between them.
|>
|> The intention is that color names are entered as keywords without
|> quotes. The reasoning behind this is, that, presumably, the number of
|> color names is small, so they can be entered in the parser's hash table.
|
| That seems a particularly poor way to differentiate between the two. If
|a user wants 'readability' they might very well choose to write everything
|like:
|
|body: text-background="red" text-foreground="white" font-style="demi-bold"
|
| Ideally, this should `just work right' from the users perspective.

Why would quotes be `just right'?

The first will be a (relative) URL's and so that at least works, but
only if the style designer has provided a definition for "red" on his
server.

The other two won't work, because a string is not a valid data type
for these properties. Are you suggesting that strings should be
acceptable anywhere a keyword is expected? This may cause confusion
for the places where the string is to be interpreted as a URL.

Or do you want separate properties for URL's, such as
`text-background' vs `text-background-url'? The problem is that this
may not be very intuitive either. For example:

LI: text-background-url = "snowflake"
(LI) P: text-background = red

OL: text-background = red
(OL) P: text-background-url = "snowflake"

A P inside an LI inherits a background pattern, but it is overridden
with a background color. A P inside an OL inherits a background color,
but it is overridden with a background pattern.

Question: given the four rules above what happens to a P that is
inside an LI inside an OL?

Bert

-- 
                          Bert Bos                      Alfa-informatica
                 <bert@let.rug.nl>           Rijksuniversiteit Groningen
    <http://www.let.rug.nl/~bert/>     Postbus 716, NL-9700 AS GRONINGEN