<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>Skull Jackpot &#187; pattern</title>
	<atom:link href="http://skulljackpot.com/tagged-as/pattern/feed/" rel="self" type="application/rss+xml" />
	<link>http://skulljackpot.com</link>
	<description>Various thoughts of minimal interest to others</description>
	<lastBuildDate>Fri, 25 Feb 2011 16:22:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Design Pattern: Alpha transparency in IE without javascript</title>
		<link>http://skulljackpot.com/2009/01/22/design-pattern-alpha-transparency-in-ie-without-javascript/</link>
		<comments>http://skulljackpot.com/2009/01/22/design-pattern-alpha-transparency-in-ie-without-javascript/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 20:34:28 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Under the hood]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[pattern]]></category>

		<guid isPermaLink="false">http://skulljackpot.com/?p=75</guid>
		<description><![CDATA[Need to support alpha transparency in IE6? Try this CSS-only fix on for size.]]></description>
			<content:encoded><![CDATA[<p><em>Originally published on the <a href="http://www.openplans.org/projects/topp-design/blog/">TOPP Design Blog</a></em></p>
<h2>­Problem Summary</h2>
<p>An element needs to support partial transparency &#8211; either an <code>img</code> tag, or an element with the <code>background-image</code> property set via CSS.
</p>
<h3>Use When</h3>
<p>The page still needs to support IE6, and has elements which should be transparent.</p>
<h3>Solution</h3>
<p>Use CSS transparency, with appropriate selectors.</p>
<h3>Example</h3>
<div><a href="http://skitch.com/dimmerswitch/byst4/ie6-alpha-transparency"><img src="http://img.skitch.com/20090109-fubpcwp1gew5bd33s5r4968qgy.preview.jpg" alt="ie6-alpha-transparency" /></a>
</div>
<div><a href="http://skitch.com/dimmerswitch/bysu8/ie6-transparency-fix"><img src="http://img.skitch.com/20090109-ffsa1349jwpy63exywbm7gxcb7.preview.jpg" alt="ie6-transparency-fix" /></a>
</div>
<h4>CSS</h4>
<pre>* html .pngfix {
zoom: 1;
behavior: expression((this.runtimeStyle.behavior="none")&amp;&amp;(this.pngSet?this.pngSet=true:(this.nodeName == "IMG" &amp;&amp; this.src.toLowerCase().indexOf('.png')&gt;-1 ? (this.runtimeStyle.backgroundImage = "none", this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "', sizingMethod='image')", this.src = "transparent.gif") : (this.origBg = this.origBg ? this.origBg : this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''), this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "', sizingMethod='" + (this.currentStyle.backgroundRepeat=='no-repeat' ? 'crop' : 'scale') +"')", this.runtimeStyle.backgroundImage = "none")),this.pngSet=true));
}</pre>
<p><strong>Note</strong>: this method is adapted from the approach documented at <a href="http://www.komodomedia.com/blog/2007/11/css-png-image-fix-for-ie/">http://www.komodomedia.com/blog/2007/11/css-png-image-fix-for-ie/</a>. It improves upon it by using <code>zoom</code> to trigger HasLayout in IE6, rather than relying on <code>position: relative</code>.</p>
<p>You can either add the &#8220;pngfix&#8221; class to all elements which need to support transparency, or add selectors in your CSS file to target your desired elements. Prefixing the selectors with <code>* html</code> ensures that only IE6 will process the rule, preventing more-capable browsers from trying to parse IE AlphaImageLoader idiosyncrasies.</p>
<h4>Limitations</h4>
<p>This approach will not support repeated background-images &#8211; Internet Explorer will stretch the background image to fit. This can still be useful if your background is a solid color and you&#8217;re just using transparency for an overlay effect. It will also still be suitable if your background-image is full-width and has no vertical variation (for example, if you&#8217;re using a background image to fake columns).</p>
<p>Due to limitations with the AlphaImageLoader functionality, this approach will not work at all for elements which need to have the background image positioned. If that&#8217;s behavior you need (and you have to support transparency for IE6), you should consider adding an extra element and positioning <em>that</em> instead.</p>
]]></content:encoded>
			<wfw:commentRss>http://skulljackpot.com/2009/01/22/design-pattern-alpha-transparency-in-ie-without-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Design Pattern: Self-clearing floats</title>
		<link>http://skulljackpot.com/2009/01/08/design-pattern-self-clearing-floats/</link>
		<comments>http://skulljackpot.com/2009/01/08/design-pattern-self-clearing-floats/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 21:12:54 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Under the hood]]></category>
		<category><![CDATA[clear]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[float]]></category>
		<category><![CDATA[pattern]]></category>

		<guid isPermaLink="false">http://skulljackpot.com/?p=71</guid>
		<description><![CDATA[An all-CSS solution for clearing floated elements without extraneous markup.]]></description>
			<content:encoded><![CDATA[<p><em>Originally published on the <a href="http://www.openplans.org/projects/topp-design/blog/">TOPP Design Blog</a></em></p>
<h2>Problem Summary</h2>
<p>An element needs to be expanded to contain all child elements, one or more of which may be floated (and thus removed from the normal document flow). ­</p>
<h3>Use When</h3>
<p>The page contains floated elements w­hich should not extend beyond their parent element.</p>
<h3>Solution</h3>
<p>Use self-clearing floats.</p>
<h3>Rationale</h3>
<p>While the &#8220;use a float to contain a float&#8221; approach will ensure that all elements are appropriately contained, it can trigger other renderbugs which this approach avoids.</p>
<h3>Example</h3>
<div> <a href="http://skitch.com/dimmerswitch/bysyi/self-clearing-floats"><img src="http://img.skitch.com/20090109-t87ic6gce86xnudhd8f97che4p.preview.jpg" alt="self-clearing-floats" /></a>
</div>
<h4>CSS</h4>
<pre>.selfclear:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}

.selfclear {
display: inline-block; /* IE 7 */
}

.selfclear {
display: block;
}

* html .selfclear {
height: 1px; /* IE &lt; 7 */
}</pre>
<p><strong>Note</strong>: this method builds upon the approach documented at <a href="http://positioniseverything.net/easyclearing.html">http://positioniseverything.net/easyclearing.html</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://skulljackpot.com/2009/01/08/design-pattern-self-clearing-floats/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.212 seconds -->

