Using CSS Sprites for icons and images

  1. #1

    Using CSS Sprites for icons and images

    Its worthy to have the Coolite set of icons and images being retrieved using CSS sprite. This will enhance the overall performance by reducing the number of requests to the webserver. One images contating all icons , anothe one contating the rest of bg images beind requested for one time and the cacnhed to the client broswer thas very efficent.

    Hope to see this feature being added to the next release.
  2. #2

    RE: Using CSS Sprites for icons and images

    https://examples1.ext.net/#/Getting_.../Icon_Summary/

    Image is 900KB+, minus the text I would peg its size at 300KB. I would sooner trade for round trip calls over a 300KB download on each page load.

    Cheers,
    Timothy
  3. #3

    RE: Using CSS Sprites for icons and images

    Hi Istofix,

    The framework makes heavy use of CSS sprites throughout (eg, Button, HtmlEditor). Setting the .Icon property of a control will generate an individual request for that specific icon.

    Currently there are 1700+ individual .png icons embedded within the assembly. As noted by Timothy above, if all the Icons were combined into one super .png, the resulting file would be huge and you would potentially be downloading this file just to use a couple icons.

    This does bring up a good performance optimization tip... if you know exactly what Icons you're using within the app, you could manually combine the Icons into a custom .png, create the appropriate .css class, then set the .IconCls property instead of .Icon.

    An interesting extension that we (or anyone), could add to the <ext:ScriptManager> would be a <Icons> property, which would on-the-fly combine the configured Icons into a sprite and render out the appropriate .css class. That's just a thought, but seems like it would be helpful.

    Example (proposed)

    <ext:ScriptManager runat="">
        <Icons>
            <ext:Icon Icon="Add" />
            <ext:Icon Icon="Wrench" />
            <ext:Icon Icon="Lorry" />
        </Icons>
    </ext:ScriptManager>
    Hope this helps.

    Geoffrey McGill
    Founder

Similar Threads

  1. htmlEditor and Images
    By fabiomarcos in forum 1.x Help
    Replies: 1
    Last Post: Jun 27, 2011, 8:58 AM
  2. [CLOSED] Set css for the images via an ImageButton
    By majunior in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Jun 24, 2011, 1:47 PM
  3. Replies: 1
    Last Post: Apr 08, 2010, 1:37 PM
  4. [CLOSED] Images zoom and pan
    By GmServizi in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Sep 23, 2009, 5:50 AM
  5. Replies: 0
    Last Post: Apr 03, 2009, 5:47 AM

Posting Permissions