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

Re: Image sprites use cases

From: Alex Kaminski <activewidgets@gmail.com>
Date: Thu, 3 Sep 2009 16:12:29 +0200
Message-ID: <6328fb9a0909030712g189e76ebxde4a0618bebd71ed@mail.gmail.com>
To: Aryeh Gregor <Simetrical+w3c@gmail.com>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, www-style@w3.org
On Thu, Sep 3, 2009 at 3:50 PM, Aryeh Gregor<Simetrical+w3c@gmail.com> wrote:
> On Thu, Sep 3, 2009 at 7:10 AM, Alex Kaminski<activewidgets@gmail.com> wrote:
>> The package proposal is excellent and it covers very well the basic
>> usage of image sprites (to reduce the number of http requests).
>> However it still does not provide much help to the developers of web
>> applications and component libraries who also need an efficient method
>> to address many (possibly hundreds) of image fragments. Would it be
>> right thing then to target the new CSS sprites technique to this
>> advanced use case (UI components), possibly using something like
>> image-region property, assuming that the basic sprites case is covered
>> by the new packaging proposal?
> The problems with image sprites (high memory footprint, hard to author
> and maintain) would remain significant here.

Is it really so? I can imagine that using background-position for sprites
does indeed have memory impact, but if the spite is specified with
image-region then I guess the browser can easily optimize memory usage.

As for 'hard to author and maintain' - this is exactly what we are looking for,
the solution that would be easier to author and maintain, from the library
user point of view, who is trying to customize our components.

> It seems like your use
> case could be solved if CSS provided a way to algorithmically
> construct URLs for background images, or something of that sort.  I
> don't know what a good proposal of that kind would look like, though.

Yes, the alternative solution could be some kind of parameterized URLs.

> Superficially, it seems kind of scary.  Why can't you just use a few
> hundred CSS rules?

Yes, we can. But for the person who is trying to customize/modify the
components it is not very convenient and much harder to explain.

Alex Kaminski
Received on Thursday, 3 September 2009 14:13:10 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:39 UTC