Kupu now uses CSS sprites

14 messages Options
Embed this post
Permalink
Alexander Limi

Kupu now uses CSS sprites

Reply Threaded More More options
Print post
Permalink
Just a heads-up in case you see any issues with Kupu:

I moved the Kupu icon loading to use CSS sprites (similar to the plone.org  
front page).

Before: 17 HTTP requests
Now: 1 HTTP request

This has a major impact on how quickly Kupu performs its initial load — as  
HTTP roundtripping is very time-consuming.

Let me know if you encounter any bugs with the new approach — it's  
unlikely, since Kupu was already using CSS to render its icons — but tell  
me if you do. :)

--
Alexander Limi · http://limi.net


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Alexander Limi · http://limi.net

Martin Aspeli-2

Re: Kupu now uses CSS sprites

Reply Threaded More More options
Print post
Permalink
Alexander Limi wrote:
> Just a heads-up in case you see any issues with Kupu:
>
> I moved the Kupu icon loading to use CSS sprites (similar to the plone.org  
> front page).

For the ignorant (like me) - what are CSS sprites? How are they
different to what was done before? Can I have a Fanta?

Martin

--
Acquisition is a jealous mistress


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Alexander Limi

Re: Kupu now uses CSS sprites

Reply Threaded More More options
Print post
Permalink
On Sun, 05 Aug 2007 04:41:08 -0700, Martin Aspeli  
<[hidden email]> wrote:

> For the ignorant (like me) - what are CSS sprites? How are they
> different to what was done before? Can I have a Fanta?

Instead of having 30 files each being 16x16, you put (let's say) 20 icons  
in one file, and reference the file once. Then you use CSS positioning to  
pull out the right icon.

This means you load one image that is 600x16, and then use CSS offsets to  
render the individual icons. It makes it slightly more cumbersome to  
customize, but for something like Kupu, it's perfect. Doing it for Plone  
generally would save some HTTP requests, but probably isn't worth it from  
a customization perspective. How often do you replace the icon for bold  
and right justify, though? If you're brave enough to enter the world of  
customizing Kupu, this is a walk in the park. ;)

For more info:
http://www.alistapart.com/articles/sprites

--
Alexander Limi · http://limi.net


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Alexander Limi · http://limi.net

Martin Aspeli-2

Re: Kupu now uses CSS sprites

Reply Threaded More More options
Print post
Permalink
Alexander Limi wrote:

> On Sun, 05 Aug 2007 04:41:08 -0700, Martin Aspeli  
> <[hidden email]> wrote:
>
>> For the ignorant (like me) - what are CSS sprites? How are they
>> different to what was done before? Can I have a Fanta?
>
> Instead of having 30 files each being 16x16, you put (let's say) 20 icons  
> in one file, and reference the file once. Then you use CSS positioning to  
> pull out the right icon.
>
> This means you load one image that is 600x16, and then use CSS offsets to  
> render the individual icons. It makes it slightly more cumbersome to  
> customize, but for something like Kupu, it's perfect. Doing it for Plone  
> generally would save some HTTP requests, but probably isn't worth it from  
> a customization perspective. How often do you replace the icon for bold  
> and right justify, though? If you're brave enough to enter the world of  
> customizing Kupu, this is a walk in the park. ;)

Cool - thanks for the explanation.

Martin

--
Acquisition is a jealous mistress


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Duncan Booth

Re: Kupu now uses CSS sprites

Reply Threaded More More options
Print post
Permalink
In reply to this post by Alexander Limi
"Alexander Limi" <[hidden email]> wrote:

> Just a heads-up in case you see any issues with Kupu:
> I moved the Kupu icon loading to use CSS sprites (similar to the
> plone.org  front page).
> Before: 17 HTTP requests
> Now: 1 HTTP request
> This has a major impact on how quickly Kupu performs its initial load
> — as  HTTP roundtripping is very time-consuming.
> Let me know if you encounter any bugs with the new approach — it's  
> unlikely, since Kupu was already using CSS to render its icons — but
> tell  me if you do. :)

Excellent. Could you put a note about this in kupu's CHANGES.txt?


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
ajung

Re: Kupu now uses CSS sprites

Reply Threaded More More options
Print post
Permalink
In reply to this post by Alexander Limi


--On 4. August 2007 23:43:02 -0700 Alexander Limi <[hidden email]> wrote:

> Just a heads-up in case you see any issues with Kupu:
>
> I moved the Kupu icon loading to use CSS sprites (similar to the
> plone.org   front page).
>
> Before: 17 HTTP requests
> Now: 1 HTTP request
>

Impressing. However does it make a difference for subsequent requests after
the icons were loaded and taken directly out of the browser cache?

-aj

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers

attachment0 (193 bytes) Download Attachment
Danny Bloemendaal-2

Re: Kupu now uses CSS sprites

Reply Threaded More More options
Print post
Permalink

On 5-aug-2007, at 18:32, Andreas Jung wrote:

>
>
> --On 4. August 2007 23:43:02 -0700 Alexander Limi <[hidden email]>  
> wrote:
>
>> Just a heads-up in case you see any issues with Kupu:
>>
>> I moved the Kupu icon loading to use CSS sprites (similar to the
>> plone.org   front page).
>>
>> Before: 17 HTTP requests
>> Now: 1 HTTP request
>>
>
> Impressing. However does it make a difference for subsequent  
> requests after the icons were loaded and taken directly out of the  
> browser cache?

My thoughts exactly. I don't really see the point to this. It adds  
complexity and to what gain? I thought we just wanted to make kupu  
simpler to customize, not harder.

