W3C home > Mailing lists > Public > www-style@w3.org > October 2003

Re: [css3-cascade] Proposed property: rule( sSelector );

From: L. David Baron <dbaron@dbaron.org>
Date: Wed, 29 Oct 2003 11:19:06 -0800
To: www-style@w3.org
Message-ID: <20031029191906.GA4878@darby.dbaron.org>

On Wednesday 2003-10-29 09:00 -0800, Tantek Çelik wrote:
> On 10/29/03 7:23 AM, "Chris Moschini" <cmoschini@myrealbox.com> wrote:
> > I don't want this to slip through the cracks :o)
> > 
> > Is my most recent proposal workable, where the Specificity Flag is expanded by
> > 1 and @rule() imports only within the same level (author, user, UA)?
> 
> With all due respect, I agree with Daniel Glazman[1] regarding this
> proposal.
> 
> I think it is both needlessly complex to implement, and makes the cascade
> unnecessarily more complicated for users (web designers) to understand.
> 
> As noted in previous threads, the "," operator does a plenty fine job for
> practical examples for grouping style rules with common declarations, is
> much more readable, and is shorter to boot.

I agree with Tantek here.

It's worth noting that adding additional complexity both increases room
for implementation bugs and reduces the ability of implementations to
optimize (and produce implementations of CSS that run reasonably fast
and use reasonably little memory).

Furthermore, I don't understand the claim [2] that this will fix one of
the main reasons for bloat in existing CSS usage.  The bloated
stylesheets that I see usually could be simplified by using "," in
selectors.  If authors attempt to write in any language where edge cases
can be handled by additional code by attempting to make things work
without any design in mind, they're likely to end up with bloated code.

Finally, I think a syntax like this would significantly confuse authors
as to how CSS works.  Some beginning authors look at CSS and think that
a selector like "p.rule" is "defining a class" and "class='rule'" in the
markup is "using the class".  This is backwards -- selectors *select*
elements based on the document structure, and thinking about CSS this
way makes CSS selectors seem much less powerful and useful than they
really are.

-David

[2] http://lists.w3.org/Archives/Public/www-style/2003Oct/0199.html

-- 
L. David Baron                                <URL: http://dbaron.org/ >
Received on Wednesday, 29 October 2003 14:19:09 GMT

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