<?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>Beyond the Misty Mountains &#187; general</title>
	<atom:link href="http://dexterthedragon.com/category/general/feed/" rel="self" type="application/rss+xml" />
	<link>http://dexterthedragon.com</link>
	<description></description>
	<lastBuildDate>Fri, 21 May 2010 17:10:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Stepping into the future</title>
		<link>http://dexterthedragon.com/2010/05/stepping-into-the-future/</link>
		<comments>http://dexterthedragon.com/2010/05/stepping-into-the-future/#comments</comments>
		<pubDate>Fri, 21 May 2010 17:10:02 +0000</pubDate>
		<dc:creator>Dexter</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[UTOSP]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://dexterthedragon.com/?p=170</guid>
		<description><![CDATA[A little while back a friend of mine was telling me about a project he was working on. One of the things he mentioned was how he was using some of the new styles CSS3 offers. Around the same time I discovered a script that would enable some of those CSS3 feature in Internet Explorer. [...]]]></description>
			<content:encoded><![CDATA[<p>A little while back a <a href="http://brokenresolve.com" target="_blank">friend</a> of mine was telling me about a <a href="http://www.brokenresolve.com/2010/05/slither-game/" target="_blank">project</a> he was working on. One of the things he mentioned was how he was using some of the new styles CSS3 offers. Around the same time I discovered a script that would enable some of those CSS3 feature in Internet Explorer. That got me thinking about things and one day I was looking at this site and decided to overhaul things.</p>
<p>Initially my plan was to to replace the complex use of images to do the rounded corners and drop shadow effects. But once I got going I ended up changing large chunks of the CSS, converting to HTML5, and radically altering IE support.</p>
<h3>CSS3</h3>
<p>I started out only intending to use the CSS3 styles border-radius and box-shadow to replace the way it was currently done. Previously in order to achieve the rounded corner effects, it required the use of some complex html, several images, and a large chunk of CSS. I decided with all current browsers but IE supporting border-radius (either border-radius directly or by extensions like -webkit-border-radius and -moz-border-radius) that I would use that. So I set out and deleted the complex html and replaced large amounts of CSS with just a handful of new properties. The results were great. Side by side the old way and new one looked identical. I then did the same thing using the box-shadow property. Doing this removed about 900 lines of CSS, 100k worth of images, and reduced the page size about 10k.</p>
<div id="attachment_224" class="wp-caption alignleft" style="width: 160px"><a href="http://dexterthedragon.com/wp-content/uploads/2010/05/old_look.png"><img class="size-thumbnail wp-image-224" title="old_look" src="http://dexterthedragon.com/wp-content/uploads/2010/05/old_look-150x130.png" alt="" width="150" height="130" /></a><p class="wp-caption-text">The old way</p></div>
<div id="attachment_223" class="wp-caption alignleft" style="width: 160px"><a href="http://dexterthedragon.com/wp-content/uploads/2010/05/new_look.png"><img class="size-thumbnail wp-image-223" title="new_look" src="http://dexterthedragon.com/wp-content/uploads/2010/05/new_look-150x126.png" alt="" width="150" height="126" /></a><p class="wp-caption-text">The new way</p></div>
<p style="clear: both;">Now this had the site looking the same in all browsers but IE. The solution for this is a <a href="http://www.fetchak.com/ie-css3/" target="_blank">behavior file</a> for IE that adds support for border-radius and box-shadow. After a short time fighting to get it to work I figured it out and had the site looking the same in IE&#8230;. Well mostly. The behavior file only supports border-radius so all 4 corners are rounded. The boxes in the right side bar only have the top corners rounded and the script didn&#8217;t work for those. After exploring possibly using something like <a href="http://www.dillerdesign.com/experiment/DD_roundies/" target="_blank">DD_roundies</a> to support this I decided that I was ok with that little bit of the site looking square in IE.</p>
<h3>HTML5</h3>
<p>After that I started wondering about other new browser technologies out there. With HTML5 being the main one. I started testing out the water by replacing the doctype with &lt;!DOCTYPE html&gt;. Ah simplicity. Then I reduced the html tag to &lt;html lang=&#8221;en-US&#8221;&gt;. Liking it so far. But there&#8217;s a lot more to HTML5 than just shortening a few tags.</p>
<p>One of the more notable changes is new input types. Types like email, url address, search, date, color picker. Now being a blog the only input box on my site is a search box to search the archives. So I changed it to be type=&#8217;search&#8217;. Now what does this do? In most browsers, nothing. It just acts like a plain old text input. But in Safari and Chrome when you enter something into the box a little x appears on the right that you can click to clear the box. I know right, it&#8217;s awesome. Another new input feature of HTML5 is the placeholer attribute. This attribute allows you to define text that will show up in the input when no text has been entered. So in browsers that support it (currently just Safari and Chrome) you&#8217;ll see &#8216;Search Archives&#8217; show up as place holder text in the search box.</p>
<p>HTML5 comes with a new set of <a href="http://diveintohtml5.org/semantics.html#new-elements" target="_blank">semantic tags</a>. Those tags are: &lt;section&gt;, &lt;nav&gt;, &lt;article&gt;, &lt;aside&gt;, &lt;hgroup&gt;, &lt;header&gt;, &lt;footer&gt;, &lt;time&gt;, &lt;mark&gt;. Now when I first saw those tags I think I reacted like everyone else did. &#8220;Well those are stupid. Why not just use div&#8217;s.&#8221; But then I got to thinking about it and what HTML is really for. HTML is the Hyper Text Markup Language. It&#8217;s meant to mark up text on the web in some meaningful way. We&#8217;ve just been using div&#8217;s cause we needed a way to style things. So then it made sense to use specific tags to markup the different bits of content.</p>
<p>As a result I&#8217;ve taken to using the header, footer, nav, article, aside, and time tags in their respective places. Now this brings up the question of how browsers handle these unknown tags. It comes down to 2 issues, how are unknown tags styled and how are they placed in the DOM tree in relation to the other tags. Most browsers just don&#8217;t style unknown elemets but allow you to with CSS. Also most browsers place the nodes in the DOM tree how they are defined. The exception here is IE. It doesn&#8217;t allow styling of unknown elements and it places them as empty nodes in the DOM tree, thereby breaking the structure. There&#8217;s a fix for this though. By using JavaScript to create dummy elements, IE will then recognize them and do the expected thing. So we add basically the following code.</p>
<pre class="brush: jscript;">
&lt;!--[if lt IE 9]&gt;
&lt;script&gt;
  var e = (&quot;abbr,article,aside,audio,canvas,datalist,details,&quot; +
    &quot;figure,footer,header,hgroup,mark,menu,meter,nav,output,&quot; +
    &quot;progress,section,time,video&quot;).split(',');
  for (var i = 0; i &lt; e.length; i++) {
    document.createElement(e[i]);
  }
&lt;/script&gt;
&lt;![endif]--&gt;
</pre>
<p>This code creates all the new HTML5 elements in IE so that they will work. I am using the <a href="http://code.google.com/p/html5shiv/" target="_blank">html5shiv script</a> to do this. Another thing to add is this bit of CSS that will give these new elements a sensible default.</p>
<pre class="brush: css;">
header, footer, article, section, hgroup, nav, figure {
    display:block;
}
</pre>
<p>With all that in place we can use the new HTML5 tags like we want.</p>
<p>The final stop on the HTML5 tour is video. I&#8217;m not really a fan of Flash and have never really gotten it to work for playing videos on the site. So I was excited about having the browser be able to handle the video. I decided that I wanted to make use of the <a href="http://camendesign.com/code/video_for_everybody" target="_blank">Video 4 Everyone</a> code that would make it so HTML5 video would work using H.264 or Theora depending on the browser, but also drop down to using a Flash player if HTML5 video wasn&#8217;t supported.</p>
<p>I searched for a WordPress plugin that would do this and found a couple, but upon trying them out found that they had problems and just didn&#8217;t quite do what I wanted. One of them had a feature that allowed you to upload any video and it would convert it to the H.264 and Theora versions for you. This was something that I thought was nice so I started with that as a base and started writing my own plugin to handle HTML5 video. Pretty quickly I started running into hurdles.</p>
<p>Time for a side rant. Currently the HTML5 spec doesn&#8217;t define what codecs are to be used for video. As a result it&#8217;s currently split between the proprietary H.264 codec and the open source Theora codec. Whatever I thought because I can provide support for both with ffmpeg encoding to both formats and the broswer can use the one it supports. Problem came when I tried to do this and found out my ubuntu server doesn&#8217;t support encoding to H.264 due to its licensing restrictions. From a technical standpoint I like the H.264 codec and the results it gives, but the patents and legalities that surround it are very scary. End rant.</p>
<p>So side stepping the encoding problem and converting to H.264 on a different machine and uploading it later, I got my plugin functional. Now all current and future videos on the site use HTML5 video and dropdown to Flash if that&#8217;s not supported. I hope to clean up the plugin code and add a couple features so that I can release it sometime soon.</p>
<h3>Internet Explorer Support</h3>
<p>Previously I maintained IE6 support using a separate IE6 only CSS file. This stylesheet file was 679 lines long of tweaks for just IE6. After having changed so much HTML and CSS and seeing how poorly IE6 supported a lot of it, I decided it was time to end support of that browser. I&#8217;m <a href="http://arstechnica.com/microsoft/news/2010/02/youtube-to-kill-ie6-support-on-march-13.ars" target="_blank">not</a> <a href="http://37signals.blogs.com/products/2008/07/basecamp-phasin.html" target="_blank">alone</a> <a href="http://www.guardian.co.uk/technology/blog/2010/feb/01/google-docs-dropping-ie6-support" target="_blank">on</a> <a href="http://37signals.com/svn/posts/1072-apples-mobileme-drops-support-for-ie-6" target="_blank">this</a>. I searched around a bit and found a script I liked that would alert an IE6 user that their browser is old and unsupported. One of the requirements I had for this script was that even though it alerted them that the browser was old and unsupported, it would still allow them to use the site if they chose even though the experience was going to be a little ugly and maybe even a little broken. The <a href="http://code.google.com/p/sevenup/" target="_blank">sevenup script</a> did just that.</p>
<div id="attachment_222" class="wp-caption alignnone" style="width: 160px"><a href="http://dexterthedragon.com/wp-content/uploads/2010/05/ie6.png"><img class="size-thumbnail wp-image-222" title="ie6" src="http://dexterthedragon.com/wp-content/uploads/2010/05/ie6-150x133.png" alt="" width="150" height="133" /></a><p class="wp-caption-text">Upgrade IE6</p></div>
<p>Wanting people to still be able to use the site in IE6 if they chose to meant I still needed a small amount of fixes to make it bearable. I added in the <a href="http://www.dillerdesign.com/experiment/DD_belatedPNG/" target="_blank">DD_BelatedPNG</a> script to add in transperancy support for images in IE6. I replaced the IE6 stylesheet with just a handful of rules so things don&#8217;t look too terrible. All in all I hope anybody using IE6 would upgrade but if they choose not to at least it&#8217;s mostly usable for them.</p>
<p>As far as support in IE 7 and 8 goes, using the scripts mentioned above for HTML5 and CSS3 support they pretty much look the same as other browsers. There&#8217;s a few styles that don&#8217;t look as I intend, but I&#8217;m ok with the look deteriorating slightly in a browser with lackluster support.</p>
<h3>Simplifying WordPress</h3>
<p>After having changed all this HTML and CSS I began wondering if I could simplify the code used as part of my WordPress theme. Previously in order to add the complex HTML for the rounded corners into things like comments and the sidebar widgets required some equally complex and hacky code around the WordPress functions. I began removing this code and found that for the most part I could go back to using the default HTML produced by the WordPress functions and style them to look the same using just CSS. In the end I&#8217;ve ended up removing 168 lines of php code, and 100KB of images.</p>
<p>In the end I had a lot of fun with the changes I did to the site. Hopefully things like better video support get me posting more often. I have a few plans for things in the future. Stay tuned.</p>
<p>-Dexter-</p>
]]></content:encoded>
			<wfw:commentRss>http://dexterthedragon.com/2010/05/stepping-into-the-future/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Design</title>
		<link>http://dexterthedragon.com/2009/07/new-design/</link>
		<comments>http://dexterthedragon.com/2009/07/new-design/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 02:01:23 +0000</pubDate>
		<dc:creator>Dexter</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[UTOSP]]></category>

		<guid isPermaLink="false">http://dexterthedragon.com/?p=72</guid>
		<description><![CDATA[So I&#8217;ve been working on this for about a month and finally decided I needed to get it up now or I was never going to. So after a few days of fighting with the method I was using to install WordPress and a couple plugins, here it is. This is my second design of [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve been working on this for about a month and finally decided I needed to get it up now or I was never going to. So after a few days of fighting with the method I was using to install WordPress and a couple plugins, here it is. This is my second design of the site. It incorporates things from my first design, mainly the colors, but unlike that first version, this one isn&#8217;t ugly. At least I don&#8217;t think so, I&#8217;m really liking this design.</p>
<p>I have a lot of plans for things I want to add to the site and I&#8217;ll be working on that in the near future. I also hope that now that I have a design I like that I&#8217;ll be more inclined to use it. I already have a couple of new posts in mind so keep on the lookout for that.</p>
<p>Let me know what you think of the new look in the comments.</p>
<p>-Dexter-</p>
]]></content:encoded>
			<wfw:commentRss>http://dexterthedragon.com/2009/07/new-design/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Welcome</title>
		<link>http://dexterthedragon.com/2008/06/welcome/</link>
		<comments>http://dexterthedragon.com/2008/06/welcome/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 23:07:16 +0000</pubDate>
		<dc:creator>Dexter</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://dexterthedragon.com/2008/06/18/welcome/</guid>
		<description><![CDATA[Welcome to my blog, Beyond the Misty Mountains.
This website will be primarily my blog. A place where I can talk about programming and Linux and other technology based topics. And also the occasional rant about other things. The website will also eventually hold projects I&#8217;m working on and projects I&#8217;ve done in the past and [...]]]></description>
			<content:encoded><![CDATA[<p>Welcome to my blog, Beyond the Misty Mountains.</p>
<p>This website will be primarily my blog. A place where I can talk about programming and Linux and other technology based topics. And also the occasional rant about other things. The website will also eventually hold projects I&#8217;m working on and projects I&#8217;ve done in the past and various other little things. I&#8217;m not that great of a writer so I&#8217;m hoping that blogging frequently can help me with this.</p>
<p>So I hope you can enjoy a thing or two here. And that I don&#8217;t offend you too much with my opinions. <img src='http://dexterthedragon.com/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>-Dexter-</p>
]]></content:encoded>
			<wfw:commentRss>http://dexterthedragon.com/2008/06/welcome/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