(and besides... why do this in trunk and not in a separate branche?  
doing changes like this and then ask here for opinions.. that's not  
something for trunk in my opinion.)

Danny

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Wichert Akkerman

Re: Kupu now uses CSS sprites

Reply Threaded More More options
Print post
Permalink
Previously Danny Bloemendaal wrote:

>
> On 5-aug-2007, at 18:32, Andreas Jung wrote:
>
> >
> >
> > --On 4. August 2007 23:43:02 -0700 Alexander Limi <[hidden email]>  
> > wrote:
> >
> >> Just a heads-up in case you see any issues with Kupu:
> >>
> >> I moved the Kupu icon loading to use CSS sprites (similar to the
> >> plone.org   front page).
> >>
> >> Before: 17 HTTP requests
> >> Now: 1 HTTP request
> >>
> >
> > Impressing. However does it make a difference for subsequent  
> > requests after the icons were loaded and taken directly out of the  
> > browser cache?
>
> My thoughts exactly. I don't really see the point to this. It adds  
> complexity and to what gain? I thought we just wanted to make kupu  
> simpler to customize, not harder.
>
> (and besides... why do this in trunk and not in a separate branche?  
> doing changes like this and then ask here for opinions.. that's not  
> something for trunk in my opinion.)

And while kupu is in release candidate status.

Wichert.

--
Wichert Akkerman <[hidden email]>    It is simple to make things.
http://www.wiggy.net/                   It is hard to make things simple.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Alexander Limi

Re: Kupu now uses CSS sprites

Reply Threaded More More options
Print post
Permalink
In reply to this post by Duncan Booth
On Sun, 05 Aug 2007 09:12:51 -0700, Duncan Booth  
<[hidden email]> wrote:

> Excellent. Could you put a note about this in kupu's CHANGES.txt?

Done. I was looking for a HISTORY.txt, but couldn't find it earlier. :)

--
Alexander Limi · http://limi.net


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Alexander Limi · http://limi.net

Duncan Booth

Re: Kupu now uses CSS sprites

Reply Threaded More More options
Print post
Permalink
In reply to this post by Wichert Akkerman
Wichert Akkerman <[hidden email]> wrote:

>> (and besides... why do this in trunk and not in a separate branche?  
>> doing changes like this and then ask here for opinions.. that's not  
>> something for trunk in my opinion.)
>
> And while kupu is in release candidate status.

My concern is that this change breaks the png transparency for IE6 users. I
like the concept, but if Limi can't fix the IE6 rendering I think we'll
have to revert the change.



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Alexander Limi

Re: Kupu now uses CSS sprites

Reply Threaded More More options
Print post
Permalink
On Mon, 06 Aug 2007 07:06:41 -0700, Duncan Booth  
<[hidden email]> wrote:

> My concern is that this change breaks the png transparency for IE6  
> users. I
> like the concept, but if Limi can't fix the IE6 rendering I think we'll
> have to revert the change.

It's just me being careless about how I saved the image. :)

Give me until tomorrow, and I'll look into fixing it.

--
Alexander Limi · http://limi.net


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Alexander Limi · http://limi.net

Laurence Rowe

Re: Kupu now uses CSS sprites

Reply Threaded More More options
Print post
Permalink
In reply to this post by Danny Bloemendaal-2
I'm currently onsite somewhere where I'm not allowed to plug into the
network. Accessing the net over a 3G phone is fairly fast to download
(1mb/minute) but I have a 2 second ping time. It's as bad as a satellite
connection. Changes like this make a huge difference.

Laurence

(cheers wildly)

Danny Bloemendaal wrote:

> On 5-aug-2007, at 18:32, Andreas Jung wrote:
>
>>
>> --On 4. August 2007 23:43:02 -0700 Alexander Limi <[hidden email]>  
>> wrote:
>>
>>> Just a heads-up in case you see any issues with Kupu:
>>>
>>> I moved the Kupu icon loading to use CSS sprites (similar to the
>>> plone.org   front page).
>>>
>>> Before: 17 HTTP requests
>>> Now: 1 HTTP request
>>>
>> Impressing. However does it make a difference for subsequent  
>> requests after the icons were loaded and taken directly out of the  
>> browser cache?
>
> My thoughts exactly. I don't really see the point to this. It adds  
> complexity and to what gain? I thought we just wanted to make kupu  
> simpler to customize, not harder.
>
> (and besides... why do this in trunk and not in a separate branche?  
> doing changes like this and then ask here for opinions.. that's not  
> something for trunk in my opinion.)
>
> Danny
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Alexander Limi

Re: Kupu now uses CSS sprites

Reply Threaded More More options
Print post
Permalink
In reply to this post by Alexander Limi
On Mon, 06 Aug 2007 23:55:47 -0700, Alexander Limi  
<[hidden email]> wrote:

> On Mon, 06 Aug 2007 07:06:41 -0700, Duncan Booth
> <[hidden email]> wrote:
>
>> My concern is that this change breaks the png transparency for IE6
>> users. I
>> like the concept, but if Limi can't fix the IE6 rendering I think we'll
>> have to revert the change.
>
> It's just me being careless about how I saved the image. :)
>
> Give me until tomorrow, and I'll look into fixing it.

Checked in a IE6-compatible PNG, it works fine now.

--
Alexander Limi · http://limi.net


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Alexander Limi · http://limi.net

Duncan Booth

Re: Kupu now uses CSS sprites

Reply Threaded More More options
Print post
Permalink
"Alexander Limi" <[hidden email]> wrote:
>> Give me until tomorrow, and I'll look into fixing it.
> Checked in a IE6-compatible PNG, it works fine now.

Yes, it does seem to work now. Thanks.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers