<?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>@drublic</title>
	<atom:link href="http://drublic.de/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://drublic.de/blog</link>
	<description>A Cutting Edge Webdesign Blog</description>
	<lastBuildDate>Fri, 17 Feb 2012 15:33:25 +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>The CSS Hierarchies Module Level 3</title>
		<link>http://drublic.de/blog/the-css-hierarchies-module-level-3/</link>
		<comments>http://drublic.de/blog/the-css-hierarchies-module-level-3/#comments</comments>
		<pubDate>Fri, 17 Feb 2012 14:52:23 +0000</pubDate>
		<dc:creator>Hans Christian</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[Preprocessors]]></category>
		<category><![CDATA[Specification]]></category>

		<guid isPermaLink="false">http://drublic.de/blog/?p=771</guid>
		<description><![CDATA[Since the beginning of February there were some proposals for the CSS3 specification. These proposals are not yet part of the specification and will likely be changed until they get adopted by the CSSWG. One of these drafts is the CSS Hierarchies Module Level 3. So what&#8217;s the Hierarchies Module? And why &#8220;Level 3&#8243;? The Hierarchies Module is not exactly new. It exists since the very first steps of CSS and was first released in Dezember 1996 with CSS1. The CSS1 specification is still up, so check it out if you want to. When you write CSS you always use selectors to target<p><a title="Link toThe CSS Hierarchies Module Level 3" class="more-link" href="http://drublic.de/blog/the-css-hierarchies-module-level-3/">Read more</a></p>]]></description>
			<content:encoded><![CDATA[<p>Since the beginning of February there were some proposals for the CSS3 specification. These proposals are not yet part of the specification and will likely be changed until they get adopted by the <a title="The CSS Working Group Wiki" href="http://wiki.csswg.org/">CSSWG</a>. One of these drafts is the <a href="http://dev.w3.org/csswg/css3-hierarchies/" title="The CSS Hierarchies Module Level 3"><strong>CSS Hierarchies Module Level 3</strong></a>.</p>
<h2>So what&#8217;s the Hierarchies Module? And why &#8220;Level 3&#8243;?</h2>
<p>The Hierarchies Module is not exactly new. It exists since the very first steps of CSS and was first released in Dezember 1996 with CSS1. The <a title="Cascading Style Sheets, Level 1" href="http://www.w3.org/TR/2008/REC-CSS1-20080411/">CSS1 specification</a> is still up, so check it out if you want to.</p>
<p>When you write CSS you always use selectors to target the element you want to style. This works pretty much straight-forward: The right-most simple selector is the one which get the declarations assigned that are defined in the ruleset.<br />
These selectors define a certain hierarchy in your stylesheet.<br />
<strong>Note:</strong> Please make sure to read Tab Atkins&#8217; <a title="CSS Spec Terms, for Future Reference" href="http://www.xanthir.com/blog/b4E50">Reference for CSS Spec Terms</a>.</p>
<h3>An example</h3>
<p>Today you would target some links in a navigation like this:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#nav</span> ul li a <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>If you&#8217;re smart and your markup allows you to do so, you may write:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#nav</span> a <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>The li-elements need to be inlined as you want a horizontal navigation:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#nav</span> ul li <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Furthermore the navigation should be aligned on the right and all the links centered:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#nav</span> ul <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#nav</span> ul li <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>This leaves us with a lot of repetition for the selectors.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#nav</span> ul <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#nav</span> ul li <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#nav</span> ul li a <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>With the Level 3 proposal by <a href="https://twitter.com/#!/tabatkins" title="Tab Atkins on Twitter">Tab Atkins Jr</a> and <a title="Shane's Google+ profile-page" href="https://plus.google.com/101031566089926386443/posts">Shane Stephens</a> (working for Google) this is about to get a little bit easier. The existing system will be extended with some new functionality. This is why it&#8217;s called Level 3. (Also it will likely be part of CSS <strong>3</strong> – and not 4 or 10 or something.)</p>
<h2>What&#8217;s new in there?</h2>
<p>Lately you saw the rise of CSS Preprocessors. Everyone <a href="http://lea.verou.me/2011/03/on-css-preprocessors/" title="Lea Verou - On CSS preprocessors">has</a> <a href="http://css-tricks.com/musings-on-preprocessing/" title="Chris Coyier - Musings on Preprocessing">an opinion</a> <a href="http://www.stuffandnonsense.co.uk/blog/about/less" title="Andy Clark - LESS">on this</a>. The thing why so many developers use them is that they help to organize the CSS-code you are writing.<br />
Preprocessors have brought up another idea of CSS hierarchies. And with the <strong>CSS Hierarchies Module Level 3</strong> this has been adopted.</p>
<p>The specification draft allows you to nest your rules and use the <code>&amp;</code>-character to reference a parent selector in a certain rule.</p>
<p>Here&#8217;s the example from above with the new hierarchy:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#nav</span> ul <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>
    &amp; li <span style="color: #00AA00;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
        <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span>
        &amp; a <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
    <span style="color: #00AA00;">&#125;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>As you can see there are no repetitions for the selectors as you can reference them by just writing <code>&amp;</code> and nest them properly.</p>
<h2>How can we use this today and when will it be ready for the &#8220;real world&#8221;?</h2>
<p>As you may guess this is not implemented in any browser yet.</p>
<p>As this spec is written by two Google-guys it&#8217;s likely that this will be implemented in Chrome in the near future. At the moment this is not working with Chrome 19 (Canary) or WebKit Nightly.<br />
I&#8217;ve made <a title="Testing the CSS Hierarchies Module Level 3" href="http://dabblet.com/gist/1854033">this Dabblet</a> to check if the module is supported in a browser or not. caniuse.com does not provide any data for the Hierarchies Module yet.<br />
<strong>Aside</strong>: Check my <a title="The Dabbles App for Google Chrome" href="http://drublic.de/blog/dabblet-chrome-app/">Dabblet Chrome App</a> to view all your latest dabblets if you&#8217;re a Chrome user.</p>
<p>Tab Atkins proposed another style for nesting. To reference the parent selector you use <code>@this</code> instead of the <code>&amp;</code>-character. Peter Beverloo<a title="CSS Variables and mixins, Interactive Validation and pre-rendering" href="http://peter.sh/2011/01/css-variables-and-mixins-interactive-validation-and-prerendering/"> wrote about this</a> a year ago. Also Tab Atkins <a title="CSSOM, Vars, Mixins, Nesting, and Modules" href="http://www.xanthir.com/blog/b49w0">has an article</a> about his further plans. This variant was not implement either and is replaced with the new draft for the specification. Anyway <a title="Using CSS nesting with @this" href="http://dabblet.com/gist/1853580">you could view</a> the dabblet I&#8217;ve made for this propose.</p>
<h3>Preprocessors</h3>
<p>As mentioned above CSS preprocessors offer the chance to use something like hierarchies in there own way. Here are two examples:</p>
<p><strong>SCSS (aka. SASS)</strong></p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#nav</span> ul <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>
    li <span style="color: #00AA00;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span>
        a <span style="color: #00AA00;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span>
            &amp;<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">gray</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
        <span style="color: #00AA00;">&#125;</span>
    <span style="color: #00AA00;">&#125;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p><strong>Stylus</strong></p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#nav</span> ul
    <span style="color: #000000; font-weight: bold;">text-align</span> <span style="color: #000000; font-weight: bold;">right</span>
    li
        <span style="color: #000000; font-weight: bold;">display</span> <span style="color: #993333;">inline</span>
        a
            <span style="color: #000000; font-weight: bold;">color</span> <span style="color: #cc00cc;">#000</span>
            &amp;<span style="color: #3333ff;">:hover
                </span><span style="color: #000000; font-weight: bold;">color</span> grey</pre></div></div>

<p>As you can see there is a difference in how preprocessors treat the <code>&amp;</code>-character as a reference: In the CSS specification draft <code>&amp;</code> is obligatory in every nested rule you write to reference the parent selector. Preprocessors need them only if there is a pseudo-class or -element or a combinator (such as <code>~</code> or <code>&gt;</code>) used for a specific selector.</p>
<p>As I stated in the introduction it may happen that the specification will be changed until it becomes final or is adopted by the CSS Working Group. I recommend you follow the discussions about this topic in order to stay up to date.<br />
When this specification will be implemented by one of the browser vendors it&#8217;s just a matter of weeks until it will be adopted by the others I guess.</p>
<p>But, as the draft states, this is not yet part of CSS:</p>
<blockquote><p>This document is purely an Editor&#8217;s Draft. It has not yet been adopted by the Working Group, and should not be considered to be part of CSS.</p>
<p>~ <a href="http://dev.w3.org/csswg/css3-hierarchies/#status" title="Status">CSS Hierarchies Module &#8211; Status</a>
</p></blockquote>
<h2>Opinion</h2>
<p>Personally I hope that referencing the parent selector with <code>&amp;</code> will not be in the final specification as it is now. It&#8217;s not needed as the rules are nested anyway and preprocessors nowadays treat them better.</p>
<p>Anyway the new nesting is pretty useful as it reduces the redundancy of writing selectors in CSS. In connection with other upcoming specifications like the <a title="CSS Variables Module Level 1" href="http://dev.w3.org/csswg/css-variables/">CSS Variables Module Level 1</a> this is what is needed and will be helpful for every web-developer once it will be implemented in browsers.</p>
]]></content:encoded>
			<wfw:commentRss>http://drublic.de/blog/the-css-hierarchies-module-level-3/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Dabblet Chrome App</title>
		<link>http://drublic.de/blog/dabblet-chrome-app/</link>
		<comments>http://drublic.de/blog/dabblet-chrome-app/#comments</comments>
		<pubDate>Sun, 29 Jan 2012 10:26:13 +0000</pubDate>
		<dc:creator>Hans Christian</dc:creator>
				<category><![CDATA[Apps]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[References]]></category>
		<category><![CDATA[AMD]]></category>
		<category><![CDATA[App]]></category>
		<category><![CDATA[Chrome App]]></category>
		<category><![CDATA[dabblet]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://drublic.de/blog/?p=748</guid>
		<description><![CDATA[I think all of you know Lea Verou&#8217;s dabblet. dabblet is an interactive playground for quickly testing snippets of CSS and HTML code. It uses -prefix-free, so that you won&#8217;t have to add any prefixes in your CSS code. You can save your work in Github gists, embed it in other websites and share it with others. ~ About dabblet Some time ago I made this tiny Google Chrome App for jsFiddle which is in case just a bookmarklet with a bigger icon. I did this for dabblet, too but extended the app to something more: It displays all your dabblets<p><a title="Link toDabblet Chrome App" class="more-link" href="http://drublic.de/blog/dabblet-chrome-app/">Read more</a></p>]]></description>
			<content:encoded><![CDATA[<p><img src="http://drublic.de/blog/wp-content/uploads/2012/01/dabblet-128x128.png" alt="Dabblet Chrome App" title="Dabblet Chrome App" width="128" height="128" class="alignright"></p>
<p>I think all of you know Lea Verou&#8217;s <i>dabblet</i>.</p>
<blockquote><p><i>dabblet</i> is an interactive playground for quickly testing snippets of CSS and HTML code. It uses -prefix-free, so that you won&#8217;t have to add any prefixes in your CSS code. You can save your work in Github gists, embed it in other websites and share it with others.<br />
<cite>~ <a href="http://dabblet.com/help/" target="_blank">About <i>dabblet</i></a></cite>
</p></blockquote>
<p>Some time ago I made <a href="https://chrome.google.com/webstore/detail/hiigmadmngbpbmacbkfngpkjfmmpagfk" title="jsFiddle Chrome App on the App Store" target="_blank">this tiny</a> Google Chrome App for jsFiddle which is in case just a bookmarklet with a bigger icon.</p>
<p>I did this for <i>dabblet</i>, too but extended the app to something more: It displays all your dabblets with title and creation-date. You can then visit your dabblet directly.</p>
<p>You can find the app in the Google Chrome App store now.</p>
<p><a href="https://chrome.google.com/webstore/detail/ehlimmpmogmglpfidpkbocdblhlnofke" title="Download the App in the Google Chrome App Store" class="button" target="_blank">Download</a></p>
<p>This project <a href="https://github.com/drublic/dabblet-chrome-app" title="Find the Chrome App on GitHub" target="_blank">is on GitHub</a>, so please feel free to contribute and <a href="https://github.com/drublic/dabblet-chrome-app/issues" title="Report bugs and feature requests on GitHub" target="_blank">report bugs and feature requests</a>.</p>
<h2 id="changelog">Changelog</h2>
<p>These are the major changes. All commits can be found <a href="https://github.com/drublic/dabblet-chrome-app/commits/master" title="Commit History for the Chrome App - dabblet">on GitHub</a>.</p>
<p><strong>v0.7</strong> &#8211; Feb. 13, 2012</p>
<ul>
<li>Add search – <a href="https://github.com/drublic/dabblet-chrome-app/issues/2">#2</a></li>
<li>Rewrite code-basis based on JS AMD with <a href="http://requirejs.org/" title="RequireJS">RequireJS</a></li>
<li>Display message if user has no gists to display – <a href="https://github.com/drublic/dabblet-chrome-app/issues/3">#3</a></li>
</ul>
<p><strong>v0.45</strong> &#8211; Feb. 02, 2012</p>
<ul>
<li>Add a link to fork Gists on dabblet when visiting <a href="https://gist.github.com">them on GitHub</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://drublic.de/blog/dabblet-chrome-app/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>About Git&#8217;s Cherry-Picking</title>
		<link>http://drublic.de/blog/about-gits-cherry-picking/</link>
		<comments>http://drublic.de/blog/about-gits-cherry-picking/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 09:30:03 +0000</pubDate>
		<dc:creator>Hans Christian</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[cherry-picking]]></category>
		<category><![CDATA[Organize Code]]></category>
		<category><![CDATA[Version Control]]></category>
		<category><![CDATA[work together]]></category>

		<guid isPermaLink="false">http://drublic.de/blog/?p=733</guid>
		<description><![CDATA[At /gebrüderheitz we use Git as a version control system as we think this is the best to work together on a level which is easy to learn and work with. Before we used Git we’ve used SVN but this is by far not as flexible as Git. There are enough posts gathering the difference between Git and SVN so I will not cover any of these. When working in a team it’s important to keep your different stages of development in sync and control somehow: There is a front-end development going on which is in deep connection with the<p><a title="Link toAbout Git's Cherry-Picking" class="more-link" href="http://drublic.de/blog/about-gits-cherry-picking/">Read more</a></p>]]></description>
			<content:encoded><![CDATA[<p>At <a href="http://gebruederheitz.de/">/gebrüderheitz</a> we use Git as a version control system as we think this is the best to work together on a level which is easy to learn and work with.</p>
<p>Before we used Git we’ve used SVN but this is by far not as flexible as Git. There are enough posts gathering the difference between Git and SVN so I will not cover any of these.</p>
<p>When working in a team it’s important to keep your different stages of development in sync and control somehow: There is a front-end development going on which is in deep connection with the server-side development; you may also want to develop a new sub-project within your main project; and then there is a tested and fully working live-version of a project.</p>
<p>With Git it’s pretty obvious to use branches to organize different states of the project’s development.</p>
<h2>Branches</h2>
<p>Branches can consist of the whole project’s files and some more commits covering a specific issue or feature. Also they can show a whole different approach of a project and do not necessarily need to consist of the main project’s files.</p>
<p>For our projects we try to keep these branches tight so we will not have a problem when it comes to merging branches – to let one feature or development approach flow into the main development line. Keep in mind that branches in a project are indeed cheap. So use them where you think they might fit. Don’t think about it to long. It will help you in your whole working-process.</p>
<h2>Cherry-Picks</h2>
<p>Sometimes, when it comes to bug fixing you don’t want to put fixes in your live-branch. You fix them in your development-branch and commit them over there. The dev-branch might be on a whole other level as your live branch as you’ve developed some things that will be part of a next major update or so. Therefore Git’s cherry-picking has become a perfect addition to our workflow.</p>
<p>With cherry-picking you are able to pull single commits from one branch to another.</p>
<p>Another part where you might want to use cherry-picking is when a colleague and you develop in two different branches and one contributes to the other’s sub-project without changing the branch. There are some other use cases. Please feel free to share where you use cherry-picking through the comments.</p>
<h2>How to Use Cherry-Picking</h2>
<p>I am using a GUI for doing all the Git-related stuff which is pretty handy and easy. But I think it is important to know how to handle Git via the console anyway.</p>
<p>Here is how to cherry-pick commits.</p>
<p>At first you need to commit your changes in the development branch.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">git</span> commit <span style="color: #660033;">-m</span> <span style="color: #ff0000;">'This is some bugfix-message'</span></pre></div></div>

<p>You now need the commit-hash for the commit you want to cherry-pick in another branch.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">git</span> log <span style="color: #660033;">-1</span></pre></div></div>

<p>This will return the meta-data for your latest commit. You can now copy the first 7 or so numbers of the commit-hash. It’s not necessary to copy the whole hash as the hash-partial only needs to be unique above all commits of the project.</p>
<p>Now you need to change your checked out branch to the branch where you want to insert – cherry-pick – this particular commit. While <code>&lt;live&gt;</code> is the name of this branch, do this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">git</span> checkout <span style="color: #000000; font-weight: bold;">&lt;</span>live<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>Keep in mind to commit all your changes in the current branch first or stash them.</p>
<p>Lastly you have to tell the checked out branch to use this commit and do the cherry-pick for real!</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">git</span> cherry-pick <span style="color: #000000; font-weight: bold;">&lt;</span>hash-partial<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p><code>&lt;hash-partial&gt;</code> is pretty self explaining I guess.</p>
<p>Git now automatically merges the commit into the specific branch.</p>
<h2>Merging Branches Later</h2>
<p>From what I experienced it is no problem to merge branches later when you cherry-picked some commits. This works just fine!</p>
]]></content:encoded>
			<wfw:commentRss>http://drublic.de/blog/about-gits-cherry-picking/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Effects for the Web!</title>
		<link>http://drublic.de/blog/effects-for-the-web/</link>
		<comments>http://drublic.de/blog/effects-for-the-web/#comments</comments>
		<pubDate>Tue, 27 Dec 2011 12:09:06 +0000</pubDate>
		<dc:creator>Christian "Schepp" Schaefer</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Filters]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Webkit]]></category>

		<guid isPermaLink="false">http://drublic.de/blog/?p=648</guid>
		<description><![CDATA[Christian &#8220;Schepp&#8221; Schaefer shows how to use the new filter-properties for CSS3 and combine them with methods implemented by most modern browsers. This article was first published in German on December 19th 2011. In the late nineties CSS 2.1 brought us a basic set of good-enough tools to finally get table-free layouts en route. Then came CSS3 which started off by providing us with more creative tools to carve out the details. Today we finally have embeddeable fonts, rounded corners, gradients, semitransparent elements and colors, box and text shadows and so on and so forth. Yet, comparing our toolset with<p><a title="Link toEffects for the Web!" class="more-link" href="http://drublic.de/blog/effects-for-the-web/">Read more</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Christian &#8220;Schepp&#8221; Schaefer shows how to use the new filter-properties for CSS3 and combine them with methods implemented by most modern browsers. This article was <a href="http://maddesigns.de/css3-filter-1525.html" target="_blank">first published</a> in German on December 19th 2011.</strong></p>
<p><span id="more-648"></span></p>
<p>In the late nineties CSS 2.1 brought us a basic set of good-enough tools to finally get table-free layouts en route. Then came CSS3 which started off by providing us with more creative tools to carve out the details. Today we finally have embeddeable fonts, rounded corners, gradients, semitransparent elements and colors, box and text shadows and so on and so forth.</p>
<p>Yet, comparing our toolset with that of an image editor like Photoshop we still discover a lot to desire. In Photoshop, for example, we have possibilities to desaturate parts of an image, or to sharpen or blur them. How might we need that for the web? Well, desaturating or blurring an area of a web page might be a means of directing your visitor&#8217;s attention to where you want it to be. Or it might help your visitor to concentrate better on an area, which you left untouched. Such a case might be magnifying pictures of a gallery:</p>
<p><a href="http://mikematas.com/#!g9/2nLk/photos/one_week_in_japan_-_3_of_5"><img src="http://drublic.de/blog/wp-content/uploads/2011/12/Mike-Matas-One-Week-In-Japan.png" alt="" width="550" height="237" class="size-full wp-image-672" /></a></p>
<p>A sharpen effect on the other hand might be useful when you scale down images in the browser, since without counter-measures you lose a lot of image details.</p>
<p><a href="http://drublic.de/blog/effects-for-the-web/sharpen/" rel="attachment wp-att-674"><img src="http://drublic.de/blog/wp-content/uploads/2011/12/sharpen.jpg" alt="" width="550" height="489" class="alignnone size-full wp-image-674" /></a></p>
<p>That said, it would be nice if we had such effects and could apply them the same way we do apply <code>opacity</code> to tranparentize a whole area. Alas, we don&#8217;t.</p>
<h2>The status quo</h2>
<p>Instead, to replicate a desaturation/grey scaling we are currently forced to cycle &#8220;by hand&#8221; through the color values of every affected element with JavaScript and set them to a corresponding grey value. When we meet (background-)images or videos it gets even more complicated: Then we need to switch to <a href="http://spyrestudios.com/html5-canvas-image-effects-black-white/" target="_blank">HTML5 canvas to manipulate their color-values pixel by pixel</a> and swap out the original ones. But even if we get help from libraries like <a href="http://camanjs.com/examples" target="_blank">CamanJS</a> or <a href="http://www.iliasiovis.com/hoverizr/" target="_blank">Hoverizr</a>, it remains a profound messy affair.</p>
<p>A blur effect can also be simulated, this time by using <a href="http://webstandard.kulando.de/post/2011/12/09/css3-text-shadow-erzeugt-blur-effekt-tag-10-im-css3-adventskalender-2011" target="_blank">text-shadows</a> and/or <a href="http://tympanus.net/codrops/2011/12/14/item-blur-effect-with-css3-and-jquery/" target="_blank">box-shadows</a> that use the same color/background-color as the to be blurred text/box. The thing is, the illusion doesn&#8217;t work with multicolored boxes and, as before, not with images or video. This requires again some HTML5 canvas action. Sigh.</p>
<p><a href="http://tympanus.net/codrops/2011/12/14/item-blur-effect-with-css3-and-jquery/" target="_blank"><img src="http://drublic.de/blog/wp-content/uploads/2011/12/Item-Blur-Effect-with-CSS3-and-jQuery-Google-Chrome_2011-12-18_11-37-58.png" alt="" width="551" height="443" class="alignnone size-full wp-image-671" /></a></p>
<p>Speaking of HTML5 canvas: A very brutal approach to that blurring topic is being made by a library called <a href="https://github.com/pmura/blurry.js" target="_blank">blurry.js</a>, which extracts all the content, recreates it in a canvas (partially via Cufón), blurs it there and injects the whole thing back to where the original content was.</p>
<p>Finally, for sharpening elements there is no CSS-based trick at all, which leaves us alone with HTML5 canvas.</p>
<h2>SVG to the rescue</h2>
<p>Interestingly SVG knows a huge palette of so-called <a href="http://electricbeach.org/?p=950" target="_blank">filters</a> since ages, e.g. color blending, brightness/contrast adjustments, lighting, displacement mapping, gaussian and motion blur, clouds, noise, sharpen et cetera.</p>
<p>Now, what we might try, since SVG is more and more widely supported, is to not put our content into HTML, but instead to put it into an SVG which we then inline or embed into out HTML &#8220;frame&#8221;. Inside that SVG we are then able to <a href="http://dev.opera.com/articles/view/how-to-do-photoshop-like-effects-in-svg/" target="_blank">apply any effect we like to our contents</a>. The drawback is that a HTMLer won&#8217;t be too keen on switching to SVG markup like the following:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;text</span> <span style="color: #000066;">font-family</span>=<span style="color: #ff0000;">&quot;Arial&quot;</span> <span style="color: #000066;">font-weight</span>=<span style="color: #ff0000;">&quot;900&quot;</span> <span style="color: #000066;">font-size</span>=<span style="color: #ff0000;">&quot;40&quot;</span> <span style="color: #000066;">x</span>=<span style="color: #ff0000;">&quot;20&quot;</span> <span style="color: #000066;">y</span>=<span style="color: #ff0000;">&quot;55%&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>SVG Example<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/text<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Something way cooler is an SVG thing called ForeignObject/xlink, <a href="http://ajaxian.com/archives/foreignobject-hey-youve-got-html-in-my-svg" target="_blank">which allows us to embed foreign objects or areas of foreign markup inside an SVG</a>. Think of it like inlining SVG into an HTML5 document, but the other way &#8217;round. Once you have embedded your stuff, you can apply filters to it like you can for any other area of your SVG. <a href="http://dev.opera.com/articles/view/applying-color-tints-to-web-pages-with-s/" target="_blank">You might embed and filter a full HTML page from A to Z</a>, or you restrict yourself to <a href="http://www.flother.com/examples/canvas-blur/v4/blur.svg" target="_blank">just embedding and filtering a single bitmap image</a>. Of course, you&#8217;d need to put the holding SVG into an HTML page again, which makes up for some Inception-like braintwister (HTML with embedded SVG with embedded HTML). Browser support of the ForeignObject is <a href="http://caniuse.com/#feat=svg-html" target="_blank">quite good</a>. Remains left IE, who will follow suite in version 10 both with SVG filters and ForeignObject.</p>
<h2>SVG Filters in HTML via CSS</h2>
<p>Firefox since version 3.5 goes even further. He allows you to reach out to a filter that resides inside an SVG from out your HTML document&#8217;s stylesheet and have that filter then applied to any HTML element. We could for example define a <code>feGaussianBlur</code>-filter in an SVG with a radius of 2px and assign it the id <code>gaussian_blur</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">standalone</span>=<span style="color: #ff0000;">&quot;no&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #00bbdd;">&lt;!DOCTYPE svg PUBLIC &quot;-//W3C//DTD SVG 1.1//EN&quot; </span>
<span style="color: #00bbdd;">&quot;http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd&quot;&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;svg</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.1&quot;</span> </span>
<span style="color: #009900;"><span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2000/svg&quot;</span> </span>
<span style="color: #009900;"><span style="color: #000066;">xmlns:xlink</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/1999/xlink&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;defs<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;filter</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;gaussian_blur&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;feGaussianBlur</span> <span style="color: #000066;">in</span>=<span style="color: #ff0000;">&quot;SourceGraphic&quot;</span> <span style="color: #000066;">stdDeviation</span>=<span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/filter<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/defs<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/svg<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Then we could reference that filter by the SVG&#8217;s file name and the filter&#8217;s id in our styles and have it applied to every image:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">img <span style="color: #00AA00;">&#123;</span>
  filter<span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span>blur<span style="color: #6666ff;">.svg</span><span style="color: #cc00cc;">#gaussian_blur</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p><a href="http://drublic.de/blog/effects-for-the-web/unscharfe-via-css-filter-svg-mozilla-firefox_2011-12-18_21-18-59/" rel="attachment wp-att-668"><img src="http://drublic.de/blog/wp-content/uploads/2011/12/Unschärfe-via-CSS-Filter-SVG-Mozilla-Firefox_2011-12-18_21-18-59.png" alt="" width="519" height="343" class="alignnone size-full wp-image-668" /></a></p>
<p>You find a live-demo <a href="http://www.der-schepp.de/code-files/blur.html" target="_blank">here</a>. Alas, as I said, this just works with Firefox.</p>
<p>Thankfully this is not the end of the story. IE also knows filters, although not SVG-based, but instead based on early incarnations of the Windows graphics library DirectX. Amongst those filters are not only the well known alpha oder gradient filters that we use to fix bugs or to replicate CSS3 features. There are also filters that are quite similar to many of the interesting SVG filters:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* blur by 2 pixels */</span>
filter<span style="color: #00AA00;">:</span> progid<span style="color: #3333ff;">:DXImageTransform</span><span style="color: #6666ff;">.Microsoft</span>.Blur<span style="color: #00AA00;">&#40;</span>pixelradius<span style="color: #00AA00;">=</span><span style="color: #cc66cc;">2</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #808080; font-style: italic;">/* 13 pixel motion blur rotated to an angle of 310° */</span>
filter<span style="color: #00AA00;">:</span> progid<span style="color: #3333ff;">:DXImageTransform</span><span style="color: #6666ff;">.Microsoft</span>.MotionBlur<span style="color: #00AA00;">&#40;</span>strength<span style="color: #00AA00;">=</span><span style="color: #cc66cc;">13</span><span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">direction</span><span style="color: #00AA00;">=</span><span style="color: #cc66cc;">310</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #808080; font-style: italic;">/* grey scale / desaturate */</span>
filter<span style="color: #00AA00;">:</span> <span style="color: #993333;">gray</span><span style="color: #00AA00;">;</span>
<span style="color: #808080; font-style: italic;">/* Röntgen effect (inverted grey scale) */</span>
filter<span style="color: #00AA00;">:</span> xray<span style="color: #00AA00;">;</span>
<span style="color: #808080; font-style: italic;">/* light cone */</span>
filter<span style="color: #00AA00;">:</span> light<span style="color: #00AA00;">&#40;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #808080; font-style: italic;">/* emboss */</span>
filter<span style="color: #00AA00;">:</span> progid<span style="color: #3333ff;">:DXImageTransform</span><span style="color: #6666ff;">.Microsoft</span>.emboss<span style="color: #00AA00;">&#40;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span></pre></div></div>

<p>You find a full list of those visual filters <a href="http://msdn.microsoft.com/en-us/library/ms673539(v=VS.85).aspx" target="_blank">here</a>.</p>
<p>So, with the help of conditional comments we can now already serve certain effects to two browser families, which together make up a considerable amount of the browser market:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE HTML&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;!--[if lte IE 9]&gt; &lt;html class=&quot;ie&quot; lang=&quot;en&quot;&gt; &lt;![endif]--&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;!--[if gt IE 9]&gt;&lt;!--&gt;</span> <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;html</span> <span style="color: #000066;">lang</span>=<span style="color: #ff0000;">&quot;en&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span> <span style="color: #808080; font-style: italic;">&lt;!--&lt;![endif]--&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;head<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;meta</span> <span style="color: #000066;">charset</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Blur via CSS<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;style<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
img {
  filter: url(blur.svg#gaussian_blur);
}
.ie img {
  margin: -2px;
  filter: progid:DXImageTransform.Microsoft.blur(pixelradius=2);
  zoom: 1;
}
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/style<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/head<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;img</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;stadt.jpg&quot;</span></span>
<span style="color: #009900;">   <span style="color: #000066;">alt</span>=<span style="color: #ff0000;">&quot;Some rights reserved by zigazou76&quot;</span></span>
<span style="color: #009900;">   <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;500&quot;</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;333&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/html<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p><em><code>margin: -2px</code> counters the increased dimensions of the filtered element in IE. <code>zoom: 1</code> is needed for most filters to work in IE6/7. Sad fact: IE10 won&#8217;t support filters anymore :(</em></p>
<p><a href="http://www.der-schepp.de/code-files/blur2.html" target="_blank">Here you find the extended example</a></p>
<p>As people liked Firefox&#8217;s idea to open up SVG filters for use with HTML, those people formed a new task force in the W3C called W3C FX Task Force whose purpose it got to standardize and even simplify usage of SVG filters for use in all browsers. Because Firefox already pioneered filter effects the first draft didn&#8217;t take too long to appear under the label of <a href="https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html" target="_blank">W3C Filter Effects 1.0</a>. The mechanics proposed in that draft work almost like in Firefox, but with the addition of offering shortcuts to some of the most interesting filters. Filters that have a shortcut defined work without the help of an external SVG. They are sort of permanently hard wired inside browser engine. Those are the filters with shortcuts:</p>
<ul>
<li>grayscale</li>
<li>sepia</li>
<li>saturate</li>
<li>hue-rotate</li>
<li>invert</li>
<li>opacity</li>
<li>brightness</li>
<li>contrast</li>
<li>blur</li>
<li>drop-shadow</li>
</ul>
<p>Another advantage of the shortcut filters is that they are animateable via CSS transitions or animations:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.foo</span> <span style="color: #00AA00;">&#123;</span>
  filter<span style="color: #00AA00;">:</span> blur<span style="color: #00AA00;">&#40;</span><span style="color: #933;">2px</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
  transition<span style="color: #00AA00;">:</span> filter 1s ease-in-out<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.foo</span><span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
  filter<span style="color: #00AA00;">:</span> blur<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>This would be much harder and less efficient to do within an SVG.</p>
<p>Finally the filter effects are planned to be extended with <a href="http://www.adobe.com/devnet/html5/articles/css-shaders.html" target="_blank">OpenGL/WebGL vertex and fragment shaders</a>. Vertex shaders will let you span a 2D mesh over an element and then let you distort the object by moving all the crossing points of the mesh following a mathematical formula of your choice. Fragment shaders on the other hand will allow you to do such mathematical processing on the colors of every pixel of that element. And all of it, on top, hardware accelerated on your graphics card.</p>
<p><a href="http://www.adobe.com/devnet/html5/articles/css-shaders.html"><img src="http://drublic.de/blog/wp-content/uploads/2011/12/CSS-shaders-Cinematic-effects-for-the-web-Adobe-Developer-Connection-Google_2011-12-18_19-31-01.png" alt="" width="550" height="304" class="alignnone size-full wp-image-669" /></a></p>
<p>Conveniently last week saw the first implementation of those filters in the <a href="http://nightly.webkit.org/" target="_blank">WebKit-Nightlies</a>, from were they quickly spawned over to <a href="http://tools.google.com/dlpage/chromesxs" target="_blank">Chrome Canary</a>. That means that within a 3 months timeframe CSS filter effects will be available in your everyday Chrome browser and probably not too much later also in Safari. And this means that we are not too far away from being able to serve some flavor of CSS filters to 90% &#8211; 95% of all browsers on the market!</p>
<p>Returning to our code example, all that we need to add for WebKit now is a simple <code>-webkit-filter: blur(2px);</code> which for once we need to put <em>after</em> the unprefixed <code>filter</code>-property. The reason is that once WebKit will support an unprefixed <code>filter</code>-property that Firefox-specific syntax in the last line would kill our CSS transition, which we do apply in order to fade nicely from blurred to unblurred and back via <code>-webkit-transition: -webkit-filter 1s ease-in-out</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE HTML&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;!--[if lte IE 9]&gt; &lt;html class=&quot;ie&quot;&gt; &lt;![endif]--&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;!--[if gt IE 9]&gt;&lt;!--&gt;</span> <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;html<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> <span style="color: #808080; font-style: italic;">&lt;!--&lt;![endif]--&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;head<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;meta</span> <span style="color: #000066;">charset</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Blur via CSS<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;style<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
img {
  filter: url(blur.svg#gaussian_blur);
  -webkit-filter: blur(2px);
  -webkit-transition: -webkit-filter 1s ease-in-out;
}
img:hover {
  filter: none;
  -webkit-filter: blur(0);
}
.ie img {
  margin: -2px;
  filter: progid:DXImageTransform.Microsoft.blur(pixelradius=2);
  zoom: 1;
}
.ie img:hover {
  margin: 0;
  filter: none;
}
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/style<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/head<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;img</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;stadt.jpg&quot;</span></span>
<span style="color: #009900;">   <span style="color: #000066;">alt</span>=<span style="color: #ff0000;">&quot;Some rights reserved by zigazou76&quot;</span></span>
<span style="color: #009900;">   <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;500&quot;</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;333&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/html<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p><a href="http://www.der-schepp.de/code-files/blur3.html" target="_blank">And here is the final example</a>.</p>
<p>And that&#8217;s it, filter effects for everyone! Let 2012 be the year of the CSS filters and <a href="http://davidwalsh.name/dw-content/css-filters.php">have fun playing with&#8217;em</a>.</p>
<section style="clear: both;margin-top: 30px"><img src="http://drublic.de/blog/wp-content/uploads/2011/12/Schepp-2010a-220x240.jpg" alt="" width="110" height="120" class="alignleft size-thumbnail wp-image-673" style="margin-right: 10px" />Christian ”Schepp” Schaefer is a freelance web developer living in Düsseldorf, Germany. He is the author of <a href="http://github.com/Schepp/CSS-JS-Booster">CSS-JS-Booster</a>, co-author of <a href="http://turbinecss.org/">Turbine CSS Framework</a>, one hosts of the (German) <a href="http://workingdraft.de">Working Draft Podcast</a> and he follows your tweets with his account <a href="http://twitter.com/derSchepp">derSchepp</a>.</section>
]]></content:encoded>
			<wfw:commentRss>http://drublic.de/blog/effects-for-the-web/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Is Mothereffin&#8217; jQuery Up?</title>
		<link>http://drublic.de/blog/is-mothereffin-jquery-up/</link>
		<comments>http://drublic.de/blog/is-mothereffin-jquery-up/#comments</comments>
		<pubDate>Wed, 07 Dec 2011 09:23:50 +0000</pubDate>
		<dc:creator>Hans Christian</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[CDN]]></category>
		<category><![CDATA[HTML5 Boilerpate]]></category>
		<category><![CDATA[Mobile First]]></category>
		<category><![CDATA[Mothereffin]]></category>
		<category><![CDATA[Responsive Design]]></category>
		<category><![CDATA[Tool]]></category>

		<guid isPermaLink="false">http://drublic.de/blog/?p=617</guid>
		<description><![CDATA[Some weeks ago I made a pull request for HTML5Boilerplate which should update jQuery to the latest version available on the Google CDN. How ever I copied the old version of minified jQuery because the uncompressed version was available but the minified wasn&#8217;t. Stupid thing! That&#8217;s why I created Is Mothereffin&#8217; jQuery up? The service checks three major CDNs for the availability of the latest jQuery version. View Is Mothereffin&#8217; jQuery up? How to Check if the File is up I had some difficulties to find the right method how to detect if a file is already available with JavaScript.<p><a title="Link toIs Mothereffin' jQuery Up?" class="more-link" href="http://drublic.de/blog/is-mothereffin-jquery-up/">Read more</a></p>]]></description>
			<content:encoded><![CDATA[<p>Some weeks ago I made a <a href="https://github.com/h5bp/html5-boilerplate/pull/852" title="Pull Request to update jQuery to version 1.7.0" target="_blank">pull request for HTML5Boilerplate</a> which should update jQuery to the latest version available on the Google <abbr title="Content Delivery Network">CDN</abbr>. How ever I copied the old version of minified jQuery because the uncompressed version was available but the minified wasn&#8217;t. Stupid thing!</p>
<p>That&#8217;s why I created <a href="http://ismothereffinjqueryup.drublic.de/" title="Visit the project's page and check if the latest jQuery-version is already available on CDNs" target="_blank">Is Mothereffin&#8217; jQuery up?</a> The service checks three major CDNs for the availability of the latest jQuery version.</p>
<p><a href="http://ismothereffinjqueryup.drublic.de/" title="Visit the project's page and check if the latest jQuery-version is already available on CDNs" target="_blank" class="button">View Is Mothereffin&#8217; jQuery up?</a></p>
<h2>How to Check if the File is up</h2>
<p>I had some difficulties to find the right method how to detect if a file is already available with JavaScript. If you don&#8217;t have to deal with cross-domain requests this is not a big thing and done pretty easy. But I need cross-domain requests.</p>
<p>If a file is not available on a server, the request dies with an error 404 and no callback will be called. See <a href="http://jsfiddle.net/drublic/9rgXz/" target="_blank">this Fiddle</a> for a test-case. Even a <code>try-catch</code>-expression <a href="http://jsfiddle.net/drublic/WqWEC/" title="Tested on jsFiddle" target="_blank">does not help</a>.</p>
<p>I decided to check all files for availability and if the request ends up in an error nothing will happen. The script will check if all files are available after three seconds and will otherwise &#8220;tell&#8221; the user that it&#8217;s not. This is not a bullet-proof method as it could take more then three seconds to request all files. If you have a better idea please let me know.<br />
For the moment the resources will be labeled as &#8220;available&#8221; when they are loaded even if they were labeled &#8220;not available&#8221; before. So you will not end up with wrong result, it just may take a second more to show you that.</p>
<h2>The Styles</h2>
<p>The project was build &#8220;mobile-first&#8221;. It makes use of the <a href="http://www.w3.org/TR/css3-flexbox/" title="The specification of the CSS3 Flexible Box Model" target="_blank">CSS3 Flexible Box Model</a> instead of <code>float</code> and all the other stuff.</p>
<p>I&#8217;m not supporting IE in any way because I think most web-developer don&#8217;t use Internet Explorer.</p>
<h2>Todo</h2>
<ul>
<li>Support more libraries such as Mootools, Dojo, Prototype, ExtJS and YUI</li>
<li>Let users submit other CDN via a form</li>
<li><del>Link buttons to their library</del><ins>Done with <a href="https://github.com/drublic/isMothereffinjQueryUp/commit/145a150854bde08ae651f0124b363a4120b7156b" target="_blank">this commit</a></ins> &#8211; <a href="http://drublic.de/blog/is-mothereffin-jquery-up/#comment-166">suggestion</a> by <a href="http://mathiasbynens.be/">Mathias</a></li>
</ul>
<p>Let me know if you want some other features.</p>
<h2>Contribute via GitHub</h2>
<p>I&#8217;ve put this <a href="https://github.com/drublic/isMothereffinjQueryUp" title="The project on GitHub" target="_blank">project up</a> on GutHub. Feel free to contribute or just watch it.</p>
<p>Feature requests can also be placed in <a href="https://github.com/drublic/isMothereffinjQueryUp/issues" title="The issue tracker for isMothereffinjQueryUp" target="_blank">the issue-tracker</a> there.</p>
]]></content:encoded>
			<wfw:commentRss>http://drublic.de/blog/is-mothereffin-jquery-up/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Responsive Media</title>
		<link>http://drublic.de/blog/responsive-media/</link>
		<comments>http://drublic.de/blog/responsive-media/#comments</comments>
		<pubDate>Sat, 19 Nov 2011 21:50:09 +0000</pubDate>
		<dc:creator>Hans Christian</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[bandwidth]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[responsive]]></category>
		<category><![CDATA[Responsive Design]]></category>
		<category><![CDATA[Web-Apps]]></category>

		<guid isPermaLink="false">http://drublic.de/blog/?p=557</guid>
		<description><![CDATA[There is a big discussion going on at the moment covering the actual point of how to deal with images and media et al. on mobile-phones and other devices as there are some things that don&#8217;t work as on a desktop computer: Bandwidth Screen size Performance / Velocity The question is how to deliver responsive images on a mobile website. You maybe use something like img { max-width: 100%; height: auto; } in your responsive design to prevent images from being bigger then the screen of a mobile device. In most of the cases this shrinks images in its displayed<p><a title="Link toResponsive Media" class="more-link" href="http://drublic.de/blog/responsive-media/">Read more</a></p>]]></description>
			<content:encoded><![CDATA[<p>There is a big discussion going on at the moment covering the actual point of how to deal with images and media et al. on mobile-phones and other devices as there are some things that don&#8217;t work as on a desktop computer:</p>
<ul>
<li>Bandwidth</li>
<li>Screen size</li>
<li>Performance / Velocity</li>
</ul>
<p>The question is how to deliver responsive images on a mobile website.</p>
<p>You maybe use something like <code>img { max-width: 100%; height: auto; }</code> in your responsive design to prevent images from being bigger then the screen of a mobile device.</p>
<p>In most of the cases this shrinks images in its displayed size, which is a processor intensive thing to do &#8211; especially when you are on a mobile device and don&#8217;t have endless processor capacity this hurts.<br />
The shrinking itself does not change the file-size that has to be loaded; it remains the same as on a desktop for example. As bandwidth is the bottleneck these days if you are on a mobile device, this is the issue where people want to see some improvement.</p>
<h2>What can we do about it?</h2>
<p>There are a couple of proposals and known techniques on how to solve the problem:</p>
<h3>1. Resize images with PHP</h3>
<p>This is something you could only do if you know the screen-size before you load the images them self. So you have to inject HTML through JavaScript for example and change the sources for images accordingly.</p>
<p>The <a href="http://adaptive-images.com/" target="_blank">Adaptive Images</a> framework a similar technique. Check out the <a title="Adaptive Images on GitHub" href="https://github.com/MattWilcox/Adaptive-Images" target="_blank">source on GitHub</a>.</p>
<h3>2. Request different images using data-attributes</h3>
<p>An article by Nicolas Gallagher covers this method using CSS to detect which source would be best to use.</p>
<p>The method could work like this: You have an image which has a really small file size and is served for every device at first (mobile first approche).</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;img</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;image.jpg&quot;</span> <span style="color: #000066;">alt</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">data-src-600px</span>=<span style="color: #ff0000;">&quot;image-600px.jpg&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>

<p>Now you are going to change the file if the screen is bigger by using the <code>content</code>-property of CSS and its <code>attr()</code> function.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #a1a100;">@media (min-device-width:600px) {</span>
    img<span style="color: #00AA00;">&#91;</span>data-src<span style="color: #933;">-600px</span><span style="color: #00AA00;">&#93;</span> <span style="color: #00AA00;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> attr<span style="color: #00AA00;">&#40;</span>data-src<span style="color: #933;">-600px</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
    <span style="color: #00AA00;">&#125;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Please have a look <a title="Responsive images using CSS3" href="http://nicolasgallagher.com/responsive-images-using-css3/" target="_blank">at the article</a> for detailed information.</p>
<p>An idea that goes beyond the replacement of images with the <code>attr()</code>-function is the usage of <code>content: url(myimage.jpg) replaced;</code>. This is something <a title="Tab Atkins' suggestion to use replaced content" href="http://lists.w3.org/Archives/Public/www-style/2011Aug/0661.html" target="_blank">suggested</a> by Tab Atkins Jr. on the W3C www-styles mailing list &#8211; called replaced content.<br />
Something about <a title="Replaced Content in the CSS-specification" href="http://www.w3.org/TR/css3-content/#replacedContent" target="_blank">replaced content</a> appears in the CSS-spec but it does not look to be exactly what Tab is referring to.</p>
<h3>3. Introduce new attributes to the &lt;img&gt;-tag</h3>
<p><a title="Anselm's website" href="http://anselm.novolo.de/">Anselm Hannemann</a> <a title="Anselm's idea on the WHATWG's Mailing list" href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-August/032977.html">shares the idea</a> of introducing a media-attribute that has some sort of &#8220;sizing-parameter&#8221;. It is supposed to be combined with the media-src-attribute which also has the sizing-parameter.<br />
The HTML could look something <a title="Gist by Anselm dealing with media- and media-src-attribute" href="https://gist.github.com/1158855" target="_blank">like this</a>:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;img</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;myimage_xs.jpg&quot;</span></span>
<span style="color: #009900;"><span style="color: #000066;">media-xs</span>=<span style="color: #ff0000;">&quot;(min-device-width:320px and max-device-width:640px)&quot;</span> <span style="color: #000066;">media-src-xs</span>=<span style="color: #ff0000;">&quot;myimage_xs.jpg&quot;</span></span>
<span style="color: #009900;"><span style="color: #000066;">media-m</span>=<span style="color: #ff0000;">&quot;(min-device-width:640px and max-device-width:1024px)&quot;</span> <span style="color: #000066;">media-src-m</span>=<span style="color: #ff0000;">&quot;myimage_m.jpg&quot;</span></span>
<span style="color: #009900;"><span style="color: #000066;">media-xl</span>=<span style="color: #ff0000;">&quot;(min-device-width:1024px)&quot;</span> <span style="color: #000066;">media-src-xl</span>=<span style="color: #ff0000;">&quot;myimage_xsl.jpg&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span></pre></div></div>

<p>As you can see the <code>media</code>-attributes contain media-queries which describe when to take a certain image-source.</p>
<h3>4. Using JavaScript</h3>
<p>There are some ideas on how to deal with this topic using JavaScript.</p>
<p>The FilamentGroup for example published its &#8220;Responsive Images&#8221;-project <a title="An Experiment with Mobile-First Images that Scale Responsively &amp; Responsibly" href="https://github.com/filamentgroup/Responsive-Images" target="_blank">on GitHub</a>. They are using &#8220;Mobile-First&#8221; to present a small-sized image on every device and replace this with JavaScript on window load.<br />
You can find out more about how it works <a title="_blank" href="http://filamentgroup.com/lab/responsive_images_experimenting_with_context_aware_image_sizing/">on their blog</a>. They also published <a title="Demo of Responsive Images" href="http://filamentgroup.com/examples/responsive-images/" target="_blank">a demo</a>.</p>
<p>Peter-Paul Koch <a title="Combining media queries and JavaScript" href="http://www.quirksmode.org/blog/archives/2010/08/combining_media.html" target="_blank">presented a possible way</a> on how to combine media queries with JavaScript. Which is not really new I think but a good summery.</p>
<p>Another approach could be a new attribute for the <code>script</code>-tag: Scott Jehl <a title="Scott Jehl's suggestion on responsive images: a `preparse`-attribute for the `script`-tag" href="https://twitter.com/#!/scottjehl/status/119836986101075968">suggested</a> to call it <code>preparse</code>. The script could then be used to replace sources in HTML fitting the current client-need.</p>
<p><img class="aligncenter" title="Bildschirmfoto 2011-11-16 um 00.04.34" src="http://drublic.de/blog/wp-content/uploads/2011/11/Bildschirmfoto-2011-11-16-um-00.04.34.png" alt="" width="654" height="263" /></p>
<h3>5. A new image-format containing different sizes</h3>
<p>People aso had the idea of creating an own image-format which contains for example four layers with different image sizes. The image then &#8220;decides&#8221; which format to take and serves this to the client without its three sibling-layers.</p>
<p>At the moment there is a format called <a title="MrSID on Wikipedia" href="http://en.wikipedia.org/wiki/MrSID" target="_blank">MrSID</a> developed by <a title="LizardTech on Wikipedia" href="http://en.wikipedia.org/wiki/LizardTech">LizardTech</a> which can have one or more compression rates.</p>
<p>Another approach is the <a title="JPEG 2000 on Wikipedia" href="http://en.wikipedia.org/wiki/JPEG_2000">JPEG 2000</a> file-format. It can carry out different optimization-levels for images. Read more about it on the Wikipedia-page I linked above.</p>
<h2>Media? But this was only about images…</h2>
<p>Yup, right! Images are just one aspect when it comes to responsive media.<br />
Videos for example are another thing. YouTube offers different video-sizes for watching. You have to choose manually which one to use. A possibility to select this resource automatically, build into the browser would be awesome!</p>
<p>JPEG 2000 has a video-equivalent developed by the same group of people as the JPEG-format called Motion JPEG 2000. Find more information about this <a href="http://www.jpeg.org/jpeg2000/j2kpart3.html" title="Motion JPEG 2000" target="_blank">here</a>.</p>
<h2>Conclusion</h2>
<p>As it turns out many developers are not aware of the problems that come up with a real responsive design &#8211; even HTML5-specification writer are <a title="Anne van Kersten calls responsive media 'a niche problem' on the W3C mailing-list" href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-August/033029.html">calling it</a> &#8220;a niche problem&#8221;. This is why it is hard to develop a specification for a native API as for example Anselm Hannemann suggests.</p>
<p>But maybe the decision which technique might be best for solving the problem of serving responsive media has to be finished first before anything is spec&#8217;d up.</p>
<h2>Moar!</h2>
<p>Some more resources where the topic is discussed:</p>
<ul>
<li>A List Apart started the whole “Responsive Design”-discussion with <a href="http://www.alistapart.com/articles/responsive-web-design" title="Responsive Web Design" target="_blank">an article</a> by Ethan Marcotte</li>
<li><a href="https://groups.google.com/forum/#!topic/jquery-standards/rl8886ZRs8o" title="Responsive images discussed by the jQuery Standards Team - Google Group" target="_blank">jQuery Standards Team</a></li>
<li><a href="http://www.webmonkey.com/2011/08/speed-up-your-responsive-designs-with-adaptive-images/" title="Scott Gilbertson - Webmonkey - about responsive images">Scott Gilbertson on Webmonkey</a></li>
<li><a href="http://csswizardry.com/2011/07/responsive-images-right-now/" title="Responsive images right now" target="_blank">Another CSS-only idea</a> by Harry Roberts</li>
</ul>
<h3>Thanks!</h3>
<p>Thanks goes out to <a title="Anselm on Twitter" href="https://twitter.com/anselmhannemann" target="_blank">Anselm</a>, for reading what I wrote and helping me with some further information.</p>
]]></content:encoded>
			<wfw:commentRss>http://drublic.de/blog/responsive-media/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>A Travel Through Time &#8211; and Back</title>
		<link>http://drublic.de/blog/a-travel-through-time-and-back/</link>
		<comments>http://drublic.de/blog/a-travel-through-time-and-back/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 02:04:37 +0000</pubDate>
		<dc:creator>Hans Christian</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[HTML WG]]></category>
		<category><![CDATA[Specification]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[W3C]]></category>

		<guid isPermaLink="false">http://drublic.de/blog/?p=519</guid>
		<description><![CDATA[Somehow… &#60;time&#62; Disappeared As you might have heard the &#60;time&#62;-element was removed from the HTML5 specification last saturday by Ian &#8220;Hixie&#8221; Hickson, the editor of the spec. Hixie decided to remove &#60;time&#62; and replace it by the more general &#60;data&#62;-element. A question that came up: Why got&#60;time&#62; removed and why did nobody stop Hixie? Well: There was a discussion on the bug-tracker about replacing &#60;time&#62; with &#60;data&#62;. But nothing about it on the mailing-list and stuff… and Hixie decided to drop &#60;time&#62; and replace it by the power he has as the editor. Not only &#60;time&#62; was removed from the specification but<p><a title="Link toA Travel Through Time - and Back" class="more-link" href="http://drublic.de/blog/a-travel-through-time-and-back/">Read more</a></p>]]></description>
			<content:encoded><![CDATA[<h2>Somehow… &lt;time&gt; Disappeared</h2>
<p>As you might have heard the <code>&lt;time&gt;</code>-element <a title="HTML5 Specification: Diff for drop `time` and replace it with `data`" href="http://html5.org/tools/web-apps-tracker?from=6782&amp;to=6783" target="_blank">was removed</a> from the HTML5 specification <a title="Oh dear, Hixie just dropped the time element from HTML5, added a replacement without any semantics. ~@peterwinnberg" href="https://twitter.com/#!/peterwinnberg/status/130193641523249152" target="_blank">last saturday</a> by Ian &#8220;Hixie&#8221; Hickson, the editor of the spec. Hixie decided to remove <code>&lt;time&gt;</code> and replace it by the more general <code>&lt;data&gt;</code>-element.</p>
<p>A question that came up: Why got<code>&lt;time&gt;</code> removed and why did nobody stop Hixie?</p>
<p>Well: There <a title="W3C Bugtracker - Consider replacing <code><time></code> with <data>" href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=13240" target="_blank">was a discussion</a> on the bug-tracker about replacing <code>&lt;time&gt;</code> with <code>&lt;data&gt;.</code> But nothing about it on the mailing-list and stuff… and Hixie decided to drop <code>&lt;time&gt;</code> and replace it by the power he has as the editor.</p>
<p>Not only <code>&lt;time&gt;</code> was removed from the specification but also its attributes <code>datetime</code> and <code>pubdate</code>. <code>pubdate</code> was the only way to indicate when a blog post or web-page was published.</p>
<p>As I'm not into the processes at W3C and WHATWG I decided to dig a little bit into it and keep track of what was going on about that issue with <code>&lt;time&gt;</code>.</p>
<h2>Awesome Effects!</h2>
<p>I collected some useful information and posted the links on <a title="More links about the removing `time` from the spec." href="https://plus.google.com/u/0/112019818423540363330/posts/gEvnpH1Jpcn" target="_blank">Google+</a>. Also <a title="`time` as topic on revision 45 of Working Draft" href="http://workingdraft.de/45/" target="_blank">we talked about this issue</a> on the (german) podcast <a title="Working Draft - A Frontend-Development Podcast" href="http://workingdraft.de/" target="_blank">Working Draft</a> on monday. I was invited by <a title="@derSchepp on Twitter" href="https://twitter.com/#!/derSchepp" target="_blank">Christian "Schepp" Schäfer</a> to discuss about some stuff with himself and <a title="Made My Day - Webdesign from Karlsruhe" href="http://www.mademyday.de/" target="_blank">Marc</a>.</p>
<p>Steve Faulkner was the first one (for what I noticed) that <a href="https://twitter.com/#!/stevefaulkner/status/130245413751111680" target="_blank">tweeted</a> <a href="https://twitter.com/#!/stevefaulkner/status/130737094715899904" target="_blank">about</a> <a href="https://twitter.com/#!/stevefaulkner/status/130745836123594752" target="_blank">that</a> intensively and was really upset by the dropping. Furthermore it was <a title="If you don't like adding of `data` and/or dropping of `time` from HTML5 do something about it, that's what the W3C HTML WG is there for ~@stevefaulkner" href="https://twitter.com/stevefaulkner/status/130598711863689217" target="_blank">his tweet</a> that encouraged me to keep track of the whole story.</p>
<p><a href="http://drublic.de/blog/wp-content/uploads/2011/11/stevefaulkner-encourage.png"><img class="aligncenter size-full wp-image-520" title="If you don't like adding of `data` and/or dropping of `time` from HTML5 do something about it, that's what the W3C HTML WG is there for ~@stevefaulkner" src="http://drublic.de/blog/wp-content/uploads/2011/11/stevefaulkner-encourage.png" alt="" width="554" height="275" /></a></p>
<p>Steve <a title="Revert Request by Steve Faulkner" href="http://lists.w3.org/Archives/Public/public-html/2011Oct/0163.html" target="_blank">explained on the the mailing-list</a> of the W3C why he likes to revert the changes made by Hixie the day before. <a href="http://lists.w3.org/Archives/Public/public-html/2011Oct/0169.html" target="_blank">Others</a> <a href="http://lists.w3.org/Archives/Public/public-html/2011Oct/0170.html" target="_blank">also</a> <a href="http://lists.w3.org/Archives/Public/public-html-comments/2011Oct/0011.html" target="_blank">liked</a> the time-element and requested a revert.</p>
<p>There were some pretty good blog posts about that topic, as for instance</p>
<ul>
<li>Bruce Lawson- <a title="Bruce Lawson's personal blog" href="http://www.brucelawson.co.uk/2011/goodbye-html5-time-hello-data/" target="_blank">Goodbye HTML5 &lt;time&gt;, hello &lt;data&gt;!</a></li>
<li>Jeremy Keith - <a title="Adactio: Timeless" href="http://adactio.com/journal/4982/" target="_blank">Timeless</a></li>
<li>Oli Studholme - <a title="Goodbye time, datetime, and pubdate. Hello date and value." href="http://html5doctor.com/time-and-data-element/" target="_blank">Goodbye time, datetime, and pubdate. Hello date and value.</a></li>
<li>Eric Eggers - Etherpad with a <a href="http://willyou.typewith.me/p/9Zl7I2dOKs" target="_blank">collection of reasons</a> to keep &lt;time&gt;</li>
<li>The &lt;time&gt;-element also got its own page: <a title="Why No Time?" href="http://whynotime.com/" target="_blank">whynotime.com</a> by <a href="https://twitter.com/jack_l_smith" target="_blank">@jack_l_smith</a></li>
</ul>
<p>As it turns out <code>&lt;time&gt;</code> is wildly in use all over the web:</p>
<ul>
<li>the WordPress twentyeleven-theme <a title="Search for `time`" href="http://core.svn.wordpress.org/trunk/wp-content/themes/twentyeleven/functions.php" target="_blank">uses it</a></li>
<li><a title="The Bosten Globe" href="http://bostonglobe.com/" target="_blank">The Boston Globe</a> makes use of it</li>
<li>I'm using it on this page</li>
<li>And many others too…</li>
</ul>
<p>As so many people where effected by the change that was made to the spec and many people though it was a bad decision there was hope that this story was not over yet… And it wasn't.</p>
<p>Again Steve Faulkner tweeted:</p>
<blockquote><p>"I feel confident that <code>&lt;time&gt;</code> will be back in the W3C HTML5 specification by the end of the week"</p>
<p>~ Steve Faulkner, 31. Oct 2011 via <a href="https://twitter.com/#!/stevefaulkner/status/130992360158007296" target="_blank">Twitter</a></p></blockquote>
<p>This was a decent statement as you can say by today.<br />
There were proposals on how to deal with <code>&lt;time&gt;</code> and how to improve it for the future and get it back into the spec. A leading role in this process is held by <a title="Tantek.com" href="http://tantek.com/" target="_blank">Tantek Çelik</a>. Read <a title="Tantek Çelik on the future of `time`" href="http://www.brucelawson.co.uk/2011/goodbye-html5-time-hello-data/#comment-836013" target="_blank">his comment</a> on Bruce Lawson's post. Also <a title="W3Conversions .:. Web Standards Coding, Accessibility and Customized Corporate Training" href="http://www.w3conversions.com/" target="_blank">Stephanie Sullivan Rewis</a> has <a title="Stephanie Sullivan Rewis on `time`" href="http://www.brucelawson.co.uk/2011/goodbye-html5-time-hello-data/#comment-835958" target="_blank">some interesting thoughts</a>.</p>
<h2>And then - the Turningpoint</h2>
<p>Currently the <a title="TPAC 2011 - W3C Meetup" href="http://www.w3.org/2011/11/TPAC/" target="_blank">TPAC 2011</a> is happening which is a conference and meeting of the W3C and its members.<br />
At <time datetime="2011-11-03T11:30Z-0700">11:30h Pacific Daytime today</time> (Please notice my use of <code>&lt;time&gt;</code> in this case. Nice, right… right?) people of the <a title="W3C HTML Working Group" href="http://www.w3.org/html/wg/" target="_blank">W3C HTML Working Group</a> met and discussed about <code>&lt;time&gt;</code> and its removal. You could have followed the discussion on IRC on W3C's channel <a title="IRC #html-wg Cannel" href="irc://irc.w3.org:6665/html-wg" target="_blank">#html-wg</a>. <a title="Minutes on `time` at TPAC 2011" href="http://www.w3.org/2011/11/03-html-wg-minutes.html#item03" target="_blank">Here</a> you can find the "minutes" (a transcription) of it. Tantek added this as a point for discussion to <a title="The TPAC Agenda" href="http://www.w3.org/html/wg/wiki/TPAC2011" target="_blank">the Agenda</a>.</time></p>
<p>As this all was said, there <a title="Revert request for r6783" href="http://lists.w3.org/Archives/Public/public-html/2011Nov/0011.html" target="_blank">was a mail</a> on the mailing-list by the Chairs of the HTML WG asking the editor of the spec (Hixie) <q>"for a revert of this change to be completed no later than the end of day on Tuesday 8th of November"</q>. If Hixie will not change this until Tuesday the Chairs will ask the W3C staff <q>"to make this change"</q>. What ever this means then… I have no idea.</p>
<p>Today Tantek began to <a title="Tantek's new requirements to `time`" href="http://www.w3.org/wiki/User:Tantekelik/time_element" target="_blank">define some new requirements</a> for the <code>&lt;time&gt;</code>-element and its attribute <code>datetime</code> (especially the syntax of the mentioned attribute).</p>
<h2>So what's the conclusion now?</h2>
<p>All the things I mentioned above show how strong the community is and how many people try to get the best out of the tools we have.</p>
<p>Hixie's decision to remove the <code>&lt;time&gt;</code>-element in favor of the <code>&lt;data&gt;</code>-element was not found democratically by everyone contributing to the HTML5 spec but was a bossy behavior.</p>
<p>Personally I learnd a lot about the process within the W3C, the WHATWG, how the specification is build, and so on asf… This was pretty good and I feel good about how things work.</p>
<p>I hope there are more people who like keep a little bit more track of what is going on with all the new stuff and be part of decisions that are made.</p>
<p>Thank you for reading all the words I wrote.</p>
<p>Thank you Steve, Tantek, thank you <a title="@yatil on Twitter" href="https://twitter.com/#!/yatil" target="_blank">Eric Eggers</a>, <a title="@shelleypowers on Twitter" href="https://twitter.com/#!/shelleypowers" target="_blank">Shelley Powers</a>, thank you everyone who was able to do something about the odd removal of <code>&lt;time&gt;</code>. You guys rockkk!</p>
]]></content:encoded>
			<wfw:commentRss>http://drublic.de/blog/a-travel-through-time-and-back/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lea Verou&#8217;s Animatable</title>
		<link>http://drublic.de/blog/lea-verous-animatable/</link>
		<comments>http://drublic.de/blog/lea-verous-animatable/#comments</comments>
		<pubDate>Sun, 30 Oct 2011 15:49:05 +0000</pubDate>
		<dc:creator>Hans Christian</dc:creator>
				<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Animations]]></category>
		<category><![CDATA[perspective]]></category>
		<category><![CDATA[Transitions]]></category>

		<guid isPermaLink="false">http://drublic.de/blog/?p=512</guid>
		<description><![CDATA[Lea Verou publishes some really great stuff. Her latest work is Animatable. A tool to showcase the variety of things you can do with CSS3 animations. And it&#8217;s awesome. Some weeks ago I had this article about rotating images like I use in the footer of this page. There is an animation in Lea&#8217;s demos that makes use of the same properties. You will find some nice cutting edge CSS3-techniques in the demos so make sure to check out the source-code on GitHub. You can also contribute and check in a pull request if you want to. Edit: And by<p><a title="Link toLea Verou's Animatable" class="more-link" href="http://drublic.de/blog/lea-verous-animatable/">Read more</a></p>]]></description>
			<content:encoded><![CDATA[<p><a title="Lea Verou | Life at the bleeding edge (of web standards)" href="http://leaverou.me/" target="_blank">Lea Verou</a> publishes some really great stuff. Her latest work is <a title="Animatable: One property, two values, endless possiblities" href="http://leaverou.github.com/animatable" target="_blank">Animatable</a>. A tool to showcase the variety of things you can do with CSS3 animations. And it&#8217;s awesome.</p>
<p>Some weeks ago I had this article about <a title="CSS3: Rotate Images on Click" href="http://drublic.de/blog/css3-rotate-images-on-click/" target="_blank">rotating images</a> like I use in the footer of this page. <a title="transform - from perspective(400) rotateY(0deg) to perspective(400) rotateY(360deg)" href="http://leaverou.github.com/animatable/#transform/5" target="_blank">There is an animation</a> in Lea&#8217;s demos that makes use of the same properties.</p>
<p>You will find some nice cutting edge CSS3-techniques in the demos so make sure to check out the <a title="Animatable on GitHub" href="https://github.com/LeaVerou/animatable" target="_blank">source-code on GitHub</a>. You can also contribute and check in a pull request if you want to.</p>
<p><strong>Edit</strong>: And by the way… Lea <a title="Animatable: A CSS transitions gallery" href="http://leaverou.me/2011/10/animatable-a-css-transitions-gallery/" target="_blank">writes about her idea</a> :)</p>
]]></content:encoded>
			<wfw:commentRss>http://drublic.de/blog/lea-verous-animatable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Build an Accordion-Menu using CSS and a bit of jQuery</title>
		<link>http://drublic.de/blog/how-to-build-accordion-using-css-and-jquery/</link>
		<comments>http://drublic.de/blog/how-to-build-accordion-using-css-and-jquery/#comments</comments>
		<pubDate>Sun, 23 Oct 2011 12:32:37 +0000</pubDate>
		<dc:creator>Hans Christian</dc:creator>
				<category><![CDATA[HTML5]]></category>

		<guid isPermaLink="false">http://drublic.de/blog/?p=485</guid>
		<description><![CDATA[We&#8217;re doing a project these days where we use an accordion-menu to show some content. I want to share with you how I did this using jQuery and CSS. This is pretty easy and I want to encourage you not to use any plugin or so but to write the code yourself and learn a bit more about how to use CSS and jQuery and save some microseconds on your loading type. The HTML This is kinda straightforward I think. We don&#8217;t need a wrapper for the accordion-menu. Check it: &#60;section id=&#34;experts&#34; class=&#34;accordion-item&#34;&#62; &#60;h1&#62;&#60;a href=&#34;#experts&#34;&#62;Experts&#60;/a&#62;&#60;/h1&#62; &#60;div class=&#34;content&#34;&#62;&#60;/div&#62; &#60;/section&#62; This is<p><a title="Link toHow to Build an Accordion-Menu using CSS and a bit of jQuery" class="more-link" href="http://drublic.de/blog/how-to-build-accordion-using-css-and-jquery/">Read more</a></p>]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re doing a project these days where we use an accordion-menu to show some content.<br />
I want to share with you how I did this using jQuery and CSS. This is pretty easy and I want to encourage you not to use any plugin or so but to write the code yourself and learn a bit more about how to use CSS and jQuery and save some microseconds on your loading type.</p>
<h2>The HTML</h2>
<p>This is kinda straightforward I think. We don&#8217;t need a wrapper for the accordion-menu. Check it:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;section</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;experts&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;accordion-item&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;h1<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#experts&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Experts<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/h1<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;content&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/section<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>This is how every item for your accordion should look like.</p>
<h2>The CSS-Part</h2>
<p>Some basic CSS-rules for the header and the content of each item.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.accordion-item</span> h1 a <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1.5em</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.accordion-item</span> .<span style="color: #000000; font-weight: bold;">content</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>You may want to do at least a bit more on the styles but that&#8217;s up to everybody on its own.</p>
<p>We want to keep this accordion accessible for people who don&#8217;t use JavaScript, what is kinda unusual these days I think… but you never know!<br />
That&#8217;s why we added an <code>id</code> to each accordion-item and link to this section in the headline through <code>#experts</code> for instance. We can now show the content of the requested <code>id</code> with CSS:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #3333ff;">:target </span>.<span style="color: #000000; font-weight: bold;">content</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>So we&#8217;re all set up with the accordion. We can now add some effects with JavaScript.</p>
<h2>Using jQuery</h2>
<p>First, we will add a line that will show the content of the first element on load:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.accordion-item'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">eq</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'current'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">find</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.content'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>And than the we will listen to clicks on the headlines and do some actions afterwards. Read the comments in this snipped.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// Listen to click on headline-link</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.accordion-item h1 a'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #006600; font-style: italic;">// prevent auto scrolling to id</span>
  e.<span style="color: #660066;">preventDefault</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #006600; font-style: italic;">// Register the variables for better performance</span>
  <span style="color: #003366; font-weight: bold;">var</span> $parent <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">closest</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.accordion-item'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
      $content <span style="color: #339933;">=</span> $parent.<span style="color: #660066;">find</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.content'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #006600; font-style: italic;">// If the clicked section is not the active one</span>
  <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>$parent.<span style="color: #660066;">hasClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'current'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// SlideUp &quot;old&quot; and remove class</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.accordion-item.current .content'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">slideUp</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
      .<span style="color: #660066;">parent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'current'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// Add class and slide down content</span>
    $parent.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'current'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    $content.<span style="color: #660066;">slideDown</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #006600; font-style: italic;">// If the click was triggered on the currently active section</span>
  <span style="color: #006600; font-style: italic;">// remove the class and slide up content</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
    $parent.<span style="color: #660066;">removeClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'current'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    $content.<span style="color: #660066;">slideUp</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>And this is it I guess. Working pretty much in every available browser. The CSS <code>:target</code> pseudo-class is not available in every browser though, as it is a CSS3-pseudo-class. And now guess which browser this might be… Right Internet Explorer. It is supported with version 9 but not before.<br />
You will find more information about <code>:target</code> <a href="http://www.w3.org/TR/selectors/#target-pseudo" target="_blank" title="The :target-pseudo-class">in the spec</a>. Check out the <a href="http://caniuse.com/#search=target" target="_blank" title="When can I use ':target'?">Can I Use</a> table on CSS3-Selectors.</p>
<h2>Download the files</h2>
<p>I&#8217;ve made a demo of this on jsFiddle. Play around a little bit or download the files, if you want to.<br />
<a href="http://fiddle.jshell.net/drublic/j4wYw/" title="Demo" class="button">Demo</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://drublic.de/blog/wp-content/uploads/2011/10/accordion-menu-css.zip" title="Download" class="button">Download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://drublic.de/blog/how-to-build-accordion-using-css-and-jquery/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Resize Elements with CSS3</title>
		<link>http://drublic.de/blog/restrict-textareas-resize-css3/</link>
		<comments>http://drublic.de/blog/restrict-textareas-resize-css3/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 18:02:37 +0000</pubDate>
		<dc:creator>Hans Christian</dc:creator>
				<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[property]]></category>
		<category><![CDATA[resize]]></category>

		<guid isPermaLink="false">http://drublic.de/blog/?p=179</guid>
		<description><![CDATA[The CSS3-spec is full of wonderful things. Sometimes things that are not so desperately needed as others but anyway… good to have them. One of these more or less needed properties might be resize. It is part of the CSS3 Basic User Interface Module. What is really useful with resize is the ability to restrict the resizing of textarea for example. But it is possible to resize every element you&#8217;d like to as this demo by Simurai shows. There are four values for resize that are kinda logical: none: no resizing at all horizontal: resizing only horizontal vertical: resizing only…<p><a title="Link toResize Elements with CSS3" class="more-link" href="http://drublic.de/blog/restrict-textareas-resize-css3/">Read more</a></p>]]></description>
			<content:encoded><![CDATA[<p>The CSS3-spec is full of wonderful things. Sometimes things that are not so desperately needed as others but anyway… good to have them.</p>
<p>One of these more or less needed properties might be <code>resize</code>. It is part of the <a title="CSS3 Specification: User Interface Module" href="http://www.w3.org/TR/css3-ui/" target="_blank">CSS3 Basic User Interface Module</a>. What is really useful with <code>resize</code> is the ability to restrict the resizing of <code>textarea</code> for example. But it is possible to resize every element you&#8217;d like to as <a title="A demo of resize for a div" href="http://jsfiddle.net/simurai/baBN9/" target="_blank">this demo</a> by <a title="@simurai on Twitter" href="http://twitter.com/simurai" target="_blank">Simurai</a> shows.</p>
<p>There are four values for <code>resize</code> that are kinda logical:</p>
<ul>
<li><code>none</code>: no resizing at all</li>
<li><code>horizontal</code>: resizing only horizontal</li>
<li><code>vertical</code>: resizing only… vertical</li>
<li><code>both</code>: yeah, well… pretty obvious, right?!</li>
</ul>
<p><a title="Robert's talk" href="http://robertnyman.com/" target="_blank">Robert Nyman</a> created <a title="Demo: CSS3 resizing" href="http://robertnyman.com/css3/resize/resize.html" target="_blank">this demo</a> using the <code>resize</code>-property. You should also check out <a title="The CSS3 resize property" href="http://www.impressivewebs.com/css3-resize/" target="_blank">Louis&#8217; article</a> that&#8217;s pretty great. And: the <a title="resize on MDN" href="https://developer.mozilla.org/en/CSS/resize" target="_blank">MDN docs</a> about <code>resize</code>. You can also read more about this topic at <a href="http://stackoverflow.com/questions/1837926/css3-resize-in-webkit-safari" target="_blank">Stackoverflow</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://drublic.de/blog/restrict-textareas-resize-css3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

