- From: David Hyatt <hyatt@apple.com>
- Date: Sun, 24 Sep 2006 18:45:15 -0700
- To: fantasai <fantasai.lists@inkedblade.net>
- Cc: www-style@w3.org
I'd say use a class attribute on your image links and spare yourself the lousy page performance of a parent selector. :) The class attribute is so useful at obviating the need for all these fancy selectors and will perform better in any modern browser than all these more advanced selector alternatives. Maybe some people view this kind of class attribute document pollution as a bad thing, but it allows for simpler rule construction and much better performance. 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. :) dave On Sep 24, 2006, at 5:41 PM, fantasai wrote: > > David Hyatt wrote: >> I have yet to see any compelling use case for a :parent selector >> (or for many of the other CSS3 selectors for that matter). > > My favorite: > > :link { > background: navy; > color: white > border: outset thin white; > } > > /* select links with img child, i.e. all image links */ { > background: transparent; > border: none; > } > > ~fantasai > > >
Received on Monday, 25 September 2006 01:45:22 UTC