Re: CSS3 sprite suggestion

On Fri, Jul 2, 2010 at 2:12 AM, Kashidom Nenakh <kashidom@gmail.com> wrote:
> Hello,
>
>
> I have been active with web content and programming for the web in the past seven years, mainly focusing on advanced websites and web applications.
>
> There is a feature that I've been looking and dying for, ever since I started in DHTML, a good six+ years ago.
>
> Am I at the right place to submit such a suggestion, or do I need to look elsewhere?
> I've already contacted the WebKit team, as I primarily program for Safari, but they haven't replied to me yet and it's been over a week now.
>
>
> If the feature does exist, are there any manuals to consult that are written in human/programmer's language?
> I'm not very good at reading the standards specifications of CSS3, except for backtracking existing features.
>
>
> Attached is a draft of the feature I wish to request, as I see it optimally implemented on Safari/WebKit.

Agree with Simon that it is somewhat annoying to have to download and
unzip a file for this.  Just sending it as a plain png would have been
fine, or even better as a link to where you're hosting the file
yourself.

As for the feature itself, sprites have been discussed before.  Simon
links to several of these discussions.  Right now the CSSWG's position
is that this is something that doesn't need to be solved at the CSS
level.

The Media Fragments WG is producing a syntax for requesting a fragment
of a full resource, so your spriting example would just be written as:

a:link {
  background-image: url(x.png#xywh=0,0,10,50);
  color: white;
  display: block;
  height: 50px;
  width: 250px;
}

a:hover {
  background-image: url(x.png#xywh=0,50,10,50);
}

In this example, the x.png image would only be downloaded once, and
then the browser would chop bits of it out for use as independent
images.  This is the current recommendation in the draft spec for CSS3
Image Values at http://dev.w3.org/csswg/css3-images/#url.  The syntax
does not currently work, but we expect it to be adopted int he
relatively near future.

As well, there are somewhat longer-term plans to solve this problem
more automatically, such as through resource packages or more
fundamental changes to the underlying network infrastructure like
SPDY.

~TJ

Received on Wednesday, 1 September 2010 16:39:33 UTC