<?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>Nick Cowie &#187; progressive enhancement</title>
	<atom:link href="http://nickcowie.com/category/progressive-enhancement/feed/" rel="self" type="application/rss+xml" />
	<link>http://nickcowie.com</link>
	<description>Web standards, accessibility  and such like with a bias toward  Government web sites</description>
	<lastBuildDate>Sun, 15 Aug 2010 10:32:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>RGBa backgrounds in IE</title>
		<link>http://nickcowie.com/2009/rgba-backgrounds-in-ie/</link>
		<comments>http://nickcowie.com/2009/rgba-backgrounds-in-ie/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 04:54:41 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[css and html]]></category>
		<category><![CDATA[progressive enhancement]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[RGBA]]></category>

		<guid isPermaLink="false">http://nickcowie.com/?p=471</guid>
		<description><![CDATA[<p>RGBa is the new black, with support in most modern Safari 3, Firefox 3 and Opera 10, you can have semi transparent elements.  Only there is no support currently in IE for RGBa.</p>
<p>However, you can easily fake it for backgrounds of block elements in IE with 
<code>filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=1, StartColorStr='#aaRRBBGG', EndColorStr='#aaRRBBGG);</code> 
The filter gradient places a alpha channel colour gradient over the background. So as long the background is transparent, the start and end colours the same and the alpha (aa) channel a value greater than 0 (fully transparent) and FF (fully opaque), you get a block element in IE with a RGBa background. You can see an  example of <a href="http://nickcowie.com/proge/rgba-ie.html">RGBa in action in IE</a> &#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>RGBa is the new black, with support in most modern Safari 3, Firefox 3 and Opera 10, you can have semi transparent elements.  Only there is no support currently in IE for RGBa.</p>
<p>However, you can easily fake it for backgrounds of block elements in IE with<br />
<code>filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=1, StartColorStr='#aaRRBBGG', EndColorStr='#aaRRBBGG);</code><br />
The filter gradient places a alpha channel colour gradient over the background. So as long the background is transparent, the start and end colours the same and the alpha (aa) channel a value greater than 0 (fully transparent) and FF (fully opaque), you get a block element in IE with a RGBa background. You can see an  example of <a href="http://nickcowie.com/proge/rgba-ie.html">RGBa in action in IE</a></p>
<p>The simplest way is including in your CSS<br />
<code>background: transparent ;<br />
background: rgba(255,0,0,0.5) ;<br />
filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=1, StartColorStr='#88ff0000', EndColorStr='#88ff0000'); </code></p>
<p>Which is clean and simple, even it does deliver you invalid CSS. There are two problems,  if a browser does not support RGBa and is not IE, (eg FF2) the block element background will be transparent. I do not think that is a major issue right now. There are a handful of browsers outside IE in use that do not support RGBa. My main concern is future proofing, the next major version of IE (the beta is due within a year) will support RGBa (as well as HTML5 and some CSS3 according to sources) and as usual will maintain backwards compatibility with earlier versions of IE. So you will get a semi transparent background colour overlaid with a semi transparent gradient.</p>
<p>The solution, is to provide a stylesheet to all browsers and an extra stylesheet to IE8 and below with <a href="http://nickcowie.com/2005/conditional-comments/">conditional comments</a>. So your CSS will have:<br />
<code>background: fallback color RGB or hex ;<br />
/* background colour for browsers that are not IE that do not understand RGBa */<br />
background: rgba(R,G,B,a) ;</code><br />
Your HTML will include (note don’t try and cut and paste from here as grab <a href="http://nickcowie.com/proge/ie8cc.txt">the text file</a> instead):<br />
<code>&lt;!--[if lt IE 8]&gt;<br />
&lt;link rel="stylesheet" type="text/css" href="/xtras/ieonly.css" media="screen" /&gt;<br />
&lt;![endif]--&gt;</code><br />
And ieonly.css file include:<br />
<code>background: transparent ;<br />
/* needed to clear the background colour */<br />
filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=1, StartColorStr='#88ff0000', EndColorStr='#88ff0000'); </code></p>
<p>If you don’t believe me and do not have IE6, here is <a href="http://nickcowie.com/proge/ie6rgba.png">the screenshot</a>. And I was not the first one to suggest this method for implementing RGBa in IE, <a href="http://www.hedgerwow.com/360/dhtml/rgba/demo.php">Hedger Wang</a> did some time ago, and even suggested using canvas to provide the transparent background to FF2. I only found his example while finalising this post.</p>
]]></content:encoded>
			<wfw:commentRss>http://nickcowie.com/2009/rgba-backgrounds-in-ie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why use CSS Zen Garden for CSS3 demo</title>
		<link>http://nickcowie.com/2009/why-use-css-zen-garden-for-css3-demo/</link>
		<comments>http://nickcowie.com/2009/why-use-css-zen-garden-for-css3-demo/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 05:18:29 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Just geek]]></category>
		<category><![CDATA[css and html]]></category>
		<category><![CDATA[presentations]]></category>
		<category><![CDATA[progressive enhancement]]></category>
		<category><![CDATA[css zen garden]]></category>
		<category><![CDATA[css3]]></category>

		<guid isPermaLink="false">http://nickcowie.com/?p=461</guid>
		<description><![CDATA[<p>For those who have not seen my Edge of the Web <a href="http://nickcowie.com/eotw/">CSS3 demonstration</a> I used the <a href="http://csszengarden.com">CSS Zen Garden</a> HTML. Why, because I wanted to use somebody else's HTML, mainly because I wanted to show it works with any HTML and that most people would be familiar with the site.</p>
<p>I will not submit it, because Dave has not accepted any new submissions almost two year, my demo is far from the visual standard of most other design and I broke one <strong>major rule</strong> the CSS does not validate.</p>]]></description>
			<content:encoded><![CDATA[<p>For those who have not seen my Edge of the Web <a href="http://nickcowie.com/eotw/">CSS3 demonstration</a> I used the <a href="http://csszengarden.com">CSS Zen Garden</a> HTML. Why, because I wanted to use somebody else’s HTML, mainly because I wanted to show it works with any HTML and that most people would be familiar with the site.</p>
<p>I will not submit it, because Dave has not accepted any new submissions almost two year, my demo is far from the visual standard of most other design and I broke one <strong>major rule</strong> the CSS does not validate.</p>
<p>There are no hacks in the CSS just lots of browsers specific declarations like:</p>
<p><code>-moz-box-shadow: 5px 5px 7px rgba(0,0,0,0.66);</code></p>
<p>And even worse Microsoft specific declarations, which break the W3C rules for CSS</p>
<p><code>filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=5, OffY=5, Color='#AA666666', Positive='true');</code></p>
<p>As I said in my presentation, the important thing to know about validation, is why your code does not validate, if you know that, then validation is irrelevant.</p>
]]></content:encoded>
			<wfw:commentRss>http://nickcowie.com/2009/why-use-css-zen-garden-for-css3-demo/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>CSS3 presentations at EOTW09 and WebJam11</title>
		<link>http://nickcowie.com/2009/css3-presentations-at-eotw09-and-webjam11/</link>
		<comments>http://nickcowie.com/2009/css3-presentations-at-eotw09-and-webjam11/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 14:57:44 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[conferences]]></category>
		<category><![CDATA[css and html]]></category>
		<category><![CDATA[presentations]]></category>
		<category><![CDATA[progressive enhancement]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[eotw09]]></category>
		<category><![CDATA[webjam11]]></category>

		<guid isPermaLink="false">http://nickcowie.com/?p=454</guid>
		<description><![CDATA[<p>I really enjoyed developing my presentation for Edge of the Web. The research and experimentation was a lot of fun.  Explore the <a href="http://nickcowie.com/eotw">demo using CSS Zen Garden HTML</a>  and seriously try it in IE6, the<a href="http://nickcowie.com/webjam11"> WebJam presentation</a> with some even more outrageous transitions needs Safari4 <del>or FF3.7</del> and a little  exploring with a mouse.</p>
<div style="width:425px;text-align:left" id="__ss_2408884"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/nickobec/progressive-enhancement-with-css3" title="Progressive enhancement with CSS3">Progressive enhancement with CSS3</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=css3-091103025215-phpapp01&#038;stripped_title=progressive-enhancement-with-css3" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=css3-091103025215-phpapp01&#038;stripped_title=progressive-enhancement-with-css3" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object><div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">documents</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/nickobec">Nick Cowie</a>.</div></div>
<p>What I learnt is enough from probably a dozen blog posts, so hopefully I will be writing  lot in the next few weeks.</p>]]></description>
			<content:encoded><![CDATA[<p>I really enjoyed developing my presentation for Edge of the Web. The research and experimentation was a lot of fun.  Explore the <a href="http://nickcowie.com/eotw">demo using CSS Zen Garden HTML</a>  and seriously try it in IE6, the<a href="http://nickcowie.com/webjam11"> WebJam presentation</a> with some even more outrageous transitions needs Safari4 <del>or FF3.7</del> and a little  exploring with a mouse.</p>
<div style="width:425px;text-align:left" id="__ss_2408884"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/nickobec/progressive-enhancement-with-css3" title="Progressive enhancement with CSS3">Progressive enhancement with CSS3</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=css3-091103025215-phpapp01&#038;stripped_title=progressive-enhancement-with-css3" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=css3-091103025215-phpapp01&#038;stripped_title=progressive-enhancement-with-css3" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">documents</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/nickobec">Nick Cowie</a>.</div>
</div>
<p>What I learnt is enough from probably a dozen blog posts, so hopefully I will be writing  lot in the next few weeks.</p>
]]></content:encoded>
			<wfw:commentRss>http://nickcowie.com/2009/css3-presentations-at-eotw09-and-webjam11/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The League of Moveable Type</title>
		<link>http://nickcowie.com/2009/the-league-of-moveable-type/</link>
		<comments>http://nickcowie.com/2009/the-league-of-moveable-type/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 01:04:55 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[css and html]]></category>
		<category><![CDATA[progressive enhancement]]></category>
		<category><![CDATA[@font-fact]]></category>
		<category><![CDATA[fonts]]></category>

		<guid isPermaLink="false">http://nickcowie.com/?p=447</guid>
		<description><![CDATA[<p>For those who have not seen my Edge of the Web <a href="http://nickcowie.com/eotw/">CSS3 demonstration</a> I used the <a href="http://csszengarden.com">CSS Zen Garden</a> HTML. Why, because I wanted to use somebody else's HTML, mainly because I wanted to show it works with any HTML and that most people would be familiar with the site.</p>
<p>I will not submit it, because Dave has not accepted any new submissions almost two year, my demo is far from the visual standard of most other design and I broke one <strong>major rule</strong> the CSS does not validate.</p>]]></description>
			<content:encoded><![CDATA[<p>I just admire <a href='http://www.theleagueofmoveabletype.com/'>The League of Moveable Type</a>. While a lot of font foundries are still working on licensing issues with embedding fonts in PDFs. here a couple of font designers discovered <a href="http://nickcowie.com/2008/font-face/">@font-face</a> and went lets make the world a better place. By creating <a href='http://www.theleagueofmoveabletype.com/'>The League of Moveable Type</a>, convincing a few fellow font designers to join them in releasing fonts with an open source licence suitable for embedding with @font-face.</p>
]]></content:encoded>
			<wfw:commentRss>http://nickcowie.com/2009/the-league-of-moveable-type/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I am on the Edge of the Web</title>
		<link>http://nickcowie.com/2009/i-am-on-the-edge-of-the-web/</link>
		<comments>http://nickcowie.com/2009/i-am-on-the-edge-of-the-web/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 00:58:07 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Just geek]]></category>
		<category><![CDATA[conferences]]></category>
		<category><![CDATA[css and html]]></category>
		<category><![CDATA[progressive enhancement]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[edge of the web]]></category>
		<category><![CDATA[eotw]]></category>
		<category><![CDATA[web conference]]></category>

		<guid isPermaLink="false">http://nickcowie.com/?p=444</guid>
		<description><![CDATA[<p>Well I am speaking at the Edge of the Web Conference in Perth in November. The title Progressive Enhancement with CSS: Or how I stopped worrying about IE6 and starting loving CSS3.</p>
<p>The aim is to show how you can use CSS2 and CSS3 to improve the experience of visitors using modern browsers, while not blocking access to those people still using older browsers like IE6 &#8230;</p> ]]></description>
			<content:encoded><![CDATA[<p>Well I am speaking at the Edge of the Web Conference in Perth in November. The title Progressive Enhancement with CSS: Or how I stopped worrying about IE6 and starting loving CSS3.</p>
<p>The aim is to show how you can use CSS2 and CSS3 to improve the experience of visitors using modern browsers, while not blocking access to those people still using older browsers like IE6.  I want to convince the audience, that you can build sites that do not have to look the same in all browsers.</p>
<p>I will be looking at what CSS2 and CSS3 you can safely implement now. The main provision it must not break IE6. It does not have to work in IE6, just have a safe fallback position.</p>
<p>The presentation is not aimed at people who read Surfin Safari, CSS3.info or similar sites and then go off an experiment with what they have been shown. That is what I do</p>
<p>I know I will be covering those I covered indepth before like <a href="http://mixedgrill.webindustry.asn.au/2008/opacity-vs-rgba-transparency-with-css">opacity/transparency</a> and &lt;a href=http://nickcowie.com/2008/font-face/”&gt;@font-face</a>. Are there any other CSS2 or CSS3 properties you would like to see me cover? Otherwise I might go all shock and awe with transitions ;-)</p>
]]></content:encoded>
			<wfw:commentRss>http://nickcowie.com/2009/i-am-on-the-edge-of-the-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I am not the only one playing with CSS3</title>
		<link>http://nickcowie.com/2009/i-am-not-the-only-one-playing-with-css3/</link>
		<comments>http://nickcowie.com/2009/i-am-not-the-only-one-playing-with-css3/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 12:01:13 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[css and html]]></category>
		<category><![CDATA[progressive enhancement]]></category>

		<guid isPermaLink="false">http://nickcowie.com/?p=399</guid>
		<description><![CDATA[<p>There are a number of people demonstrating what is possible is possible with CSS3, here are a few of the better ones I have found.</p>]]></description>
			<content:encoded><![CDATA[<p>Andy Clarke got me interested in what you could do with CSS3 with <a href="http://forabeautifulweb.com/blog/about/five_css_design_browser_differences_i_can_live_with/">Five CSS design browser differences I can live with</a> over at <a href="http://forabeautifulweb.com/blog/">For A Beautiful Web blog</a>.  I realised what I was missing and start looking at what CSS3 properties that could be applied now,  <a href="http://www.css3.info/">css3.info</a> was an invaluable resource.</p>
<p>Then on December 1 <a href="http://24ways.org/">24 Ways</a> showed what could be done and <a href="http://nickcowie.com/2008/24ways-not-to-impress-people/">how not to do it with regards to graceful degradation</a>. After problems with the initial design, there was a couple of great articles on using CSS3 for progressive enhancement by <a href="http://24ways.org/2008/shiny-happy-buttons">John Allsopp</a> and <a href="http://24ways.org/2008/a-christmas-hcard-from-me-to-you">Elliot Jay Stocks</a>.</p>
<p>A few days ago, Smashing Magazine published <a href="http://www.smashingmagazine.com/2009/01/08/push-your-web-design-into-the-future-with-css3/">Push Your Web Design Into The Future With CSS3</a>, which is a general introduction to CSS3. It also lead me to the <a href="http://www.zenelements.co.uk/blog/">Zen Elements blog</a> of Alex Mitchell, which like me is experimenting with CSS3 properties and putting it on display for everyone to learn from.</p>
<p>I have not forgotten my demonstration of @font-face, first-letter and adjacent selectors. I am having issues with vertical alignment cross browsers. You will see that demonstration is the near future.</p>
]]></content:encoded>
			<wfw:commentRss>http://nickcowie.com/2009/i-am-not-the-only-one-playing-with-css3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>first-letter pseudo element</title>
		<link>http://nickcowie.com/2008/first-letter-pseudo-element/</link>
		<comments>http://nickcowie.com/2008/first-letter-pseudo-element/#comments</comments>
		<pubDate>Sun, 28 Dec 2008 09:09:51 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[css and html]]></category>
		<category><![CDATA[progressive enhancement]]></category>
		<category><![CDATA[css2]]></category>
		<category><![CDATA[first-letter]]></category>
		<category><![CDATA[initial caps]]></category>
		<category><![CDATA[pseudo element]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[typography]]></category>

		<guid isPermaLink="false">http://nickcowie.com/?p=379</guid>
		<description><![CDATA[I adore the printed page and those little refinements such as Initial Caps, that use to only be possible in print.  Here is an explanation of the  first-letter pseudo element which allows you to replicate that using HTML and CSS. ]]></description>
			<content:encoded><![CDATA[<h2>What it does:</h2>
<p>Lets you style the first letter of any element.</p>
<h2>Supported by:</h2>
<p>Firefox, Safari, Chrome, Opera, IE5.5+</p>
<h3>Known bugs</h3>
<p>They are detailed at <a href="http://www.satzansatz.de/cssd/pseudocss.html#first-letter">pseudo-class, pseudo-element, pseudo-CSS</a>. IE6 &amp; 7 has more than a few, negative margins and vertical-align separating from the <em>box</em> are the most frustrating for me.  As well as Safari and Firefox handling the text-indent property differently (sorry but I can not get my head around the specs today).</p>
<h2>Not support by:</h2>
<p>Old browsers and some mobile browsers.</p>
<h3>What happens when first-letter is not supported:</h3>
<p>The first letter is not individually styled, instead it has the same styling as the rest of the element.</p>
<h2>Properties</h2>
<p>Only a limited number of properties can be applied to first-letter: </p>
<ul>
<li>color properties</li>
<li>border properties</li>
<li>font properties</li>
<li>text-transform</li>
<li>line-height</li>
<li>background properties</li>
<li>margin properties, though it appears only margin-top and margin-bottom works when combined with float.</li>
<li>padding properties, note padding-bottom does not affect the size or text flow of the holding container unless combined with float. </li>
<li>text-decoration</li>
<li>letter-spacing, only when floated</li>
<li>clear, only when floated</li>
<li>vertical-align, only when not floated</li>
<li>float</li>
<li>clear</li>
</ul>
<p>If you want to see the properties in action here is an <a href="http://nickcowie.com/proge/firstletter_example.html">example</a>.</p>
<p>Screenshots from <a href="http://nickcowie.com/proge/ie7-fl.png">IE7</a>, <a href="http://nickcowie.com/proge/firefox-fl.png">Firefox 3.1b</a> and <a href="http://nickcowie.com/proge/safari-fl.png">Safari 3</a> (note the differences in the last second and third last items in Firefox and Safari, otherwise it is the usual IE vs everybody else.) </p>
<h2>Issues</h2>
<p>If you look at the examples, you will see two choices. After working out what properties you can use with IE, you will either spend a time tweaking margin-top and padding-top when combined with float or learning the difference between vertical alignment: baseline, centerline, mathline and topline (another experiment for me) and adjusting line-height, depending on your desired results. </p>
<h2>Example</h2>
<p>Not yet, I will combine it adjacent selectors for an example shortly. </p>
<h2>Will I use it now?</h2>
<p>I will definitely look at combining first-letter, adjacent selectors and @font-face when I redesign this blog and for any other project. </p>
]]></content:encoded>
			<wfw:commentRss>http://nickcowie.com/2008/first-letter-pseudo-element/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>@font-face</title>
		<link>http://nickcowie.com/2008/font-face/</link>
		<comments>http://nickcowie.com/2008/font-face/#comments</comments>
		<pubDate>Thu, 25 Dec 2008 14:33:54 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[css and html]]></category>
		<category><![CDATA[progressive enhancement]]></category>
		<category><![CDATA[@font-face]]></category>
		<category><![CDATA[css2]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[typography]]></category>

		<guid isPermaLink="false">http://nickcowie.com/?p=370</guid>
		<description><![CDATA[<p>My first experiment /  tutorial in the progressive enhancement series is with the @font-face property, so enjoy and please do not litter the web with ugly sites that over use fancy type, moderation please.</p>]]></description>
			<content:encoded><![CDATA[<h2>What it does:</h2>
<p>Allows you to use fonts other than those installed on your user’s computer on your web pages.</p>
<h2>Supported by:</h2>
<p>Firefox 3.1, Safari 3, Opera 10, IE4+ (for Windows, note IE uses different format for fonts)</p>
<h2>Not support by:</h2>
<p>Chrome, Firefox 3, Safari 2, Opera 9</p>
<h3>What happens when @font-face is not supported:</h3>
<p>The next font-family in the list is used, so you need to ensure a suitable second choice font that is likely to be installed on your visitors computer is next in the list of fonts.</p>
<h2>History:</h2>
<p>Back in middle of the browser wars in 1997, MS introduced the then proposed CSS2 property @font-face with IE4. Like the button element which first became available with IE4, @font-face never can into popular use. Why?</p>
<ul>
<li>  Netscape choose to support the alternative <a href="http://en.wikipedia.org/wiki/TrueDoc">TruDoc</a> format instead    </li>
<li><a href="http://en.wikipedia.org/wiki/Embedded_OpenType">.eot</a> files are a non-standard format, (though in 2008 <a href="http://www.w3.org/Submission/2008/01/">Microsoft made a submission to the W3C</a> to adopt .eot)    </li>
<li>.eot files can be difficult to create (more on this later)    </li>
<li>users will have download the font file and in 1997 with almost everyone on dialup this added considerable weight to the page.</li>
</ul>
<p>Well in 2007, <a href="http://webkit.org/blog/124/downloadable-fonts/">Webkit announced support</a> for @font-face, which was included in CSS2 recommendations in 1998.  This time the open source philosophy reigned and they choose to support the standard TTF and OTF formats. Safari, Firefox and Opera all followed within 12 months.</p>
<h2>Issues</h2>
<p>You need to deliver two different font formats to two different browsers, though that as not difficult as it seems. </p>
<p>Some font files and particularly TTF files can be large, with some exceeding 1Mb. </p>
<p>Not all fonts work with all browsers, while experimenting I found a number of fonts both TTF and OTF that Opera 10 alpha on OS X refused to load and a few of those did not load in Opera 10 alpha on XP. </p>
<p>Creating .eot is a interesting challenge. I wasted a few hours with <a href="http://www.microsoft.com/typography/web/embedding/weft3/">WEFT tool</a> on Vista repeatedly crashing, I finally created a number of invalid .eot files. So I ended up using the WEFT tool with XP to successfully create .eot files and it only crashed once. Please don’t ask me for help with WEFT, it was just a trial and lots of errors experience and I do not have easy access to XP. </p>
<p>The WEFT tool only works with TTF  files.  So unless you can convert OTF files to TTF, you can not use OTF files with IE.</p>
<p>Font licensing  is a complex issue,  I would suggest reading <a href="http://www.w3.org/Fonts/Misc/eot-report-2008">for and against standardizing font embedding </a> by Bert Bos as a starting point. Personally I am taking a long hard look at the licence when I download a <em>free</em> font from the web to use. If the licence is unsuitable I do not install the font. I am currently going back through my font library and hunting down the licences for each font and reading them carefully before deciding to keep the font. </p>
<h2>Writing the code </h2>
<p>There are a few of issues here, </p>
<p>IE will download all EOT, TTF and OTF fonts declared with @font-face even though it can only use EOT fonts.</p>
<p>Webkit, Firefox, Safari and Opera  will download all EOT, TTF and OTF fonts declared with @font-face even though it can not use EOT fonts.</p>
<p>If you declare an EOT font for a font-family already declared with a TTF or OTF file, that font-family is no longer usable in Firefox. However the reverse does not appear to be true for IE.</p>
<p>If you use a font-family name and that is the name of font already installed on a visitor’s computer, the computer will used the installed font instead of downloading.</p>
<p>So after after some thought and a little experimentation, this is how I will be using @font-face:</p>
<p><code></p>
<pre>&lt;!--[if IE]&gt;
&lt;style type=&quot;text/css&quot; media=&quot;all&quot;&gt;
@font-face {
	font-family: Bleeding Cowboys;
    font-style:  normal;
    font-weight: normal;
	src: url('BLEEDIN0.eot') !important;
}
&lt;/style&gt;
&lt;![endif]--&gt;
&lt;style type=&quot;text/css&quot; media=&quot;all&quot;&gt;
@font-face {
	font-family: Bleeding Cowboys;
	font-style:  normal;
    font-weight: normal;
	src: url('Bleeding_Cowboys.ttf');
}
h1 {
	font-family: Bleeding Cowboys, 'Bleeding Cowboys', 2nd choice, serif;
}
&lt;/style&gt;
</pre>
<p></code></p>
<p>The logic is:</p>
<ol>
<li>Use conditional comments to feed the EOT font to IE only.</li>
<li>Use !important so IE will ignore any future declarations of src for that font-family. </li>
<li>Provide the TTF file for other browsers to use.   </li>
<li>Use the normal name for the font, so people who already have that font will not have to download it a second time. </li>
<li>Provide a suitable alternative for browsers that do not support @font-family </li>
</ol>
<h2>Example</h2>
<p><a href="http://nickcowie.com/proge/fontface.html">A typographers worst nightmare</a> Using  <a href="http://lastsoundtrack.fontspace.com/inked.html">InkedGod</a> for headings, <a href="http://www.dafont.com/bleeding-cowboys.font">Bleeding Cowboys</a> for body text, both faces I adore in the right place. Note neither font  works with Opera 10 alpha  <ins>on a Mac</ins>(you get your default fonts) and Impact for browsers that do not support it. Screenshots <a href="http://nickcowie.com/proge/fontfacesaf30.png">Safari 3</a>, <a href="http://nickcowie.com/proge/fontfaceff31.png">Firefox 3.1beta</a>, <a href="http://nickcowie.com/proge/fontfaceie7.png">IE7</a> which support @font-face,  <a href="http://nickcowie.com/proge/fontfaceopera10.png">Opera 10 alpha <ins>on a Mac</ins></a> with default fonts, <a href="http://nickcowie.com/proge/fontfaceff30.png">Firefox 3</a> and <a href="http://nickcowie.com/proge/fontfacechrome.png">Chrome</a> which do not support @font-face and display impact. </p>
<h2>Will I use it now?</h2>
<p>I will definitely use @font-face when I redesign this blog and for any suitable projects before then, if I can get access to the WEFT tool on XP. At the moment, depending on the site between 50% and 90% of visitor’s browsers support @font-face. Once Firefox3.1 in released that will rise to around 90% to 95% within a couple of months.</p>
<h3>There are a couple of exceptions :</h3>
<p>I will not use it just for a logo, if image replacement or flash provide a light weight alternative</p>
<p>I will be extremely cautious about using  @font-face for large amounts of body text. While there is a large number of suitable fonts for display (heading) text available with the right licence to use with @font-face. For long sections of text, I will stick to the best type for that job of reading online and that is usually already  installed on most people’s computers. </p>
<p></body><br />
</html></p>
]]></content:encoded>
			<wfw:commentRss>http://nickcowie.com/2008/font-face/feed/</wfw:commentRss>
		<slash:comments>45</slash:comments>
		</item>
		<item>
		<title>Lessons in Progressive Enhancement with CSS2 and CSS3</title>
		<link>http://nickcowie.com/2008/lessons-in-progressive-enhancement-with-css2-and-css3/</link>
		<comments>http://nickcowie.com/2008/lessons-in-progressive-enhancement-with-css2-and-css3/#comments</comments>
		<pubDate>Thu, 25 Dec 2008 14:33:25 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[css and html]]></category>
		<category><![CDATA[progressive enhancement]]></category>
		<category><![CDATA[css2]]></category>
		<category><![CDATA[css3]]></category>

		<guid isPermaLink="false">http://nickcowie.com/?p=369</guid>
		<description><![CDATA[<p>I have start experimenting with CSS2 and CSS3 properties to see what I can use now for <em>progressive enhancement</em>. And by progressive enhancement I do not mean <em>Hey we are so f&#8230ing cool and if you are not cool enough to use the latest bleeding edge browser you can go and read our RSS feed</em>. It is more great your are using a good browser, lets make your experience better by providing a design closer to what I would of liked to use if it was not for the limitations of other browsers.</p>]]></description>
			<content:encoded><![CDATA[<p>I have start experimenting with CSS2 and CSS3 properties to see what I can use now for <em>progressive enhancement</em>. And by progressive enhancement I do not mean <em>Hey we are so f&amp;#8230ing cool and if you are not cool enough to use the latest bleeding edge browser you can go and read our RSS feed</em>. It is more great your are using a good browser, lets make your experience better by providing a design closer to what I would of liked to use if it was not for the limitations of other browsers.</p>
<p>As I have said <a href="http://nickcowie.com/2008/start-learning-about-css-21-and-css3-now">before</a>, I have not changed how I code HTML and CSS for more than five years. I have made minor refinements to my methods, but I have not changed my techniques or used any new CSS properties in that time.</p>
<p>I will be sharing what I learn, because I know a lot of people are in a similar position to me. So sit back and enjoy the ride and I hope you can learn something you can put to use.</p>
<p>You will notice that I make use of the <a href="http://www.csszengarden.com/">CSS Zen Garden</a> HTML in my examples. That is a conscious decision, even though the code has far more hooks than I need.  CSS Zen Garden was great in 2003 when I was still learning CSS1, you could stick your head under the hood and see the techniques used by others. Unfortunately over the past few years, updates have be infrequent and concentrating on beautiful design with nothing in the CSS has been new or interesting to me.  I now want something similar for CSS2/3, to showcase what is possible now with current browser technology.</p>
<p>My first experiment /  tutorial is with the <a href="http://nickcowie.com/2008/font-face/">@font-face property</a>, so enjoy and please do not litter the web with ugly sites that over use fancy type, moderation please.</p>
]]></content:encoded>
			<wfw:commentRss>http://nickcowie.com/2008/lessons-in-progressive-enhancement-with-css2-and-css3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
