W3C home > Mailing lists > Public > www-style@w3.org > September 2006

Re: [css3-selectors] :parent selector

From: David Hyatt <hyatt@apple.com>
Date: Mon, 25 Sep 2006 01:54:56 -0700
Message-Id: <2998FDF6-9C52-4DFF-9F7B-FC2277D52A06@apple.com>
Cc: www-style@w3.org
To: Patrick Lauke <P.H.Lauke@salford.ac.uk>

On Sep 25, 2006, at 1:32 AM, Patrick Lauke wrote:

>> David Hyatt
>> I'd say use a class attribute on your image links and spare yourself
>> the lousy page performance of a parent selector. :)
> ...
>> it allows for simpler rule construction and much better performance.
> This argument can pretty much be made for *all* complex selectors.  
> nth child, only-of-type, etc.
> Does that mean they should all be abandoned in favour of simply  
> putting the burden on document authors to properly class the stuff  
> they want styled a particular way?

I think many of these selectors are unnecessary, but I also have no  
real objection to implementing most of them (since for the most part  
they require very little code).

>> I suppose you might counter that this kind of rule would be
>> useful in
>> a user stylesheet, but user stylesheets are only interesting to the
>> 0.000001% of the browser user population that understand CSS well
>> enough to construct and apply them. :)
> Don't confuse the usefulness of user stylesheets with the lousy,  
> propeller-head implementation of them. If browsers would offer a  
> system whereby user styles could be downloaded (from a repository  
> site, similar to what happens with Firefox themes/extensions),  
> added, activated, switched to, etc without requiring user to  
> actually know CSS itself, I'd posit that uptake would be a lot  
> higher. Don't provide inadequate solutions and then moan that users  
> aren't taking advantage of them...

Yes, point taken, but even if you (hypothetically) had a user- 
friendly mechanism for supplying user styles, the set of useful  
global rules in a user stylesheet would be extremely limited.  The  
reason being that any global rules that do anything more than very  
minor tweaks to styles will cause dramatic site misrenderings when  
applied to the Web at large.  I maintain that the cited use case is  
not really interesting in a user stylesheet context because it  
doesn't really have global application.

As I've said a couple of times before, my real objections to a parent  
selector are

(a) I don't like selectors that are incompatible with incremental  
rendering (since you risk displaying incorrectly styled content when  
doing incremental rendering while a page loads).  (This problem would  
be especially bad for parent selectors... moreso than say, :last-child).


(b) The performance of this selector would be terrible.

Received on Monday, 25 September 2006 08:55:13 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:26 UTC