W3C home > Mailing lists > Public > www-style@w3.org > August 2009

Re: Image sprites use cases

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Sun, 30 Aug 2009 20:02:53 -0700
Message-ID: <4A9B3D5D.50503@mit.edu>
To: Brad Kemper <brad.kemper@gmail.com>
CC: "www-style@w3.org" <www-style@w3.org>
Brad Kemper wrote:
> Not so much. If I specify 'url(image.png), there is an 'invisible' value 
> that tells you the path to that file (it resolves to the path to the CSS 
> file being prepended to this file name). What I am suggesting is that 
> when a path and/or filename is provided already, that it be used to 
> resolve any naked hash value, in a similar manner.

I'm not sure what you mean by "already".  In Gecko, for example, 
matching rules are effectively sorted by descending specificity, then 
for any particular property you walk along the list until you come to a 
rule that specifies that property.  Once you find one, you stop.  You 
don't look at the rest of the rules in the list.

Your proposal would require walking more of the list in various 
situations, no?  It's not clear to me how much more given the vagueness 
of the proposal so far...  Worst-case, it would require walking the 
whole list in cases where right now you can stop as soon as you get to 
the first specified value.

In practice, the "stop as soon as you find a value" optimization is 
pretty important, from what I've seen.

-Boris
Received on Monday, 31 August 2009 03:07:03 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:20 GMT