W3C home > Mailing lists > Public > www-style@w3.org > February 2008

RE: [css3] Suggestion: Selector variables or "synonyms"

From: Mike Wilson <mikewse@hotmail.com>
Date: Sun, 10 Feb 2008 14:13:15 +0100
Message-ID: <BAY116-DAV7CB4DAB6576EF70C0935CA4290@phx.gbl>
To: <www-style@w3.org>
Message-ID: <007501c86be6$b23a6280$0a01a8c0@mikedeskxp>

Brad Kemper wrote:
> That would certainly be useful. I think one of the 
> objections in the past was that this would make the 
> cascade more complicated, 

Well it could, and yes there are already many dimensions
that property values are distributed along (including
inheritance in element space) and this would add one 
more.

> might even lead to 
> circular logic, if say A inherited B, B inherited C, 
> and C inherited A. 

My preference would be to decide on a behaviour to deal 
with these kinds of situations instead of forbidding
inheritance in several levels. This could be an important
feature in some cases or for some designers, IMHO.
[And yes I see you are suggesting a scheme for resolving 
this.]

> So, in this syntax, "@constant' means you are defining 
> the constant.

Personally, I find the word "constant" awkward (How are
these property assignments more constant than others?) 
and would suggest something more along the lines of reuse
or modularity. But again, I am trying not to suggest any 
particular syntax, and personal preferences differ...

The important thing to settle is whether it is interesting 
to add rule composition or inheritance to CSS at all. If
the specification group find it enough interesting then I 
am sure a suitable syntax will emerge with the help of all
bright minds here.

So, to put it as simply as possible; is it interesting to
let rules set up property assigments both from their own
bodies and from other referenced "bodies"?
In ER speak this could be regarded as adding the second 
mapping below:

  rule body <1:N> property assignment
  rule body <1:N> rule body [-> more property assignments]

Just to clarify I don't think this corresponds to Daniel
Glazman's request for macros as these are only about
a single property value and not composition of multiple
assignments. On the other hand Daniel's macros can be used
on different properties, f ex:

  border-color: danielscolor;
  color: danielscolor;

I would say CSS would benefit from both constructions and
it would be nice not having to resort to cpp or similar to 
solve global assignment problems like these.

Best regards
Mike Wilson
Received on Sunday, 10 February 2008 13:14:14 GMT

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