<?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>Produxion &#187; CSS</title>
	<atom:link href="http://www.produxion.net/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.produxion.net</link>
	<description>The personal weblog of Phil Powell</description>
	<lastBuildDate>Wed, 01 Feb 2012 10:08:49 +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>HTML5 elements in Internet Explorer without Javascript</title>
		<link>http://www.produxion.net/2011/01/19/html5-elements-in-internet-explorer-without-javascript/</link>
		<comments>http://www.produxion.net/2011/01/19/html5-elements-in-internet-explorer-without-javascript/#comments</comments>
		<pubDate>Wed, 19 Jan 2011 10:07:22 +0000</pubDate>
		<dc:creator>Phil Powell</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[xslt]]></category>

		<guid isPermaLink="false">http://www.produxion.net/?p=485</guid>
		<description><![CDATA[Elco Klingen has written up his exploration into a technique for support of HTML5 elements without the need for Javascript tweaking. Most browsers will support styling of HTML5 named elements using CSS, even if they don&#8217;t properly support or recognise those elements. Internet Explorer is the exception to the rule, and doesn&#8217;t apply styling to [...]]]></description>
			<content:encoded><![CDATA[<p>Elco Klingen has written up <a href="http://www.debeterevormgever.nl/html5-ie-without-javascript/">his exploration into a technique</a> for support of HTML5 elements without the need for Javascript tweaking.</p>
<p>Most browsers will support styling of HTML5 named elements using CSS, even if they don&#8217;t properly support or recognise those elements. Internet Explorer is the exception to the rule, and doesn&#8217;t apply styling to the new elements — it takes the approach that if it&#8217;s not part of the doctype spec, then there&#8217;s no point in even trying to parse the CSS.</p>
<p><a href="http://www.debeterevormgever.nl/html5-ie-without-javascript/">Elco on the approach</a>:</p>
<blockquote><p>The solution is actually pretty simple; put the new HTML5 elements in their own namespace. By doing so, Internet Explorer skips checking (and collapsing) the new elements and they display just fine. It&#8217;s the same method as styling an XML document with CSS and Internet Explorer displays that just fine, too.</p></blockquote>
<p>It&#8217;s a technique I played around with a few weeks ago, and — although quite clever — isn&#8217;t really useful in any practical way. Instead of using an <code>&lt;section&gt;</code> element, you instead need to use a namespaced version, like <code>&lt;html5:section&gt;</code>. The reason I abandoned the use of this technique was because it creates more problems than it solves, and your not using a very convoluted strain of HTML5 — if we&#8217;re trying to standardise things with HTML5, then this kind of technique just muddies the waters.</p>
<p>It&#8217;s a commendable attempt at solving an irritating problem though: I really wish basic support for HTML5 elements could be enabled without the need for scripting. I&#8217;ve tried a few techniques and have yet to find the holy grail. I&#8217;ve tried several methods of tweaking the doctype to include the new elements, but to no avail. I even looked at using an HTC file to wrestle things into shape, but since any transformations on the DOM require scripting, that was a dead-end.</p>
<p>The closest I got was to use XSLT to transform the document &#8211; effectively swapping out every instance of an HTML5 element with a division which identified the element type with a class name, like <code>&lt;div class="article"&gt;</code>. Since Internet Explorer has good support for XSLT this is a very reliable technique, but with one major drawback: for it to work, the document has to be served up as an XML file. Aside from the complications that creates for how you serve up your documents — particularly if they&#8217;re scripted — it causes havoc for other browsers.</p>
<p>So, sadly, it looks like Javascript is the only way to do it, for now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.produxion.net/2011/01/19/html5-elements-in-internet-explorer-without-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building a Custom HTML5 Audio Player with jQuery</title>
		<link>http://www.produxion.net/2010/10/26/building-a-custom-html5-audio-player-with-jquery/</link>
		<comments>http://www.produxion.net/2010/10/26/building-a-custom-html5-audio-player-with-jquery/#comments</comments>
		<pubDate>Tue, 26 Oct 2010 11:19:41 +0000</pubDate>
		<dc:creator>Phil Powell</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.produxion.net/?p=389</guid>
		<description><![CDATA[A brilliant, in-depth post from Neutron Creations about creating a custom HTML5 audio player: We recently built an HTML5 audio player for Tim Van Damme‘s The Box, a new podcast where he interviews people who make cool stuff. Tim wanted an HTML5 audio player on the site, and we put together some jQuery to hook [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://neutroncreations.com/blog/building-a-custom-html5-audio-player-with-jquery/">A brilliant, in-depth post from Neutron Creations</a> about creating a custom HTML5 audio player:</p>
<blockquote><p>We recently built an HTML5 audio player for <a href="http://maxvoltar.com/">Tim Van Damme</a>‘s <a href="http://thebox.maxvoltar.com/">The Box</a>, a new podcast where he interviews people who make cool stuff. Tim wanted an HTML5 audio player on the site, and we put together some <a href="http://jquery.com/">jQuery</a> to hook up the player interface he designed. In this article we’ll run through the code to explain how it works, covering a few caveats along the way.</p></blockquote>
<p>They provide code samples and an explanation of their really well thought out design decisions. Really surprising how little code is involved in creating something like this too.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.produxion.net/2010/10/26/building-a-custom-html5-audio-player-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Announcement &#8211; Gridlet V0.1</title>
		<link>http://www.produxion.net/2009/01/15/announcement-gridlet-v01/</link>
		<comments>http://www.produxion.net/2009/01/15/announcement-gridlet-v01/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 09:27:47 +0000</pubDate>
		<dc:creator>Phil Powell</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.produxion.net/?p=36</guid>
		<description><![CDATA[I've been using grids in my CSS designs for quite a while now, inspired by frameworks like <a href="http://www.blueprintcss.org/">Blueprint CSS</a>.  Although I don't use Blueprint for production work (using a CSS framework starts to get a bit restrictive, and I prefer to build from scratch, rather than trying to override someone else's default), I do use the methodology in my own CSS to create structured, grid-based layouts, and consistent typography.

One of the clever things that Blueprint introduced was the idea of displaying the grid while you're working - this proves to be an invaluable aid as you try to refine CSS rules.  But I've found that - as good as the theory is - it has a few drawbacks.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using grids in my CSS designs for quite a while now, inspired by frameworks like <a href="http://www.blueprintcss.org/">Blueprint CSS</a>.  Although I don&#8217;t use Blueprint for production work (using a CSS framework starts to get a bit restrictive, and I prefer to build from scratch, rather than trying to override someone else&#8217;s default), I do use the methodology in my own CSS to create structured, grid-based layouts, and consistent typography.</p>
<p>One of the clever things that Blueprint introduced was the idea of displaying the grid while you&#8217;re working &#8211; this proves to be an invaluable aid as you try to refine CSS rules.  But I&#8217;ve found that &#8211; as good as the theory is &#8211; it has a few drawbacks:</p>
<ol>
<li>Because it uses a background-image CSS property, it overrides any beautiful background design you might have implemented.</li>
<li>Because it uses images, if you change your grid size, you have to generate a new custom image &#8211; a bit of a faff.</li>
<li>You have to tweak your CSS every time you want to turn the grid on or off.</li>
</ol>
<p>Since I work with grids more and more often, I decided to have a stab at coming up with a solution which refines the Blueprint idea, adds a dash of <a href="http://www.jquery.com">jQuery</a> to produce something which is a little more flexible and user-friendly.</p>
<p>What I&#8217;ve come up with is a jQuery plugin called Gridlet.  Instead of using pure CSS, the plugin generates a grid on-the-fly, and it&#8217;s an improvement in the following ways:</p>
<ol>
<li>It doesn&#8217;t use images &#8211; instead it dynamically generates a grid on top of your page, so your design remains intact.</li>
<li>Changing your grid size is as simple as changing a setting &#8211; no need to generate images.</li>
<li>You, er, have to tweak your JS to turn it on or off (this is something I&#8217;m going to work on improving &#8211; it&#8217;s early days).</li>
</ol>
<p>It&#8217;s also worth noting that this first version only produces horizontal grids &#8211; that&#8217;s all I need at the moment  No doubt I&#8217;lla dd vertical grid spacing as and when it&#8217;s needed.  Any comments or suggestions are appreciated.</p>
<p><a href="http://www.produxion.net/wp-content/uploads/2009/01/jquerygridlet-01.js">You can download version 0.1 of Gridlet here</a>.  I&#8217;ve only tested in Safari 3 and Firefox 3 so far.</p>
<p>Implementing it is really easy &#8211; you just do something like this:</p>
<pre>$(document).ready(function() {
  $("body").gridlet();
});</pre>
<p>If you want to override the default grid height or colour, just pass in the settings like this:</p>
<pre>$(document).ready(function() {
  $("body").gridlet({
    height: 18,
    background: "#fcc"
  });
});</pre>
<p>And finally, for your curiosity, here&#8217;s the source code:</p>
<pre>(function($) {
  jQuery.fn.gridlet = function(options) {

    var opts = $.extend({}, $.fn.gridlet.defaults, options);
    var line_position = 0;
    $("&lt;div/&gt;").attr("id", "grid_container").appendTo("body").css({
      position: "absolute",
      top: 0,
      left: 0,
      height: "100px",
      width: "100%",
    })

    while(line_position &lt; $("body").height())
    {
      line_position += opts.height;
      $("&lt;div/&gt;").css({
        position: "absolute",
        top: line_position,
        left: 0,
        height: 1,
        width: "100%",
        background: opts.background
      }).appendTo("div#grid_container")
    }

    return this;

  };

  jQuery.fn.gridlet.defaults = {
    height: 24,
    width: 24,
    background: "#ddf"
  };

})(jQuery);</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.produxion.net/2009/01/15/announcement-gridlet-v01/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

