<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.yuiblog.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" 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/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0">

<channel>
	<title>Yahoo! User Interface Blog (YUIBlog) » Design</title>
	
	<link>http://www.yuiblog.com/blog</link>
	<description>The official blog of the YUI Project.</description>
	<lastBuildDate>Thu, 29 Jul 2010 16:03:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.yuiblog.com/yuiblog/design" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="yuiblog/design" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Alternative Skins for YUI 3.1.0 Slider</title>
		<link>http://www.yuiblog.com/blog/2010/04/06/alternative-slider-skins/</link>
		<comments>http://www.yuiblog.com/blog/2010/04/06/alternative-slider-skins/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 14:03:26 +0000</pubDate>
		<dc:creator>Jeff Conniff</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[skins]]></category>
		<category><![CDATA[slider]]></category>
		<category><![CDATA[YUI 3]]></category>

		<guid isPermaLink="false">http://www.yuiblog.com/blog/?p=1564</guid>
		<description><![CDATA[

	About the Author:  Jeff Conniff is an interaction designer, prototyper, and visual designer working at Yahoo since 2005 in the HotJobs and Small Business groups. Jeff has a degree in Graphic Design from San Jose State University, and has worked at many companies designing software user experience since 1983. Jeff uses the YUI platform [...]]]></description>
			<content:encoded><![CDATA[<div class="interview">
<div class="intro">
<p><img align="right" hspace=10 vspace=10 src="http://yuiblog.com/assets/jconniff.jpg" width="118" height="146"/>	<em><strong>About the Author:</strong>  Jeff Conniff is an interaction designer, prototyper, and visual designer working at Yahoo since 2005 in the HotJobs and Small Business groups. Jeff has a degree in Graphic Design from San Jose State University, and has worked at many companies designing software user experience since 1983. Jeff uses the YUI platform daily in his prototyping work and loves its clean syntax and great capabilities.</em></p>
</div>
</div>
<p>
We decided to take the <a href="http://developer.yahoo.com/yui/3/slider/">YUI 3 Slider</a> widget skins up a visual notch for YUI 3.1.0. These were our goals:
</p>
<ol>
<li>
		Improve the overall visual tastiness and 3-D appearance
	</li>
<li>
		Offer a wider range of thumb and rail skins
	</li>
<li>
		Provide two sets skins to serve dark as well as light page backgrounds
	</li>
<li>
		Provide a complete set of thumbs and rails for vertical as well as horizontal use
	</li>
<li>
		Make it easier to mix and match thumbs with different rail styles
	</li>
<li>
		Provide Photoshop assets to aid developers in modifying slider images to match any background color
	</li>
</ol>
<p>Compare the YUI 2 slider skins with the YUI 3 ones below. The new set has more variety and should serve a broad spectrum of pages and styles. </p>
<p>YUI 2 Slider Skins:</p>
<p><img src="http://yuiblog.com/assets/yui2_slider_skins.gif" alt="YUI 2 Slider Skins"/></p>
<p>YUI 3 Slider Skins:</p>
<p><img src="http://yuiblog.com/assets/yui3_slider_skins.jpg" alt="YUI 3 Slider Skins"/></p>
<p>We didn&#8217;t restrict the thumbs to rectangles and 45 degree angles. This posed some challenges with anti-aliasing. The YUI 2 thumbs have shadows incorporated into the thumb image, so they are a solid color gray. We&#8217;ve improved this by making a shadow object that&#8217;s separate from the thumb image. The shadow has <code>opacity: 0.15</code>. This means it looks natural as the shadow falls on the rail and the tick marks.</p>
<p><img src="http://yuiblog.com/assets/shadow_compare2.jpg"/></p>
<p>We will be providing original photoshop files containing each of the rail and thumb images. This will provide developers the source from which to easily customize the images so that they look their best when placed on whatever color background your site has.</p>
<p><img src="http://yuiblog.com/assets/slider_blue_3.jpg"/></p>
<p>YUI 3&#8217;s widget foundation reached GA status last week <a href="http://www.yuiblog.com/blog/2010/03/31/announcing-yui-3-1-0/">with the release of YUI 3.1.0</a>.  We don&#8217;t yet have a full slate of native YUI 3 widgets, and we haven&#8217;t yet defined a set of global skins.  However, the work we did on visual assets for the beta Slider Component should make it more useful in the short term, and we&#8217;ll carry all of these visual options on as alternative themes or examples once YUI 3&#8217;s baseline themes are in place.</p>
<p>Have a look at these <a href="http://developer.yahoo.com/yui/3/examples/slider/slider_skin.html">working code examples</a> of the new sliders. Checkout the behind the scenes <a href="http://developer.yahoo.com/yui/3/slider/#skinning">detailed workings</a> of the skin images and CSS.</p>
<p>We hope these new sliders will be a nice visual addition to your bag of tricks.</p>
<div class="feedflare">
<a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=SFW_M3aEshI:qFFAYbcgzFo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=SFW_M3aEshI:qFFAYbcgzFo:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=SFW_M3aEshI:qFFAYbcgzFo:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=SFW_M3aEshI:qFFAYbcgzFo:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?i=SFW_M3aEshI:qFFAYbcgzFo:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.yuiblog.com/blog/2010/04/06/alternative-slider-skins/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Three new navigation design patterns</title>
		<link>http://www.yuiblog.com/blog/2010/02/22/three-new-navigation-design-patterns/</link>
		<comments>http://www.yuiblog.com/blog/2010/02/22/three-new-navigation-design-patterns/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 00:56:21 +0000</pubDate>
		<dc:creator>Christian Crumlish</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[leftnav]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[progress]]></category>
		<category><![CDATA[topnav]]></category>

		<guid isPermaLink="false">http://www.yuiblog.com/blog/?p=1243</guid>
		<description><![CDATA[Over the past few months I conducted an audit of the patterns in Yahoo!&#8217;s internal design pattern library, with an eye toward publishing as many of them as possible in the open library at YDN. Why? Well, for one thing, to get more eyeballs on them, to gather more feedback and keep improving the patterns. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.yuiblog.com/blog/wp-content/uploads/2010/02/topnav.png"><img src="http://www.yuiblog.com/blog/wp-content/uploads/2010/02/topnav-300x75.png" alt="topnav bar" title="topnav" width="300" height="75" class="alignright size-medium wp-image-1244" /></a>Over the past few months I conducted an audit of the patterns in Yahoo!&#8217;s <em>internal</em> design pattern library, with an eye toward publishing as many of them as possible in <a href="http://design.yahoo.com/">the open library at YDN</a>. Why? Well, for one thing, to get more eyeballs on them, to gather more feedback and keep improving the patterns. Also, since very few patterns in the library contain Yahoo!-specific information, and an alternative process is now in place for vetting requirements specific to the Yahoo! network and brand <em>components</em>, the design pattern collection can now more easily focus on (relatively) universal design principles for web implementations.</p>
<p>I completed the audit before the end of last year and expect to release new patterns in batches over the next few months. Some patterns will be mature and provide a solid foundation for site design. A few will be published as beta patterns which may undergo significant changes in subsequent updates based on feedback received. Regardless of their status, we hope you’ll get involved and review and provide feedback on the patterns provided.</p>
<p>The first batch of patterns to come out from the audit relates to <a href="http://developer.yahoo.com/ypatterns/navigation/bar/">navigation bars</a>. There are three patterns so far in this grouping: <a href="http://developer.yahoo.com/ypatterns/navigation/bar/topnav.html">Top Navigation</a>, <a href="http://developer.yahoo.com/ypatterns/navigation/bar/leftnav.html">Left Navigation</a>, and <a href="http://developer.yahoo.com/ypatterns/navigation/bar/progress.html">Progress Bar</a>. One legitimate question is whether top and left nav bars are still the best or most current way to navigate a site and find content? We still find many examples of them across the web and in use at Yahoo! so for now I&#8217;ll say yes, but it&#8217;s worth thinking about.</p>
<p>Wherever possible I try to link patterns back to <a href="http://developer.yahoo.com/yui/">the YUI Library</a> and, where appropriate, to other code and implementation solutions. YUI has great support for navbars and menu examples. Probably the best place to start is the <a href="http://developer.yahoo.com/yui/menu/">menu widget</a>.</p>
<p>One interesting nomenclature issue we studied was the distinction between a stepwise progress indicator (which is what the pattern is about) and a continuous progress bar (for which there&#8217;s <a href="http://developer.yahoo.com/yui/progressbar/">a great YUI example</a>). These two things are often referred to with similar names, but perform different functions. Suggestions for more appropriate terminology are welcome.</p>
<p>Please check out these <a href="http://developer.yahoo.com/ypatterns/navigation/bar/">new patterns</a> and let us know what you think!</p>
<div class="feedflare">
<a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=KBwmEfOfF-0:BJe5BcTd2N0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=KBwmEfOfF-0:BJe5BcTd2N0:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=KBwmEfOfF-0:BJe5BcTd2N0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=KBwmEfOfF-0:BJe5BcTd2N0:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?i=KBwmEfOfF-0:BJe5BcTd2N0:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.yuiblog.com/blog/2010/02/22/three-new-navigation-design-patterns/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>iPhone Design Stencils in the Pattern Library</title>
		<link>http://www.yuiblog.com/blog/2009/12/17/iphone-design-stencils-in-the-pattern-library/</link>
		<comments>http://www.yuiblog.com/blog/2009/12/17/iphone-design-stencils-in-the-pattern-library/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 22:11:30 +0000</pubDate>
		<dc:creator>Christian Crumlish</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[InDesign]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[stencils]]></category>

		<guid isPermaLink="false">http://www.yuiblog.com/blog/?p=1062</guid>
		<description><![CDATA[

Interaction designer and prototyper Chris Stone recently volunteered to adapt the iPhone stencils in our OmniGraffle based stencil kit in the Yahoo! Design Pattern Library and optimize them for use in Adobe InDesign. Chris is starting a new gig at Pulse Energy in Jan 2010 but these templates were created during his tenure as the [...]]]></description>
			<content:encoded><![CDATA[<div class="interview">
<div class="intro">
<p><em><img src="http://www.yuiblog.com/blog/wp-content/uploads/2009/12/stony.png" alt="stony" title="stony" width="105" height="142" class="alignright size-full wp-image-1077" />Interaction designer and prototyper Chris Stone recently volunteered to adapt the iPhone stencils in our OmniGraffle based stencil kit in the Yahoo! Design Pattern Library and <a href="http://developer.yahoo.com/ypatterns/about/stencils/iPhone.UI.Elements.zip">optimize them</a> for use in Adobe InDesign. Chris is starting a new gig at Pulse Energy in Jan 2010 but these templates were created during his tenure as the lead UXD Nitobi Software in Vancouver.</em></p>
</p></div>
<p class="q"><strong>Can you describe the stencils you contributed, why you made them, and what you personally use them for?</strong>
<p><a href="http://developer.yahoo.com/ypatterns/about/stencils/iPhone.UI.Elements.zip"><img src="http://www.yuiblog.com/blog/wp-content/uploads/2009/12/id_iphone.png" alt="id_iphone" title="id_iphone" width="59" height="36" class="alignleft size-full wp-image-1066" /></a>I created a customizable, vector-based <a href="http://developer.yahoo.com/ypatterns/about/stencils/">iPhone stencil library for InDesign</a>. They came about as a result of several conversations that ultimately culminated with the creation of this stencil. </p>
<p>I co-lead the Vancouver chapter of the IxDA and one of the conversations that I’ve been interested in discussing with the group is “What is open source UX and is it possible?”.  It’s a tricky topic to define, and the more I think about it, the more I am of the opinion that open sourcing tools is the first place to start, rather than focusing on definitions. I figure that the best thing you can do is to put tools in designers’ hands and let them create, so that’s exactly what I did. </p>
<p><img src="http://www.yuiblog.com/blog/wp-content/uploads/2009/12/iphone-proto.png" alt="iphone-proto" title="iphone-proto" width="183" height="346" class="alignright size-full wp-image-1069" />Meanwhile, while pondering the Open Source UX question I was working on an iPhone app for a client and really wanted to use the newly discovered &#8220;interactivity&#8221; features buried in the depths of an InDesign workspace in hopes of a new path to generating rapid, clickable prototypes. So, I nabbed the <a href="http://developer.yahoo.com/ypatterns/about/stencils/Y!DesignStencils-PDF.zip">PDF</a> that you posted and started building out the InDesign snippets with customizable gradients rather than repeating, or stretched screen captures that I&#8217;ve seen used. I wanted to provide every Interaction Designer/UX Designer out there that uses InDesign with an option to use their preferred application for creating iPhone app layouts and designs if necessary.</p>
<p>You can find more details on this process in a blog post i have written called  <a href="http://getstony.wordpress.com/2009/11/10/lightweight-prototyping-with-adobe-indesign/">Lightweight Prototyping with InDesign</a>.</p>
<p class="q"><strong>Can you discuss how these differ from the <a href="http://unify.eightshapes.com/users-guide/what-you-get/wireframe-element-libraries/">Eightshapes adaptation</a> of the Yahoo! stencil kit (since both are used in InDesign)?</strong></p>
<p>Basically, I wanted to customize the PDF that you had already provided using the same level of fidelity as in the Illustrator version. I realized that it was a compilation of repeating images, rather than complete, editable vectors. </p>
<p>That said, I was making a move back to InDesign from OmniGraffle and saw it as an opportunity to create a higher-fidelity iPhone stencil for wireframing, prototyping, and quickly skinning an app to play with differences in look and feel, and to enable you to move that much further with InDesign. </p>
<p>The 8Shapes stencil doesn&#8217;t have the default gradients or some of the other interaction elements that I wanted to use in my wires (key/num pad, list select tumbler, etc.). That said, I didn&#8217;t create icons to the same extent that they did. I basically mimicked what was in the existing Yahoo! stencil. </p>
<p>I would love to add more to it eventually when I have time. I like having the option of removing the gradient if need be for basic wireframing yet have them readily available for quick mockups. I think they&#8217;re a good complement to each other depending on your use case.</p>
<p class="q"><strong>What else would you see in the pattern library?</strong></p>
<p>I&#8217;d love to see the Yahoo stencils in higher fidelity, much like the iPhone stencil, therefore on par with the OmniGraffle fidelity. </p>
<p>A general library on <a href="http://www.designinggesturalinterfaces.com/">gesture based patterns</a> would also be quite useful.</p>
</div>
<div class="feedflare">
<a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=H2AXXMtJ9Z8:11z2Uk7xS8A:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=H2AXXMtJ9Z8:11z2Uk7xS8A:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=H2AXXMtJ9Z8:11z2Uk7xS8A:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=H2AXXMtJ9Z8:11z2Uk7xS8A:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?i=H2AXXMtJ9Z8:11z2Uk7xS8A:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.yuiblog.com/blog/2009/12/17/iphone-design-stencils-in-the-pattern-library/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Results of the Accordion Pattern survey</title>
		<link>http://www.yuiblog.com/blog/2009/10/26/results-of-the-accordion-pattern-survey/</link>
		<comments>http://www.yuiblog.com/blog/2009/10/26/results-of-the-accordion-pattern-survey/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 22:44:36 +0000</pubDate>
		<dc:creator>Christian Crumlish</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[design patterns]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[pattern library]]></category>

		<guid isPermaLink="false">http://www.yuiblog.com/blog/?p=427</guid>
		<description><![CDATA[A few months back we shared our current thinking on the &#8220;accordion&#8221; navigation component, and asked the community of web developers and designers who read this blog to take a survey to help us determine defaults, current practices, and other guidelines to incorporate into an Accordion pattern and provide input into an Accordion YUI component.
I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.yuiblog.com/blog/wp-content/uploads/2009/10/accordion-yahoo-sports.png" alt="accordion-yahoo-sports" title="accordion-yahoo-sports" width="345" height="363" class="alignright size-full wp-image-588" />A few months back <a href="http://www.yuiblog.com/blog/2009/03/23/survey-when-is-an-accordion-not-an-accordion/">we shared our current thinking on the &#8220;accordion&#8221; navigation component</a>, and asked the community of web developers and designers who read this blog to take a survey to help us determine defaults, current practices, and other guidelines to incorporate into an Accordion pattern and provide input into an Accordion YUI component.</p>
<p>I&#8217;ve had some time now to review and study the results and I wanted to share them with the community as we write up a &#8220;beta&#8221; version of the pattern and get ready to share it, so without further adieu, here are the results (note that this survey should not be considered strictly scientific).</p>
<p><strong>Who Responded</strong></p>
<p>Respondents identified themselves the following ways:<br />
<img class="alignright size-full wp-image-437" title="accordion-respondents" src="http://www.yuiblog.com/blog/wp-content/uploads/2009/08/accordion-respondents.png" alt="accordion-respondents" width="327" height="157" /></p>
<ul>
<li>Designer 21.4%</li>
<li>Developer	32.1%</li>
<li>Hybrid (Both designer and developer) 42.3%</li>
<li>None of the Above 4.2%</li>
</ul>
<p><strong>Terminology Distinctions</strong></p>
<p>Overwhelming majorities across all respondents agreed that</p>
<ul>
<li>Accordion and Accordion Menu mean the same thing (73%)</li>
<li>Accordions and Tree Controls are two different things (89%)</li>
</ul>
<p>Many commenters described the difference between accordions and trees along these lines: &#8220;Tree Control generally implies a depth of hierarchy that is not generally present with an accordion.&#8221;</p>
<p>A smaller majority said that Accordion and Collapsible Panels refer to the same thing (60%).</p>
<p>These majorities were consistent across roles.</p>
<p><strong>Presentation of Accordions</strong></p>
<p>A solid majority (68%), said that accordions can be laid out horizontally as well as vertically (and in fact the pattern is well attested on the web). People suggested that the labels on a horizontal accordion should be written vertically and/or rotated.</p>
<p>An even larger majority (72%) said that accordions can have only two levels (this aligns with the distinction between accordions and trees):</p>
<p><img class="alignnone size-full wp-image-431" title="accordion-2-levels" src="http://www.yuiblog.com/blog/wp-content/uploads/2009/08/accordion-2-levels.png" alt="accordion-2-levels" width="500" height="142" /></p>
<p>A slight majority (53%) said that accordions may be nested within other accordions. The written comments suggested that the wording of the question led some to answer that it&#8217;s certainly possible but not necessarily desirable, making suggestions such as, &#8220;If you adequately gutter them, this would be possible, but generally a terrible idea &#8211; kind of like using too many tabs and having them wrap into multiple rows.&#8221;</p>
<p><img class="alignnone size-full wp-image-433" title="accordion-nested" src="http://www.yuiblog.com/blog/wp-content/uploads/2009/08/accordion-nested.png" alt="accordion-nested" width="500" height="246" /></p>
<p>This was one of the questions where self-described designers and developers took opposing sides. 57% of Developers and Hybrids agreed that accordions may be nested, whereas 64% of Designers said they may not be. (None of the Aboves split 50/50!)</p>
<p>If I had to guess, I&#8217;d say that developers (and hybrids), more intimately connected with the how than the why may have been expressing more of a &#8220;you could do it&#8230;&#8221; perspective, whereas designers may have been expressing more of a &#8220;&#8230;but you shouldn&#8217;t&#8221; point of view.</p>
<p><strong>How Accordions Should Behave</strong></p>
<p>A small majority (54%) believes that accordions should allow for more than one panel to be open at a time. Both behaviors can be found online, so our impression is that this behavior may depend more on the constraints of the design space and the purpose of the accordion than on a blanket rule one way or the other.</p>
<p>This question also split along identity lines, but in an ambiguous way. Hybrids preferred the one panel-at-a-time rule by a tiny majority, while Designers and Developers and None of the Aboves agreed that multiple panels are okay by slightly larger majorities.</p>
<p><img class="alignnone size-full wp-image-436" title="accordion-multi-open" src="http://www.yuiblog.com/blog/wp-content/uploads/2009/08/accordion-multi-open.png" alt="accordion-multi-open" width="527" height="203" /></p>
<p>A much larger majority (73%) believes that an accordion can have a completely closed state (that is, that it&#8217;s not necessary that there always be one panel open). The only outlier is that the None of the Aboves broke 60% for the position that there must always be one panel open.</p>
<p><img class="alignnone size-full wp-image-430" title="accordion-panels-closed" src="http://www.yuiblog.com/blog/wp-content/uploads/2009/08/accordion-panels-closed.png" alt="accordion-panels-closed" width="500" height="235" /></p>
<p>Several commenters suggested that it is a good practice to have one panel open by default, and for that panel to be either the first one, the one most recently used.</p>
<p>Another large majority (76%) believes an accordion&#8217;s overall size can change as needed, rather than being constrained to a consistent size. (Of course, there are contexts, such as the screen of a mobile device, in which it may be a valid choice or even a design constraint that an accordion maintain a consistent size.)</p>
<p>A very slight majority (51%) suggested that accordions should open on click (as opposed to on hover) and a nearly as large minority (45%) said that it depends. Interestingly, fewer than 4% were willing to state the accordions should open on hover as a rule.</p>
<p><img class="alignnone size-full wp-image-432" title="accordion-onclick" src="http://www.yuiblog.com/blog/wp-content/uploads/2009/08/accordion-onclick.png" alt="accordion-onclick" width="500" height="247" /></p>
<p>Written comments on this question offered plenty of good food for thought, such as:</p>
<blockquote><p>Opening a panel should require explicit action. If an accordion has multiple panels, opening on hover could be a jarring experience. Rather, use a tooltip to convey summary details of what is in the panel, and have the user explicitly &#8220;click&#8221; to open that panel.</p></blockquote>
<blockquote><p>Depends on the configuration of each accordion.</p>
<p>I put these examples together [<a href="http://bubbling-library.com/sandbox/accordion/multiple.html">multiple</a>, <a href="http://bubbling-library.com/sandbox/accordion/rollover.html">rollover</a>], so the developer can actually use the &#8220;best fit&#8221; for each use case. </p>
<p>Also, there should be the option to use rollover with different rules: (one most be open) or (elements should be opened on mouseover only).</p></blockquote>
<blockquote><p>For advanced usages, an accordion should open on hover during drag and drop operations. In any other circumstance, you can&#8217;t trust that the hover is intentional.</p></blockquote>
<p><strong>Accessibility</strong></p>
<p>Finally, we asked an open-ended question fishing for any known accessibility issues with accordions and got a lot of great answers. (For our example issue, most people agreed that making the entire label clickable and not just a small icon is important.)</p>
<p>Here is a sampling of other insight about accessibility with accordions:</p>
<blockquote><p>I think it&#8217;s safe to assume that an Accordion interaction is an advanced interaction. Lots of accessibility problems can arise.</p>
<ol>
<li>Content is hidden behind panels so people may not find it.</li>
<li>Depending on the size of the clickable area or the trigger to open/close the panels there could be issues with the manual dexterity needed.</li>
</ol>
</blockquote>
<blockquote><p>Accordions should open all panels if javascript is unavailable (though that may produce a &#8220;flicker&#8221; for those with javascript).</p></blockquote>
<blockquote><p>It depends on whether content in the hidden panels is present in the DOM or is retrieved upon opening the panel. If it is being retrieved, focus needs to be placed on the newly opened panel.</p></blockquote>
<blockquote><p>Well, I really believe the title should be clickable, specially if the content of the element will be loaded using AJAX (just like a tabview approach), but the reality is that sometimes the developer (should have)/(want) the control to customize that behavior. Here is <a href="http://bubbling-library.com/sandbox/accordion/index.html">the list of examples</a> that I created for an accordion widget implementation based on YUI 2.x, it&#8217;s probably one of the most used components from the bubbling YUI extension.</p></blockquote>
<blockquote><p>We&#8217;ve had a case where the &#8216;label&#8217; of the accordion was a link to a full blog post, and so could not be accordion-clickable. In that case, we wrote an icon into the source with js to do the job. Provided the icon is sufficiently large and/or comes with an accesskey, I don&#8217;t see a major difficulty&#8230;</p></blockquote>
<blockquote><p>Accordion controls server the purpose of fitting lots of content into less space. Since this is a visual concern, it would be fine for a screen reader to simply read all of the content and ignore the fact that it is displayed as an accordion visually. It is sufficient for an icon to be clickable to expand a panel. There could be a configuration option to allow the entire label to expand a panel, or it can be left up to the implementing developer to attach a listener to the label that calls a public &#8220;open&#8221; or &#8220;expand&#8221; function to add that functionality.</p></blockquote>
<blockquote><p>Just think of an accordion as a tabbed view. The entire panel label area should be clickable, but if it contains other controls (e.g. a &#8220;dismiss&#8221; or &#8220;close&#8221; button) I suggest only the label (text) be clickable, or at least the clikable area only expand up to the interactive controls (i.e. for a caption containing a button, the area above, below and &#8220;after&#8221; the button should be clickable).</p></blockquote>
<p><strong>Releasing the Draft Pattern</strong></p>
<p>One commenter questioned the artificial constraints of the survey (a fair cop, if you ask me):</p>
<blockquote><p>I didn&#8217;t like this survey. The questions were not flexible enough. As a designer/developer, I believe all interface elements need to be tailored to particular site or web application. Asking black and white questions does not leave room for the obvious differences between projects. Some projects need a hard and fast rule, while the same rule might be totally inappropriate for another application. For the most part, I could of answered every question with a &#8220;it depends&#8221; result.</p></blockquote>
<p>Rest assured that the pattern will only gently recommend and the YUI code will be flexible and powerful. The survey wasn&#8217;t designed to limit people&#8217;s choices but rather to gather opinions and preferences, so even feedback about not having hard-and-fast rules is useful.</p>
<p>We&#8217;ve published a beta version of the <a href="http://developer.yahoo.com/ypatterns/navigation/accordion.html">Accordion pattern</a> in the Yahoo! Design Pattern Library. If you&#8217;d like to give further feedback on the pattern, in a free-form manner, please drop by or visit the related <a href="http://developer.yahoo.net/forum/index.php?showtopic=2980">forum</a> discussion.</p>
<div class="feedflare">
<a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=oDAnR1uQjdI:F61v-Q31ODE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=oDAnR1uQjdI:F61v-Q31ODE:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=oDAnR1uQjdI:F61v-Q31ODE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=oDAnR1uQjdI:F61v-Q31ODE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?i=oDAnR1uQjdI:F61v-Q31ODE:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.yuiblog.com/blog/2009/10/26/results-of-the-accordion-pattern-survey/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>John Peloquin’s Multi-layer Calendar</title>
		<link>http://www.yuiblog.com/blog/2009/04/03/multi-layer-calendar/</link>
		<comments>http://www.yuiblog.com/blog/2009/04/03/multi-layer-calendar/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 22:41:57 +0000</pubDate>
		<dc:creator>Eric Miraglia</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[johnpeloquin whardyinteractive yui calendar]]></category>

		<guid isPermaLink="false">http://yuiblog.com/blog/2009/04/03/multi-layer-calendar/</guid>
		<description><![CDATA[
YUI contributor (and author of the Interval Selection Calendar example) John Peloquin of W. Hardy Interactive has released another excellent option for Calendar implementers: a layered navigation path for selecting years and months. The layered approach provides an alternative to the built-in navigator interface that ships with Calendar.
John describes the inspiration and thought process behind [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blogs.whardy.com/john/2009/04/03/multi-layer-calendar/"><img src="http://yuiblog.com/assets/calendar-layer-20090403-152423.jpg" alt="John Peloquin's multi-layer calendar navigator." width="510" height="371" /></a></p>
<p>YUI contributor (and author of the <a href="http://developer.yahoo.com/yui/examples/calendar/intervalcal.html">Interval Selection Calendar example</a>) John Peloquin of W. Hardy Interactive has released another excellent option for <a href="http://developer.yahoo.com/yui/calendar/">Calendar</a> implementers: <a href="http://blogs.whardy.com/john/2009/04/03/multi-layer-calendar/">a layered navigation path for selecting years and months</a>. The layered approach provides an alternative to the built-in <a href="http://developer.yahoo.com/yui/examples/calendar/calnavigator.html">navigator interface</a> that ships with Calendar.</p>
<p>John describes the inspiration and thought process behind this implementation <a href="http://blogs.whardy.com/john/2009/04/03/multi-layer-calendar/">on his blog</a>, where you&#8217;ll also find  <a href="http://whardy.com/js/yui/multilayercalendar/docs/YAHOO.WHII.widget.MultiLayerCalendar.html"  title="Multi-Layer Calendar API documentation">API documentation</a> and <a href="http://whardy.com/js/yui/multilayercalendar/docs/multilayercalendar.js.html" title="Multi-Layer Calendar source code">source code</a>.</p>
<div class="feedflare">
<a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=zCwgAqxG0UU:eAAoSKZuZss:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=zCwgAqxG0UU:eAAoSKZuZss:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=zCwgAqxG0UU:eAAoSKZuZss:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=zCwgAqxG0UU:eAAoSKZuZss:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?i=zCwgAqxG0UU:eAAoSKZuZss:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.yuiblog.com/blog/2009/04/03/multi-layer-calendar/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Survey: When is an Accordion not an Accordion?</title>
		<link>http://www.yuiblog.com/blog/2009/03/23/survey-when-is-an-accordion-not-an-accordion/</link>
		<comments>http://www.yuiblog.com/blog/2009/03/23/survey-when-is-an-accordion-not-an-accordion/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 05:20:03 +0000</pubDate>
		<dc:creator>Christian Crumlish</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[accordion]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[collapsible panels]]></category>
		<category><![CDATA[patterns]]></category>
		<category><![CDATA[rich interactions]]></category>

		<guid isPermaLink="false">http://yuiblog.com/blog/2009/03/23/survey-when-is-an-accordion-not-an-accordion/</guid>
		<description><![CDATA[I&#8217;m looking for feedback from people who have designed or built an interface using an &#8220;accordion&#8221; module (or are considering doing so). You see, I&#8217;ve been working on a design pattern for accordion modules, and I&#8217;d like to throw out a handful of open questions to the community via this brief survey. I&#8217;ll be listening [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.yuiblog.com/blog/wp-content/uploads/2009/03/accordion-pop.png" alt="example of an accordion" style="margin: 0pt 0pt 2px 8px; float: right" />I&#8217;m looking for feedback from people who have designed or built an interface using an &#8220;accordion&#8221; module (or are considering doing so). You see, I&#8217;ve been working on a design pattern for accordion modules, and I&#8217;d like to throw out a handful of open questions to the community via <a href="http://www.surveymonkey.com/s.aspx?sm=lGHKygw2YwMI8yoom00Tzg_3d_3d">this brief survey</a>. I&#8217;ll be listening elsewhere as well, on twitter (<a href="http://twitter.com/mediajunkie">@mediajunkie</a>) and on mailing lists where web designers and developers hang out.</p>
<p>(I realize this is not a scientific survey. I&#8217;m just interested in engaging the wider community in a discussion instead of trying to impose my view or Yahoo!&#8217;s view on the community as authoritative.)</p>
<p>Everywhere I go lately, it seems that interaction designers and web developers are talking about accordion widgets and debating about what makes an accordion an accordion. Not everyone working in this field has heard the term (some may simply refer to &#8220;stacked panels&#8221; or &#8220;collapsible panels&#8221;) but most get the gist fairly easily. Ironically, none of the UI elements described as accordions share the actual behavior of a real-world accordion (the musical instrument): namely, that stretching an accordion opens all the folds evenly.</p>
<p>Accordions have been an on-and-off topic of discussion <a href="http://www.ixda.org/search.php?tag=accordion">on the main IxDA mailing list</a>; we discussed them in our <a href="http://interaction09.crowdvine.com/talks/show/2574">Pattern Library</a> workshop in Vancouver earlier this month, and there&#8217;s been an ongoing discussion about accordions on our internal designer mailing list here at Yahoo!.</p>
<p>So I sat down with some folks from the YUI team (and Marco, the maker of an experimental <a href="http://yuiblog.com/blog/2008/07/25/accordionview/">YUI accordion widget</a>) a little while ago to sort through a draft of an accordion pattern that might help inform the development of an official YUI component.</p>
<p>Broadly speaking, most people agree on what we&#8217;re talking about when we talk about an accordion interface element. Everyone agrees that accordions are used to compress content into a limited space and that they consist of panels that can collapse or expand. Beyond this, there are a number of subtle nuances that not everyone agrees on.</p>
<p>One trend I&#8217;ve noticed is that front-end developers tend be agnostic about how the accordion should work, viewing it as really just a variant on a tree widget. Designers tend to be more prescriptive, saying that to be an accordion it must behave in thus and such a way (but not all designers agree on what these rules are).</p>
<p>In the end, the YUI folks will produce code that can be made to do just about anything. We aren&#8217;t going to try to impose our own taste or preferences in design through the functionality of the code itself. However, we will use the associated pattern to make suggestions and recommendations drawn from the experience of the entire design community, and we will probably lobby for default behaviors that match what most people expect.</p>
<p>So, if you&#8217;ve got a few minutes and an opinion, please <a href="http://www.surveymonkey.com/s.aspx?sm=lGHKygw2YwMI8yoom00Tzg_3d_3d">visit the survey</a> and let me know what you think!</p>
<p>I&#8217;ll close the survey on April 30.</p>
<div class="feedflare">
<a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=piUIMo7GdgY:lKBEYHKHtcs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=piUIMo7GdgY:lKBEYHKHtcs:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=piUIMo7GdgY:lKBEYHKHtcs:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=piUIMo7GdgY:lKBEYHKHtcs:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?i=piUIMo7GdgY:lKBEYHKHtcs:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.yuiblog.com/blog/2009/03/23/survey-when-is-an-accordion-not-an-accordion/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>YUI Turns Three!</title>
		<link>http://www.yuiblog.com/blog/2009/02/18/yui-3rd-birthday/</link>
		<comments>http://www.yuiblog.com/blog/2009/02/18/yui-3rd-birthday/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 03:38:33 +0000</pubDate>
		<dc:creator>Jenny Han Donnelly</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://yuiblog.com/blog/2009/02/18/yui-3rd-birthday/</guid>
		<description><![CDATA[The YUI Library turned three years old this month and we&#8217;d like to invite you &#8212; our community of developers and implementers &#8212; to come out and celebrate! To celebrate our third birthday (and our 2.7.0 release),  we&#8217;ll be hosting a recession-chic happy hour at the Blue Chalk Cafe in downtown Palo Alto,  [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://yuiblog.com/assets/yui-3rd-birthday/three.png" width="170" height="245" align="right">The YUI Library turned three years old this month and we&#8217;d like to invite you &#8212; our community of developers and implementers &#8212; to come out and celebrate! To celebrate our third birthday (and our 2.7.0 release),  we&#8217;ll be hosting a recession-chic happy hour at the Blue Chalk Cafe in downtown Palo Alto,  Thursday, February 26 from 6:00 to 8:00 pm. Nothing too fancy,  but we&#8217;ll have fun goodies to give away and the first few rounds of drinks are on us (until the tab runs out). Details and signups are at <a href="http://upcoming.yahoo.com/event/1850956">Upcoming</a>. Hope to see you there!</p>
<div class="feedflare">
<a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=-oJBE2OSl1A:cu3lRUBevD4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=-oJBE2OSl1A:cu3lRUBevD4:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=-oJBE2OSl1A:cu3lRUBevD4:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=-oJBE2OSl1A:cu3lRUBevD4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?i=-oJBE2OSl1A:cu3lRUBevD4:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.yuiblog.com/blog/2009/02/18/yui-3rd-birthday/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>YUI 2.7.0 Released</title>
		<link>http://www.yuiblog.com/blog/2009/02/18/yui-270/</link>
		<comments>http://www.yuiblog.com/blog/2009/02/18/yui-270/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 23:52:41 +0000</pubDate>
		<dc:creator>George Puckett</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://yuiblog.com/blog/2009/02/18/yui-270/</guid>
		<description><![CDATA[The YUI development team is pleased to release version 2.7.0 of the YUI Library. You can download YUI 2.7.0 from YUILibrary.com or configure your implementation using the YUI Configurator.
Version 2.7.0 introduces a new StyleSheet component, graduates three components out of &#8220;beta&#8221;, improves support for the upcoming release of IE8,  includes over 180 bug fixes [...]]]></description>
			<content:encoded><![CDATA[<p>The YUI development team is pleased to release <a href="http://developer.yahoo.com/yui/">version 2.7.0 of the YUI Library</a>. You can <a href="http://developer.yahoo.com/yui/download/">download YUI 2.7.0</a> from YUILibrary.com or configure your implementation using the <a href="http://developer.yahoo.com/yui/articles/hosting/">YUI Configurator</a>.</p>
<p>Version 2.7.0 introduces a new StyleSheet component, graduates three components out of &#8220;beta&#8221;, improves support for the upcoming release of IE8,  includes over 180 bug fixes and enhancements, and ships with more than <a href="http://developer.yahoo.com/yui/examples/">300 functional examples</a>.</p>
<h3 id="introducing-stylesheet">Introducing StyleSheet</h3>
<p>The <a href="http://developer.yahoo.com/yui/stylesheet/">YUI StyleSheet Utility</a>, developed by YUI engineer Luke Smith, provides a means to optimize the application of a style or changes to existing styles across multiple elements without incurring the cost of a page reflow for each element. Using the benefits of dynamic CSS,  the StyleSheet Utility allows the creation of new stylesheets and changes to existing stylesheets that can be applied to multiple elements without the need to loop through the elements in the DOM, thus maintaining an optimal experience for the end user of the page.</p>
<h3 id="component-updates">Updates to Existing Components</h3>
<h4 id="charts-enhancements">Charts Enhancements</h4>
<p><a href="http://developer.yahoo.com/yui/charts/" title="YUI Charts Control"><img src="http://yuiblog.com/assets/yui-270/charts-enhancements.png" alt="Enhancements to Charts Control include rotated labels, zero-gridline styling, and enhanced series styling"></a></p>
<p>The <a href="http://developer.yahoo.com/yui/charts/">Charts Control</a> benefits from several new additions in the 2.7.0 release made by Dwight &#8220;Tripp&#8221; Bridges. Charts can now be specified with rotated axis labels and titles. New series styles have been added which allow more control over the color and alpha settings of lines, borders, and fills for the series markers. A <code>zeroGridline</code> style has been added to be able to draw attention to a chart&#8217;s zero gridline when it appears beyond the origin. Several bugs have been addressed in the TimeAxis class, resulting in more accurate <code>majorUnit</code> and <code>minorUnit</code> calculations.</p>
<h4 id="dom-additions">Additions to the Dom Collection</h4>
<p>Matt Sweeney has been hard at work in both the 3.x and 2.x code lines of YUI. As an enhancement to 2.7.0, the work done in 3.x on <code>getXY()</code> and <code>setXY()</code> has been integrated into the <a href="http://developer.yahoo.com/yui/dom/">Dom Collection</a> for this release. The properties <code>height</code> and <code>width</code> are now available in Region; the <code>get()</code> method now supports Element instances; and several new methods have been added for this release, including <code>getComputedStyle()</code>, <code>getElementBy()</code>, <code>setAttribute()</code>, and <code>getAttribute()</code>.</p>
<h4 id="container-changes">Container Changes</h4>
<p>The <a href="http://developer.yahoo.com/yui/container/">Container family of components</a> has received a couple notable updates from YUI&#8217;s own Satyen Desai. Dialog now supports sending post data along with any data mined from the form for &#8220;async&#8221; post requests. It also provides the Connection object as the first argument to subscribers of the &#8220;asyncSubmit&#8221; event. Overlay&#8217;s &#8220;fixedcenter&#8221; support has been enhanced with the ability to optionally disable centering on scroll when the window size is not large enough to fully contain the Overlay. The Container README file included in the release contains full details on these items and a full list of changes for 2.7.0.</p>
<h4 id="updated-treeview">Updated Treeview</h4>
<p>Prolific YUI community member and developer Satyam has contributed a long list of enhancements and bug fixes to YUI&#8217;s <a href="http://developer.yahoo.com/yui/treeview/">TreeView Control</a> for this release. Node highlighting and selection has been added, including single and multi-node selection support as well as upward and downward propagation. There have been significant improvements to focus and event handling. The parsing in <code>buildTreeFromMarkup()</code> has been updated to read an HTML attribute called &#8220;yuiConfig&#8221; which can override any property read from the markup. It assembles an object literal that is then passed to <code>buildTreeFromObject()</code>. Several class names have been added to TreeView in order to make it easier to identify elements in the generated HTML. This is only a small sample of the changes to this component for 2.7.0. Refer to the TreeView README file for the full summary of changes in this release.</p>
<h4 id="ie8-support">Internet Explorer 8 Support</h4>
<p>The YUI team has put a great deal of effort into testing the library components with the pre-release versions of the new IE8 browser. There have been several changes made in the library to provide better compatibility with the new browser. Please note, at the time of the 2.7.0 release, IE8 is still a release candidate. Should any significant issues be found when IE8 is officially launched, we will work to post a timely YUI update.</p>
<h4 id="promotions">Promotion from Beta Status</h4>
<p>The following components have been promoted out of &#8220;beta&#8221; status in the YUI 2.7.0 release:</p>
<ul>
<li><a href="http://developer.yahoo.com/yui/element/">Element</a></li>
<li><a href="http://developer.yahoo.com/yui/profilerviewer/">ProfilerViewer</a></li>
<li><a href="http://developer.yahoo.com/yui/selector/">Selector</a></li>
</ul>
<h3 id="enhancements-and-bug-fixes">Over 180 Enhancements and Bug Fixes</h3>
<p>The information included above describes just a few of the updates in 2.7.0. Refer to the <a href="http://tech.groups.yahoo.com/group/ydn-javascript/message/45305">README digest</a> or the individual README files for full details on changes in this release. YUI 2.7.0 also addresses over 180 defect reports and enhancement requests that have been submitted by the development community. A <a href="http://tech.groups.yahoo.com/group/ydn-javascript/message/45305">comprehensive change log</a> has been provided for your reference.</p>
<h3 id="thanks">Thanks!</h3>
<p>The YUI Library has grown in functionality as well as quality as a result of the feedback and suggestions we get from all of you in the community. We hope you will enjoy using the 2.7.0 release of YUI, and we look forward to your continued feedback on the <a href="http://tech.groups.yahoo.com/group/ydn-javascript/">YUI mailing list and forum</a>. Please continue to log any enhancement requests you have for the library as well as defects you run into in your development at our new ticket repositories on <a href="http://yuilibrary.com/">YUILibrary.com</a>.</p>
<p>For all of your feedback and support, I extend a big thank you to everyone in the YUI community on behalf of the entire development team: Adam Moore, Dav Glass, Eric Miraglia, Jenny Han Donnelly, Luke Smith, Matt Sweeney, Nate Koechley, Satyen Desai, Thomas Sha, and Todd Kloots; and contributors: Allen Rabinovich, Caridy Pati&#241;o, Dwight &#8220;Tripp&#8221; Bridges, Gopal Venkatesan, Julien Lecomte, Matt Mlinac, Nicholas C. Zakas, Philip Tellis, and Satyam.</p>
<div class="feedflare">
<a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=ZtNtCOThBXw:jIldaLCuKkE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=ZtNtCOThBXw:jIldaLCuKkE:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=ZtNtCOThBXw:jIldaLCuKkE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=ZtNtCOThBXw:jIldaLCuKkE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?i=ZtNtCOThBXw:jIldaLCuKkE:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.yuiblog.com/blog/2009/02/18/yui-270/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Image Optimization, Part 4: Progressive JPEG…Hot or Not?</title>
		<link>http://www.yuiblog.com/blog/2008/12/05/imageopt-4/</link>
		<comments>http://www.yuiblog.com/blog/2008/12/05/imageopt-4/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 16:23:54 +0000</pubDate>
		<dc:creator>Stoyan Stefanov</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://yuiblog.com/blog/2008/12/05/imageopt-4/</guid>
		<description><![CDATA[

About the Author: Stoyan Stefanov is a Yahoo! web developer working for the Exceptional Performance team and leading the development of the YSlow performance tool. He also an open-source contributor, conference speaker and technical writer: his latest book is called Object-Oriented JavaScript.


This is part 4 in an ongoing series. You can read the other parts [...]]]></description>
			<content:encoded><![CDATA[<div class="interview">
<div class="intro">
<p><img src="http://yuiblog.com/assets/stoyan.jpg" alt="Stoyan Stefanov." align="right" hspace="10" vspace="5"><em><strong>About the Author:</strong><a href="http://www.phpied.com"> Stoyan Stefanov</a> is a Yahoo! web developer working for the <a href="http://developer.yahoo.com/performance/">Exceptional Performance</a> team and leading the development of the <a href="http://developer.yahoo.com/yslow/">YSlow</a> performance tool. He also an open-source contributor, conference speaker and technical writer: his latest book is called <a href="http://www.packtpub.com/object-oriented-javascript-applications-libraries/book">Object-Oriented JavaScript</a>.</em></p>
</div>
</div>
<p><em>This is part 4 in an ongoing series. You can read the other parts here:</em></p>
<ul>
<li><a href="http://yuiblog.com/blog/2008/10/29/imageopt-1/">Image Optimization Part 1: The Importance of Images</a></li>
<li><a href="http://yuiblog.com/blog/2008/11/04/imageopt-2/">Image Optimization Part 2: Selecting the Right File Format</a></li>
<li><a href="http://yuiblog.com/blog/2008/11/14/imageopt-3/">Image Optimization Part 3: Four Steps to File Size Reduction</a></li>
</ul>
<p>In the <a href="http://yuiblog.com/blog/2008/11/14/imageopt-3/">previous article</a>, the progressive JPEGs were briefly mentioned as a possible option when optimizing JPEGs. This post now diggs into this option a little deeper with the results of an optimization experiment involving over 10,000 images.</p>
<h3>Baseline vs. progressive JPEGs</h3>
<p>Baseline are the &#8220;normal&#8221; JPEGs, the type of JPEG that all image programs write by default. The browsers load them top-to-bottom as more of the image information comes down the wire.</p>
<p><a href="http://yuiblog.com/assets/5-base-example.jpg"><img src="http://yuiblog.com/assets/5-base-example-small.jpg" alt="Loading a baseline JPEG" /></a></p>
<p>Loading a baseline JPEG, click to enlarge</p>
<p>Progressive JPEGs are another type of JPEGs, they are rendered, as the name suggests, progressively. First you see a low quality version of the whole image. Then, as more of the image information arrives over the network, the quality gradually improves.</p>
<p><a href="http://yuiblog.com/assets/4-prog-example.jpg"><img src="http://yuiblog.com/assets/4-prog-example-small.jpg" alt="Loading a baseline JPEG" /></a></p>
<p>Loading a progressive JPEG, click to enlarge</p>
<p>From usability perspective, progressive is usually good, because the user gets feedback that something is going on. Also if you&#8217;re on a slow connection, progressive JPEG is preferable because you don&#8217;t need to wait for the whole image to arrive in order to get an idea if it is what you wanted. If not, you can click away from the page or hit the back button, without waiting for the (potentially large) high quality image.</p>
<p>A reason against progressive JPEGs I&#8217;ve heard is that they look a bit old school and that users might be underimpressed, if not irritated, by the progressive rendering. I am not aware of a user study that focuses on this issue, please comment if you have heard or conducted such a experiment.</p>
<p>There is controversial information in blogs and books whether progressive JPEGs are bigger or smaller than the baseline JPEGs in terms of file size. So, as part of the never-ending quest for smaler file sizes and lossless optimization, here is an experiment that attempts to answer this question.</p>
<h3>The experiment</h3>
<p>One of the <a href="http://developer.yahoo.com/everything.html">many free APIs</a> that Yahoo! provides is the <a href="http://developer.yahoo.com/search/image/V1/imageSearch.html">image search API</a>. I used it to find images that match a number of queries, such as &#8220;kittens&#8221;, &#8220;puppies&#8221;, &#8220;monkeys&#8221;, &#8220;baby&#8221;, &#8220;flower&#8221;, &#8220;sunset&#8221;.. 12 queries in total. Once having the image URLs, I downloaded all the images and cleaned up 4xx and 5xx error responses and non-jpegs (turned out sometimes sites host PNGs or even BMPs renamed as .jpg). After the cleanup there were 10360 images to work with, images of all different dimensions and quality, and best of all, real life images from live web sites.</p>
<p>Having the source images, I ran them through jpegtran twice with the following commands:</p>
<p><code>&gt; jpegtran -copy none -optimize source.jpg result.jpg</code></p>
<p>and</p>
<p><code>&gt; jpegtran -copy none -progressive source.jpg result.jpg</code></p>
<p>The first one optimizes the Huffman tables in the baseline JPEGs (details discussed in the previous article). The second command converts the source JPEGs into progressive ones.</p>
<p>Let&#8217;s see what the result file sizes turn out to be.</p>
<h3>Results</h3>
<blockquote><p>The Census report, like most such surveys, had cost an awful lot of money and didn&#8217;t tell anybody anything they didn&#8217;t already know &mdash; except that every single person in the Galaxy had 2.4 legs and owned a hyena. Since this was clearly not true the whole thing had eventually to be scrapped.</p></blockquote>
<p>Douglas Adams &mdash; &#8220;So Long, and Thanks for All the Fish&#8221;</p>
<p>The median JPEG returned in this experiment was 52.07 Kb, which is probably not the most useful statistic. The important thing is that the median saving when using jpegtran to optimize the image losslessly as a <strong>baseline JPEG is 9.04%</strong> of the original (the median image becomes 47.36 Kb) and when using a <strong>progressive JPEG, it&#8217;s 11.45%</strong> (46.11 Kb median).</p>
<p>So it looks like progressive JPEGs are smaller on average. But that&#8217;s only the average, it&#8217;s not a hard rule. In fact in more than 15% of the cases (1611 out of the 10360 images) the progressive JPEG versions were bigger. Since it&#8217;s difficult to predict when an image will be smaller as progressive by just looking at it (or for automated processing without even looking at it), an idea of how the image will perform based on its dimensions or file size would be really helpful.</p>
<p>Looking for a relationship, I plotted all the results on a graph where:</p>
<ul>
<li>Y is the difference in the savings &#8220;baseline minus progressive&#8221;, so negative numbers will mean cases when baseline is smaller</p>
<li>X is the file size of the original image</li>
</ul>
<p>The graph shows how the results are all over the place, but there seems to be a trend &mdash; the bigger the image, the better it is to save it as a progressive JPEG.</p>
<p><img src="http://yuiblog.com/assets/1-progressive-jpeg-overview.png" alt="Progressive vs baseline JPEG" /></p>
<p>&#8220;Zooming&#8221; into the area of smaller file sizes to see where progressive JPEGs get less effective, let&#8217;s only consider the images that are 30K and under. Then using the trendline feature of Excel, we can see where the line is drawn (for a clearer trendline mouse over or focus or click the image).</p>
<p><a href="http://yuiblog.com/assets/3-progressive-jpeg.png"><img<br />
    src="http://yuiblog.com/assets/2-progressive-jpeg.png"<br />
    id="progressive-jpeg-chart"<br />
    alt="Progressive vs baseline JPEG for smaller images"<br />
/></a><br />
<script type="text/javascript">
(function(){
new Image().src = 'http://yuiblog.com/assets/3-progressive-jpeg.png';
var i = document.getElementById('progressive-jpeg-chart');
var a = i.parentNode;
a.onmouseover = a.onfocus = function() {i.src = 'http://yuiblog.com/assets/3-progressive-jpeg.png';};
a.onmouseout  = a.onblur  = function() {i.src = 'http://yuiblog.com/assets/2-progressive-jpeg.png';};
})();
</script></p>
<h3>Summary</h3>
<p>The take-home messages after looking at the graphs above:</p>
<ul>
<li>when your JPEG image is under 10K, it&#8217;s better to be saved as baseline JPEG (estimated 75% chance it will be smaller)</li>
<li>for files over 10K the progressive JPEG will give you a better compression (in 94% of the cases)</li>
</ul>
<p>So if your aim is to squeeze every byte (and consitency is not an issue), the best thing to do is to try both baseline and progressive and pick the smaller one.</p>
<p>The other option is have all images smaller than 10K as baseline and the rest as progressive. Or simply use baseline for thumbs, progressive for everything else.</p>
<h3>IE and progressive JPEGs</h3>
<p>&#8220;Oh, not IE again!&#8221; is probably what you&#8217;re thinking, but it&#8217;s not so bad actually. It&#8217;s just that IE doesn&#8217;t render progresive JPEGs progressively. It displays the image just fine, but only when it arrives completely. So in IE, the baseline JPEGs display more progressively (top-to-bottom is still progress) than the progressive JPEGs.</p>
<h3>A word on ImageMagick</h3>
<p>ImageMagick is a an impressive set of command-line image tools, which you can also use to optimize files. Unlike most other image software, by default ImageMagick writes <strong>optimized</strong> baseline JPEGs (as if using the -optimize switch in jpegtran).</p>
<p>ImageMagick can also strip meta data and write progressive JPEGs, so I repeated the experiment outlined above but using ImageMagick instead of jpegtran. The commands used were:</p>
<pre>
&gt;convert -strip source.jpg result.jpg // baseline JPG
&gt;convert -strip -interlace Plane source.jpg result.jpg // progressive JPEG
</pre>
<p>Observations from the ImageMagick experiment:</p>
<ul>
<li>The baseline vs. progressive trendline is the same: images 10K or bigger are better optimized when using progressive encoding</li>
<li>The overall compression is better: the median is <strong>10.85% optimization for baseline JPEGs</strong> (jpegtran saved 9.04%) and <strong>13.25% for progressive JPEGs</strong> (11.45% with jpegtran)</li>
<li>There is some quality loss. ImageMagick doesn&#8217;t perform fully lossless operations. Inspecting random images visually I couldn&#8217;t tell any difference but using <a href="http://www.phpied.com/image-diff/">an image diff</a> utility shows that pixel information in the images has been modified.</li>
</ul>
<p>And the last set of stats gleaned from the experiment has to do with the speed of writing JPEGs. Here&#8217;s how jpegtran and ImageMagick performed while optimizing the 10k+ images on my laptop (Windows XP, 2GHz dual CPU, 500Mb RAM). From fastest to slowest:</p>
<ol>
<li>jpegtran baseline (11 images per second),</li>
<li>jpegtran progressive (9 images/s),</li>
<li>ImageMagick baseline (7 images/s),</li>
<li>ImageMagick progressive (5.5 images/s)</li>
</ol>
<div class="feedflare">
<a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=PFCpU_eTqsc:9Ehf88REc4U:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=PFCpU_eTqsc:9Ehf88REc4U:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=PFCpU_eTqsc:9Ehf88REc4U:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=PFCpU_eTqsc:9Ehf88REc4U:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?i=PFCpU_eTqsc:9Ehf88REc4U:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.yuiblog.com/blog/2008/12/05/imageopt-4/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Image Optimization Part 2: Selecting the Right File Format</title>
		<link>http://www.yuiblog.com/blog/2008/11/04/imageopt-2/</link>
		<comments>http://www.yuiblog.com/blog/2008/11/04/imageopt-2/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 17:16:42 +0000</pubDate>
		<dc:creator>Stoyan Stefanov</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://yuiblog.com/blog/2008/11/04/imageopt-2/</guid>
		<description><![CDATA[

About the Author: Stoyan Stefanov is a Yahoo! web developer working for the Exceptional Performance team and leading the development of the YSlow performance tool. He also an open-source contributor, conference speaker and technical writer: his latest book is called Object-Oriented JavaScript.


This is part 2 in an ongoing series. You can read the other parts [...]]]></description>
			<content:encoded><![CDATA[<div class="interview">
<div class="intro">
<p><img src="http://yuiblog.com/assets/stoyan.jpg" alt="Stoyan Stefanov." align="right" hspace="10" vspace="5"><em><strong>About the Author:</strong><a href="http://www.phpied.com"> Stoyan Stefanov</a> is a Yahoo! web developer working for the <a href="http://developer.yahoo.com/performance/">Exceptional Performance</a> team and leading the development of the <a href="http://developer.yahoo.com/yslow/">YSlow</a> performance tool. He also an open-source contributor, conference speaker and technical writer: his latest book is called <a href="http://www.packtpub.com/object-oriented-javascript-applications-libraries/book">Object-Oriented JavaScript</a>.</em></p>
</div>
</div>
<p><em>This is part 2 in an ongoing series. You can read the other parts here:</em></p>
<ul>
<li><a href="http://yuiblog.com/blog/2008/10/29/imageopt-1/">Image Optimization Part 1: The Importance of Images</a></li>
<li><a href="http://yuiblog.com/blog/2008/11/14/imageopt-3/">Image Optimization Part 3: Four Steps to File Size Reduction</a></li>
<li><a href="http://yuiblog.com/blog/2008/12/05/imageopt-4/">Image Optimization Part 4: Progressive JPEG…Hot or Not?</a></li>
</ul>
<p>This second installment of the image optimization series talks about file formats and how to chose the right one for the job. We&#8217;ll briefly discuss the popular GIF and JPEG formats and then move on to highlighting the rock star, PNG, hopefully helping correct some misconceptions about it.</p>
<h3>GIF</h3>
<p>GIF is a palette (also called &#8220;indexed&#8221;) type of image. It contains a palette of indexed colors, up to 256, and for every pixel of the image there is a corresponding color index. The format is no longer subject to patent issues, so you can create GIFs without the risk of going to jail. (For more on the history of the GIF format, <a href="http://www.cloanto.com/users/mcb/19950127giflzw.html">click here</a>.)</p>
<p>GIF is a <em>non-lossy</em> format, which means that when you modify the image and save it, you don&#8217;t lose quality.</p>
<p>GIF also support animations, which, in the dark Web 1.0 ages, resulted in a plethora of blinking &#8220;new&#8221; images, rotating @ signs, birds dropping &#8230; an email, and other annoyances. In the much more civilized Web 2.0 era, we still have &#8220;loading&#8230;&#8221; animations while we wait for the results of the next Ajax request to update the page, but there are also things like the good old shiny sparkles that people like to put in their social network profiles. Nevertheless, animation support is here if you need it.</p>
<p>GIF also supports transparency, which is a sort of boolean type of transparency. A pixel in a GIF image is either fully transparent or it&#8217;s fully opaque.</p>
<h3>JPEG</h3>
<p>JPEG doesn&#8217;t have the 256 colors restriction associated with GIFs; it can contain millions of colors and it has great compression. This makes it suitable for photos and, in fact, most cameras store photos in JPEG format. It&#8217;s a <em>lossy</em> format, meaning you lose quality with every edit, so it&#8217;s best to store the intermediate results in a different format if you plan to have many edits. There are, however, some operations that can be performed losslessly, such as cropping a part of the image, rotating it or modifying meta information, such as comments stored in the image file.</p>
<p>JPEG doesn&#8217;t support transparency.</p>
<h3>PNG</h3>
<p>PNGs is a <em>non-lossy</em> format that comes in several kinds, but for practical purposes, we can think of PNGs as being of two kinds:</p>
<ol>
<li>PNG8, and</li>
<li>truecolor PNGs.</li>
</ol>
<p>PNG8 is a palette image format, just like GIF, and 8 stands for 8 bits, or 2<sup>8</sup>, or 256, the number of palette entries. The terms &#8220;PNG8&#8243;, &#8220;palette PNG&#8221; and &#8220;indexed PNG&#8221; are used interchangeably. </p>
<p>How does PNG8 compare to GIF?</p>
<ul>
<li>Pros:
<ul>
<li>it usually yields a smaller file size</li>
<li>it supports alpha (variable) transparency</li>
</ul>
</li>
<li>Cons:
<ul>
<li>no animation support</li>
</ul>
</li>
</ul>
<p>The second type of PNGs, truecolor PNGs, can have millions of colors, like JPEG. You can also sometimes come across the names PNG24 or PNG32.</p>
<p>And how does truecolor PNG compare to JPEG? On the pros side, it&#8217;s non-lossy and supports alpha transparency, but on the cons side, the file size is bigger. This makes truecolor PNG an ideal format as an intermediate between several edits of a JPEG and also in cases where every pixel matters and the file size doesn&#8217;t matter much, such as taking screeenshots for a help manual or some printed material.</p>
<h3>Internet Explorer and PNG transparency</h3>
<p>We said that both PNG types support alpha transparency, but there are some browser eccentricities that affect both types and about which you should be aware.</p>
<p>With PNG8, whenever you have semi-transparent pixels they appear as fully transparent in IE (version 6 and lower). This is not ideal but it&#8217;s still useful and is the same behavior that you get from a GIF. So by using a PNG8, in the worst case (IE &lt; 7) you get the same user experience as with a GIF, while for other browsers (Firefox, Safari, Opera) you get a better experience. Below is an example that illustrates this, note how in IE6 the semi-transparent light around the bulb is missing (source: <a href="http://www.sitepoint.com/blogs/2007/09/18/png8-the-clear-winner/">SitePoint</a>):</p>
<p><img src="http://yuiblog.com/assets/png8-transparency.png" alt="PNG8 alpha transparency" /></p>
<p>For truecolor PNGs, the situation is a much less attractive compromise. All the semi transparent pixels appear grey in IE prior to version 7 (source: <a href="http://www.w3.org/Graphics/PNG/inline-alpha.html">W3C</a>).</p>
<p><img src="http://yuiblog.com/assets/png-transparency.png" alt="transparency in truecolor PNG" /></p>
<p>IE7 introduces proper native support for alpha transparency in both PNG8 and truecolor PNGs. For earlier IE versions you need to fix the truecolor PNG transparency issue using CSS and an AlphaImageLoader filter, which we&#8217;ll discuss in more details in a follow-up article. (Spoiler alert: <em>avoid AlphaImageLoader</em>.)</p>
<h3>&#8220;All we are saying is: Give PiNG a chance!&#8221;</h3>
<p>Although PNG8 should be the preferred of the PNGs, because it&#8217;s smaller in filesize and degrades well in early IEs without special CSS filters, there are still some use cases for truecolor PNGs:</p>
<ul>
<li><strong>When the 256 colors of the PNG8 are not enough, you may need a truecolor PNG.</strong> This is a case you should try to avoid. On one hand, if you have thousands and thousands of colors, this starts to look like a case where JPEG will be better suited and will give better compression. On the other hand, if the colors are around a thousand or so, you may try to convert this image to a PNG8 and see if it looks acceptable. Very often, the human eye is not sensitive enough to tell the difference between 200 and 1000 colors. That depends on the image, of course; often you can safely remove 1000 colors, but sometimes removing even 2 colors results in an unacceptable image. In any event, try your potential truecolor PNG candidate as PNG8 and as JPEG and see if you like the result in terms of quality and file size.</li>
<li><strong>When most of the image is semi-transparent.</strong> If only a small part of the image is semi-transparent, like around rounded corners, the GIF-like degradation of PNG8 is often OK. But if most of the image is translucent (think a PLAY button over a video thumbnail), you might not have a choice but to use the AlphaImageLoader hack.</li>
</ul>
<p>At the end, let&#8217;s summarize what was discussed in this article highlighting that:</p>
<ul>
<li>JPEG is the format for photos.</li>
<li>GIF is the format for animations.</li>
<li>PNG8 is the format for everything else &mdash; icons, buttons, backgrounds, graphs&#8230;you name it.</li>
</ul>
<div class="feedflare">
<a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=pE7kkgqCjZ4:enCtMsOUrmg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=pE7kkgqCjZ4:enCtMsOUrmg:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=pE7kkgqCjZ4:enCtMsOUrmg:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.yuiblog.com/~ff/yuiblog/design?a=pE7kkgqCjZ4:enCtMsOUrmg:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/yuiblog/design?i=pE7kkgqCjZ4:enCtMsOUrmg:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.yuiblog.com/blog/2008/11/04/imageopt-2/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
	</channel>
</rss>
