W3C home > Mailing lists > Public > www-style@w3.org > November 1995

Re: Comments on Draft 5 (was Re: STYLE attributes)

From: Scott E. Preece <preece@predator.urbana.mcd.mot.com>
Date: Thu, 30 Nov 1995 09:25:28 -0600
Message-Id: <199511301525.JAA29988@predator.urbana.mcd.mot.com>
To: evan@poirot.hpl.hp.com
Cc: Hakon.Lie@sophia.inria.fr, www-style@w3.org
   From: evan@poirot.hpl.hp.com (Evan Kirshenbaum)

|   The main reason (besides personal preference) is to disambiguate the
|   scoping when using commas.  That is, what exactly does
|
|      (A), (B) (C) (D), (E) {...}
|
|   mean?  I think that at the very least, the spec has to be explicit
|   about how these group.  With another notation you could say what you
|   mean:
|
|      A, B::C::D, E {...}
|      (A,B)::C::D, E {...}
|      (A,B)::C::(D,E) {...}
---

I would recommend allowing parentheses, using '+' for the ancestoral
relationships, and using '|' for alternatives.  So,

	L1 | ((L2|L3)+EM) | (EM+B) {font-size: big}

specifies four contexts in which the font-size should be big.

In practice you would want to encourage people to make the
specifications meaningful, rather than just combining all the contexts
that happen to have the same styling, but sometimes it would make sense
to group them so that a future change could be applied to a single
meaningful collection of contexts.

I think '+' would be more intuitive for ancestory than either '::'
or a blank space - it naturally conveys the dea of combining or
layering-on.  The '|' for alternatives may be unfamiliar to
non-technical authors, but I think it's preferable to comma because
comma may be *too* natural and might cause confusion about precedence.

Parentheses are important specifically because they are unambiguous and
avoid the issue of precedence.  If you don't have parentheses, then you
need to define the precedence of the operators.  Unambiguity is the most
important thing.

It might actually be desirable to use two different characters for
"top-level alternatives" and "narrow alternatives", making the
above example something like

	L1, ((L2|L3)+EM), (EM+B) {font-size: big}

with the comma meaning completely independent top-level alternatives
and the '|' meaning alternatives within a context.  I could believe that
this might make things clearer for less technical authors.

scott

--
scott preece
motorola/mcg urbana design center	1101 e. university, urbana, il   61801
phone:	217-384-8589			  fax:	217-384-8550
internet mail:	preece@urbana.mcd.mot.com
Received on Thursday, 30 November 1995 10:24:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:53:43 GMT