<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: SpriteMe (part 2)</title>
	<atom:link href="http://www.stevesouders.com/blog/2009/09/18/spriteme-part-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stevesouders.com/blog/2009/09/18/spriteme-part-2/</link>
	<description>Essential knowledge for making your web pages faster.</description>
	<lastBuildDate>Fri, 30 Jul 2010 02:13:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jeff</title>
		<link>http://www.stevesouders.com/blog/2009/09/18/spriteme-part-2/comment-page-1/#comment-833</link>
		<dc:creator>Jeff</dc:creator>
		<pubDate>Tue, 22 Sep 2009 16:36:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=520#comment-833</guid>
		<description>@SteveSouders, an example of a pseudo element is div::after { content:&#039;meep&#039;; background:blah; height:20px; width:20px;  }

They are used all over the place in WebKit to style scrollbars, ranges, etc.</description>
		<content:encoded><![CDATA[<p>@SteveSouders, an example of a pseudo element is div::after { content:&#8217;meep&#8217;; background:blah; height:20px; width:20px;  }</p>
<p>They are used all over the place in WebKit to style scrollbars, ranges, etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Premasagar Rose</title>
		<link>http://www.stevesouders.com/blog/2009/09/18/spriteme-part-2/comment-page-1/#comment-829</link>
		<dc:creator>Premasagar Rose</dc:creator>
		<pubDate>Mon, 21 Sep 2009 15:23:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=520#comment-829</guid>
		<description>Hi Steve,
Thanks for producing this. It should save quite a bit of time in converting a design to one that uses sprites.

I recently went deep into the rules for sprite creation, on Dharmafly&#039;s &lt;a href=&quot;http://dharmafly.com/bbc-world-service-widget&quot; rel=&quot;nofollow&quot;&gt;widget for BBC World Service&lt;/a&gt;. For that, we created 3 sprites:

&lt;a href=&quot;http://www.bbc.co.uk/worldservice/widget/images/sprite_grey.png&quot; rel=&quot;nofollow&quot;&gt;PNG-8 for greyscale and transparent assets&lt;/a&gt;
&lt;a href=&quot;http://www.bbc.co.uk/worldservice/widget/images/sprite_colour.png&quot; rel=&quot;nofollow&quot;&gt;PNG-24 for full colour&lt;/a&gt;
&lt;a href=&quot;http://www.bbc.co.uk/worldservice/widget/images/sprite_repeat-x.png&quot; rel=&quot;nofollow&quot;&gt;PNG-24 for full colour horizontal repeats&lt;/a&gt; (1px wide)

(and &lt;a href=&quot;http://www.bbc.co.uk/worldservice/widget/images/platform_favicons.png&quot; rel=&quot;nofollow&quot;&gt;an extra one&lt;/a&gt; for the different widget platform icons).

It sounds like you&#039;ve got most of it covered, although perhaps some other things to consider:

The &quot;best case&quot; is actually more than four narrow/short images. If the sprite is more of a square-like grid, which would allow you to fit several images along the sides.
If IE6 is to be supported, then PNG-8&#039;s must be used for any transparent assets (IE6, bless it, will still only support &lt;em&gt;index&lt;/em&gt;-transparency, not alpha-transparency). So when you add the logic for favouring PNG-8&#039;s, you could start with those palettes that are used in images with transparency.
In most cases, it&#039;s probably best to go for several PNG-8&#039;s. But, when there&#039;s a very wide colour palette, it may be better to go for a single PNG-24 instead.
It would be difficult to automate, but when the edge of one asset is the same as the edge for another, it&#039;s actually possible to overlap them in the sprite. The BBC widget sprite uses that in a couple of places, where the bottom few pixels of one asset is identical the top few pixels of another, or where the left edge of one is the same as the right edge of another.
Strip out absolutely all meta data from the resultant PNG&#039;s, as per smush.it and other optimisers.


- Prem</description>
		<content:encoded><![CDATA[<p>Hi Steve,<br />
Thanks for producing this. It should save quite a bit of time in converting a design to one that uses sprites.</p>
<p>I recently went deep into the rules for sprite creation, on Dharmafly&#8217;s <a href="http://dharmafly.com/bbc-world-service-widget" rel="nofollow">widget for BBC World Service</a>. For that, we created 3 sprites:</p>
<p><a href="http://www.bbc.co.uk/worldservice/widget/images/sprite_grey.png" rel="nofollow">PNG-8 for greyscale and transparent assets</a><br />
<a href="http://www.bbc.co.uk/worldservice/widget/images/sprite_colour.png" rel="nofollow">PNG-24 for full colour</a><br />
<a href="http://www.bbc.co.uk/worldservice/widget/images/sprite_repeat-x.png" rel="nofollow">PNG-24 for full colour horizontal repeats</a> (1px wide)</p>
<p>(and <a href="http://www.bbc.co.uk/worldservice/widget/images/platform_favicons.png" rel="nofollow">an extra one</a> for the different widget platform icons).</p>
<p>It sounds like you&#8217;ve got most of it covered, although perhaps some other things to consider:</p>
<p>The &#8220;best case&#8221; is actually more than four narrow/short images. If the sprite is more of a square-like grid, which would allow you to fit several images along the sides.<br />
If IE6 is to be supported, then PNG-8&#8217;s must be used for any transparent assets (IE6, bless it, will still only support <em>index</em>-transparency, not alpha-transparency). So when you add the logic for favouring PNG-8&#8217;s, you could start with those palettes that are used in images with transparency.<br />
In most cases, it&#8217;s probably best to go for several PNG-8&#8217;s. But, when there&#8217;s a very wide colour palette, it may be better to go for a single PNG-24 instead.<br />
It would be difficult to automate, but when the edge of one asset is the same as the edge for another, it&#8217;s actually possible to overlap them in the sprite. The BBC widget sprite uses that in a couple of places, where the bottom few pixels of one asset is identical the top few pixels of another, or where the left edge of one is the same as the right edge of another.<br />
Strip out absolutely all meta data from the resultant PNG&#8217;s, as per smush.it and other optimisers.</p>
<p>- Prem</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Souders</title>
		<link>http://www.stevesouders.com/blog/2009/09/18/spriteme-part-2/comment-page-1/#comment-825</link>
		<dc:creator>Steve Souders</dc:creator>
		<pubDate>Sat, 19 Sep 2009 23:19:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=520#comment-825</guid>
		<description>@sunnybear: Cool to hear SpriteMe is already helping!

@Jeff: Can you give an example?

@s.Daniel: Staying within 255 colors is key. That&#039;s on the todo list as &lt;a href=&quot;http://code.google.com/p/spriteme/issues/detail?id=17&quot; rel=&quot;nofollow&quot;&gt;issue #17&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>@sunnybear: Cool to hear SpriteMe is already helping!</p>
<p>@Jeff: Can you give an example?</p>
<p>@s.Daniel: Staying within 255 colors is key. That&#8217;s on the todo list as <a href="http://code.google.com/p/spriteme/issues/detail?id=17" rel="nofollow">issue #17</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: s.Daniel</title>
		<link>http://www.stevesouders.com/blog/2009/09/18/spriteme-part-2/comment-page-1/#comment-823</link>
		<dc:creator>s.Daniel</dc:creator>
		<pubDate>Sat, 19 Sep 2009 15:18:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=520#comment-823</guid>
		<description>My previous experiance with sprites show that grouping gif/png images with a similar color palette to one sprite and leaving the rest of the images in another sprite can reduce file size even further. Have you made tests in this direction?</description>
		<content:encoded><![CDATA[<p>My previous experiance with sprites show that grouping gif/png images with a similar color palette to one sprite and leaving the rest of the images in another sprite can reduce file size even further. Have you made tests in this direction?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff</title>
		<link>http://www.stevesouders.com/blog/2009/09/18/spriteme-part-2/comment-page-1/#comment-822</link>
		<dc:creator>Jeff</dc:creator>
		<pubDate>Sat, 19 Sep 2009 09:14:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=520#comment-822</guid>
		<description>Would be cool to support pseudo elements</description>
		<content:encoded><![CDATA[<p>Would be cool to support pseudo elements</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sunnybear</title>
		<link>http://www.stevesouders.com/blog/2009/09/18/spriteme-part-2/comment-page-1/#comment-821</link>
		<dc:creator>sunnybear</dc:creator>
		<pubDate>Sat, 19 Sep 2009 07:29:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=520#comment-821</guid>
		<description>Steve, logic behind SpriteMe is already used (as a part of) in CSS Sprites module of Web Optimizer, which makes hundreds of websites &#039;fast by default&#039; (good slogan, I will remember :)

Thank you for great ideas.</description>
		<content:encoded><![CDATA[<p>Steve, logic behind SpriteMe is already used (as a part of) in CSS Sprites module of Web Optimizer, which makes hundreds of websites &#8216;fast by default&#8217; (good slogan, I will remember :)</p>
<p>Thank you for great ideas.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
