Re: [css3] Suggestion: Selector variables or “synonyms”

On Wednesday 2008-02-06 17:55 +0100, Jens Meiert wrote:
> > > I am sorry but I don't understand at all your
> > > 
> > >   .old = .new
> > 
> > Isn't ".old = .new" just a convenient alternative
> > to ".old, .new {}" ?
> 
> Exactly. The more occurrences and the longer the selectors, the more “convenient” though:
> 
>   .old = .new;
>   .new {}
>   .new, .somethingelse {}
>   .new, .different {}
>   .new, .whatever {}

Saying that it behaves a certain way in a certain case isn't enough
to define how it behaves in all cases.  You need to do that in order
to make it clear what it is that you're proposing, since in this
case there are a *lot* of possibilities.  For example, given ".old =
.new", does a selector "p.new" match an p element with class="old"?
Does it matter if the selector is in the same style sheet as the
assignment expression?  Does it matter what order they're in?  What
happens when more complex things are on one or both sides of the
assigment?  Are multiple assignments transitive?

Note that you don't need to answer all these questions; it would be
better to have a simple statement of what you propose from which all
these answers (and others) could be derived.  If you're not sure
what the answers to some of the questions should be, you're probably
better off proposing a list of requirements for the feature rather
than the actual details / syntax of the feature.

(And I'd also remind you that whatever it is has to fit with the
model of selectors, where the question selectors are used to answer
is "does selector S match element E?".)

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/

Received on Wednesday, 6 February 2008 17:54:20 UTC