<?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>css3files.com</title>
	<atom:link href="http://www.css3files.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.css3files.com</link>
	<description>CSS3 properties exposed</description>
	<lastBuildDate>Thu, 04 Apr 2013 06:06:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>Web-tools I love</title>
		<link>http://www.css3files.com/2013/04/04/web-tools-i-love/</link>
		<comments>http://www.css3files.com/2013/04/04/web-tools-i-love/#comm</comments>
		<pubDate>Thu, 04 Apr 2013 05:56:15 +0000</pubDate>
		<dc:creator>Christian Krammer</dc:creator>
				<category><![CDATA[Allgemein]]></category>

		<guid isPermaLink="false">http://www.css3files.com/?p=1708</guid>
		<description><![CDATA[<p>"You are nothing without your tools". Although this sentence is a bit rough, it also bears some truth. Nobody can do good work, if she hasn't proper tools to aid the creation process. Like at every other profession, there are also tools that aid us web designers at our work. Through the course of my career I have used many of them, some of them longer, some shorter. But recently I really contracted a passion for a few tools I use.</p> <div class="more"><a href="http://www.css3files.com/2013/04/04/web-tools-i-love/">Continue reading</a></div>]]></description>
			<content:encoded><![CDATA[<p>&#8220;You are nothing without your tools&#8221;. Although this sentence is a bit rough, it also bears some truth. Nobody can do good work, if she hasn&#8217;t proper tools to aid the creation process. Like at every other profession, there are also tools that aid us web designers at our work. Through the course of my career I have used many of them, some of them longer, some shorter. But recently I really contracted a passion for a few tools I use. </p>
<p>First and foremost I couldn&#8217;t live anymore without <a href="http://www.google.com/intl/de/chrome/browser/"><strong>Chrome</strong></a>. It&#8217;s sort of a homebase for me, without it I don&#8217;t feel comfy. It is not only the most progressive browser out there, but also has some great developer tools, built in synchronize functionality and is lightning-fast to use and load. Great to see, that more and more people adapt this browser for their everyday surfing. </p>
<p>Although I don&#8217;t exactly love it, but I also couldn&#8217;t live without <a href="adobe.com/photoshop"><strong>Photoshop</strong></a>. A kind of love-hate relationship connects me with this behemoth of an application. Adobe&#8217;s bestseller is so buggy and so laggy and bloated, but at the same time it is also so powerful, helpful and essential for my profession. Probably it will lose momentum in the future and the design process of a website will more and more move directly into the browser, but for certain task, especially &#8220;non-flat&#8221; website, it will forever be an essential tool. </p>
<p>One of the &#8220;apps&#8221; I use that I truly and dearly love is <a href="http://www.sublimetext.com/2"><strong>Sublime Text 2</strong></a>. It totally changed the way I write code and simplified this task so incredibly. I&#8217;ve first seen it in a <a href="https://tutsplus.com/course/30-days-to-learn-jquery/">Tuts+ tutorial</a> where Jeffrey Way used it and the desire to try it out grew with every minute. I didn&#8217;t regret it to date. Of course it has a very steep learning curve and takes some time and sweat until you have tailored it to your needs. But as soon as this point is passed, it&#8217;s so incredibly helpful, easy to use and essential for your job. You can read my &#8220;love letter&#8221; to it <a href="http://designmodo.com/sublime-text-2/">here</a>.</p>
<p>The newest addition to my favorites is <a href="http://typecast.com/"><strong>Typecast App</strong></a>. Although I participated in the beta test, I didn&#8217;t exactly know how it could fit into my design process. Luckily I changed my job and so I finally have a reason to integrate it employ it regularely. Gone are the days when you need to fiddle about with different font files to test out which font works best for a design or a combination with another one. The best thing is that Typecast App features almost every font out there available at a font service and therefore the possibilities are endless. It&#8217;s fast, it&#8217;s easy to use and lately it also includes a Pro plan for fonts.com. Which directly leads me to my next tool. </p>
<p><a href="http://www.fonts.com/web-fonts"><strong>fonts.com Web fonts</strong></a> is another &#8220;classic&#8221; for me. If you are interested in fonts and foremost in some of the best fonts invented to date, you won&#8217;t come around this service. Although the website is a bit clunky and sometimes buggy, the range of available fonts is incredible. Frutiger, Helvetica, Futura, Avenir, Trade Gothic, Univers, ITC Avant Garde, Gill Sans, Optima, just to name a few. If these fonts make you feel cosy just like me, you definitely need an account at fonts.com. Unfortunately I won&#8217;t have to do that much with fonts anymore at my new job. </p>
<p>Besides Sublime Text another tool that absolutely changed the way how I develop websites is <a href="http://sass-lang.com/"><strong>SASS</strong></a>. First I thought that it&#8217;s just a cheap mask to hide the real problems of CSS, but now I know that it&#8217;s the one true way to write CSS. Although I don&#8217;t use it in the least, the few features I actually employ &#8211; like nesting, variables, mix-ins, extends, media query bubbling &#8211; make my life so much easier. Nesting alone is a huge time-saver and a reason to try out the pre-processor. Luckily there are tools like <a href="http://compass.handlino.com/">Compass.app</a> which protect me from the nightmares of the command line. </p>
<p>The next tool is probably the one where the most people would agree that it is one of the best innovations to date: <a href="dropbox.com"><strong>Dropbox</strong></a>. The ability to access your data at any time, at any place and on any device is a little bit like magic. The bonus of a &#8220;free&#8221; backup and the possibility to restore any state of your files if you wish to make it my absolute number one. So small but so powerful. </p>
<p>Lately I have also discoved a new favorite: <a href="http://inkscape.org"><strong>Inkscape</strong></a>. I didn&#8217;t know that there is a free alternative to Illustrator and Corel Draw, that&#8217;s actually so powerful and easy to use &#8211; and, like I said before, free. Especially with the rise of icon fonts and their preferred file format SVG it&#8217;s often essential to change some details of them or simply transfer them to a PNG. Inkscape is &#8220;your man&#8221; for such occasions. A strong bonus point is that you also can save SVG files as an EPS so that they re ready to use within Photoshop and don&#8217;t lose details. </p>
<p>Speaking of icon fonts: The one App you will ever need if you have to deal with icon fonts is <a href="http://icomoon.io/app/"><strong>icomoon</strong></a>. The library of different icons is huge, it lets you add your own icons and you can also download them for other usage. And if you invest a little bit of money and buy a <a href="http://icomoon.io/#cdn">paid plan</a> it&#8217;s also incredibly easy to use. Whenever I open the App in my browser I&#8217;m again astonished what websites (respectively web apps) are capable of meanwhile.</p>
<p>Lastly there is a programme which almost is a substitute for my brain and lets me easily collect things: <a href="http://evernote.com"><strong>Evernote</strong></a>. It&#8217;s also an App which I totally underestimated before. Whenever I see an interesting website, I add it to Evernote, whenver I learn something new, I add it to Evernote, whenever I want to make sure that I don&#8217;t forget something, right, I add it to Evernote.</p>
<p>So, which are the tools you couldn&#8217;t live without? Please share them at the comments. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.css3files.com/2013/04/04/web-tools-i-love/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>From a list to a box</title>
		<link>http://www.css3files.com/2013/03/08/from-a-list-to-a-box/</link>
		<comments>http://www.css3files.com/2013/03/08/from-a-list-to-a-box/#comm</comments>
		<pubDate>Fri, 08 Mar 2013 21:38:57 +0000</pubDate>
		<dc:creator>Christian Krammer</dc:creator>
				<category><![CDATA[Allgemein]]></category>

		<guid isPermaLink="false">http://www.css3files.com/?p=1696</guid>
		<description><![CDATA[<p>The trickiest part in responsive design in my eyes is the handling of the navigation of a website at narrow viewports. Since vertical space is precious here, it's not optimal to just depict all items, since they can take up a considerable amount of space. Therefore there are roughly two main types of how the navigational items are handled at "small" screens. The first represents the "nav icon" - usually three horizontal lines -, the second is to "pack" all the items into a select box as soon as a certain width gets undershot.</p> <div class="more"><a href="http://www.css3files.com/2013/03/08/from-a-list-to-a-box/">Continue reading</a></div>]]></description>
			<content:encoded><![CDATA[<p>The trickiest part in responsive design in my eyes is the handling of the navigation of a website at narrow viewports. Since vertical space is precious here, it&#8217;s not optimal to just depict all items, since they can take up a considerable amount of space. Therefore there are roughly two main types of how the navigational items are handled at &#8220;small&#8221; screens. The first represents the &#8220;nav icon&#8221; &#8211; usually three horizontal lines -, the second is to &#8220;pack&#8221; all the items into a select box as soon as a certain width gets undershot.</p>
<p>Although I use the former on <a href="http://chriskrammer.com">chriskrammer.com</a>, I&#8217;m not so sure if it&#8217;s the best fit anymore. That Chrome uses the same icon for its preferences represents just a minor glitch, what matters more in my eyes is that the handling can be pretty sophisticated, and that it first has to be learned by the people. Whereas the tried and tested select box is almost as old as the Personal Computer and therefore grounded in everybody&#8217;s mind. So why should we introduce a new element if there&#8217;s already one available?</p>
<p>I think that the main problem of the select box is its implemetation. Either you include it &#8211; hidden &#8211; into your source code and show it as soon as a certain breapoint is due or you automatically assemble it based on the the navigation list. The former just needs CSS, but means a &#8220;suporflous&#8221; element. The latter depends on jQuery, but since it&#8217;s only an assistance for the user and if JavaScript isn&#8217;t available, the common navigation will be shown with and no harm done here. Since I also was in the situation recently that I needed such a handling I deceided to go for the select box and develop a little jQuery script which automatically translates a <code>&lt;ul&gt;</code> list into a <code>&lt;select&gt;</code> box at a certain breakpoint. Besides <a href="http://jquery.com/">jQuery</a> you will also need <a href="http://modernizr.com/">Modernizr</a>.</p>
<h3>The script</h3>
<p>Although it may sound complicated at first, the actual script is not that difficult.</p>
<pre>var width = jQuery(window).width(); // 1
var mq = Modernizr.mq('only all'); // 2</pre>
<p>First I check the width of the window (1) and if media queries are generally available (2).</p>
<pre>if(Modernizr.mq('all and (max-width: 40em)') || (width &lt; 1000 &#038;&#038; mq == false)) { ... }</pre>
<p>To determine when the script should be performed I use two different conditions. You may notice that two different widths are stated, that&#8217;s for a reason. The first is for &#8220;advanced&#8221; browsers with media query support (<code>max-width: 40em</code>), which only need to fall back to a select box very late. The second (<code>width &lt; 1000</code>) is for &#8220;archaic&#8221; browsers (yes you, IE, but also less capable mobile phones and the like), which don&#8217;t have the possibilities of media querys to rearrange the elements of a site. <code>mq == false</code> just states the unavailibility of media queries. Of course I could also simple rely on the window width for both conditions, but it feels better to test browsers capable of media queries just for that.</p>
<pre>var content = '';</pre>
<p>An empty variable is invoked, which will hold the generated select box later. Now things get a little bit tricky &#8230;</p>
<pre>$('#site-navigation').find('ul').find('a').each(function() { ... })</pre>
<p>For every link which is within an <code>&lt;ul&gt;</code>, which is inside an element with the ID <code>site-navigation</code> the following code will be performed.</p>
<pre>var href = $(this).attr('href');</pre>
<p>The respective <code>href</code> attribute of the link is saved into the variable <code>href</code>.</p>
<pre>var html = $(this).html();</pre>
<p>The content of the respective link is saved into the variable <code>html</code>.</p>
<pre>content += '&lt;option value="' + href + '"&gt;' + html + '&lt;/option&gt;';</pre>
<p>And now the <code>&lt;option&gt;</code> tags are composed and appended to the variable <code>content</code> which we set up earlier. </p>
<pre>.end().replaceWith('&lt;select id="navsel"&gt;' + content + '&lt;/select&gt;');</pre>
<p>Finally the actual navigation list is replaced with the only just generated select box. The <code>end()</code> method just jumps back from the link to the <code>&lt;ul&gt;</code>. </p>
<pre>$('#navsel').on('change', function() {
	location.href = $(this).attr('value');
});</pre>
<p>Since the select box (which we assigned the ID <code>navsel</code> earlier) should also do something when an entry is selected we tell it to go to the link inserted into the value attribute above.</p>
<p>And that&#8217;s all. Now the whole thing.</p>
<pre>var width = $(window).width();
var mq = Modernizr.mq('only all');
if(Modernizr.mq('all and (max-width: 40em)') || (width &lt; 1000 &#038;&#038; mq == false)) {
	var content = '';
	$('#site-navigation').find('ul').find('a').each(function() {
		var href = $(this).attr('href');
		var html = $(this).html();
		content += '&lt;option value="' + href + '"&gt;' + html + '&lt;/option&gt;';
	}).end().replaceWith('&lt;select id="navsel"&gt;' + content + '&lt;/select&gt;');

	$('#navsel').on('change', function() {
		location.href = $(this).attr('value');
	});
}</pre>
<p>You can test-drive the script <a href="http://codepen.io/edge0703/pen/pKmvE">here</a>. Resize the window so that&#8217;s it&#8217;s smaller than 640px (40em), reload the page and you should see a select box instead of the navigation list. A little disadvantage is that the change from the navigation list to the select box doesn&#8217;t occur in real time but only at a page reload. But since a common user doesn&#8217;t resize a website to check its media queries but will invoke the page at a certain width that should be no big issue.</p>
<p>If you have some improvement suggestions or questions please post them into the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.css3files.com/2013/03/08/from-a-list-to-a-box/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Design is all about aestethics, right?</title>
		<link>http://www.css3files.com/2013/02/12/design-is-all-about-aestethics-right/</link>
		<comments>http://www.css3files.com/2013/02/12/design-is-all-about-aestethics-right/#comm</comments>
		<pubDate>Tue, 12 Feb 2013 21:09:08 +0000</pubDate>
		<dc:creator>Christian Krammer</dc:creator>
				<category><![CDATA[Allgemein]]></category>

		<guid isPermaLink="false">http://www.css3files.com/?p=1670</guid>
		<description><![CDATA[<p>Do you know this problem: You see something, a whole design, an element, on another website and think "Wow, this looks great, I'd like to employ that in a future project of mine." And then, the big moment comes, when you start to layout a site and want to use the named "inspirational object". You try and try, you move elements across the screen, you test different styles, but the end result is never quite the same like you have seen it on this other side. The "spark" misses. But why is this so?</p> <div class="more"><a href="http://www.css3files.com/2013/02/12/design-is-all-about-aestethics-right/">Continue reading</a></div>]]></description>
			<content:encoded><![CDATA[<p>Do you know this problem: You see something, a whole design, an element, on another website and think &#8220;Wow, this looks great, I&#8217;d like to employ that in a future project of mine.&#8221; And then, the big moment comes, when you start to layout a site and want to use the named &#8220;inspirational object&#8221;. You try and try, you move elements across the screen, you test different styles, but the end result is never quite the same like you have seen it on this other side. The &#8220;spark&#8221; misses. But why is this so?</p>
<p>Am I just a bad designer? Or is it &#8211; like they say &#8211; that a design is more than the sum of its parts, and you just can rip a part out of anything and hope that it will work just like that? Of course it is, a design is a well considered package of different choices, of choices made together with the client, of countless iterations and, above all, design isn&#8217;t just &#8220;aesthetics&#8221; or &#8220;decoration&#8221;. Unfortunately a notion, which many bosses, managers and mostly clients still advocate. This needs to change! I myself am bound into this tight cage, to this perception, and it&#8217;s hard to break free from it because a beautiful picture is all that matters about a website. There is also a <a href="http://vimeo.com/channels/smashingconf/55339166">talk from Andy Clarke</a> which deals about pretty much the same and made me wish that things were different for me. Do you know that situation? What do you think about it? I&#8217;d like to discuss it with you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.css3files.com/2013/02/12/design-is-all-about-aestethics-right/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My article about &#8220;Flexbox&#8221; at SitePoint</title>
		<link>http://www.sitepoint.com/flexbox-css-flexible-box-layout/</link>
		<comments>http://www.sitepoint.com/flexbox-css-flexible-box-layout/#comm</comments>
		<pubDate>Mon, 04 Feb 2013 12:49:32 +0000</pubDate>
		<dc:creator>Christian Krammer</dc:creator>
				<category><![CDATA[Allgemein]]></category>

		<guid isPermaLink="false">http://www.css3files.com/?p=1689</guid>
		<description><![CDATA[After a long time I&#8217;ve once again written a lengthy article for a commercial magazine. Since I&#8217;ve tinkered with Flexbox lately, I decided to write about this layout method. Although it should initially be published by the .net magazine there was a little misunderstanding in the end and so SitePoint gladly released it. You can read the article here.]]></description>
			<content:encoded><![CDATA[<p>After a long time I&#8217;ve once again written a lengthy article for a commercial magazine. Since I&#8217;ve tinkered with Flexbox lately, I decided to write about this layout method. Although it should initially be published by the .net magazine there was a little misunderstanding in the end and so SitePoint gladly released it. You can <a href="http://www.sitepoint.com/flexbox-css-flexible-box-layout/">read the article here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/flexbox-css-flexible-box-layout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to: responsive image bar</title>
		<link>http://www.css3files.com/2013/01/16/how-to-responsive-image-bar/</link>
		<comments>http://www.css3files.com/2013/01/16/how-to-responsive-image-bar/#comm</comments>
		<pubDate>Wed, 16 Jan 2013 12:39:35 +0000</pubDate>
		<dc:creator>Christian Krammer</dc:creator>
				<category><![CDATA[Allgemein]]></category>

		<guid isPermaLink="false">http://www.css3files.com/?p=1658</guid>
		<description><![CDATA[<p>There are certain code patterns which you need again and again as a web-designer. One of them is probably an image bar with some images located side by side. This by itself isn't difficult, but if you need a fixed width for the whole bar you have to do some calculations, especially when gaps are involved. Wouldn't it be nice to be able to specify a percentage for the images, for example 25% if you want four images side by side, and also define a gutter absolutely independent from this total width? Well, then read on please. </p> <div class="more"><a href="http://www.css3files.com/2013/01/16/how-to-responsive-image-bar/">Continue reading</a></div>]]></description>
			<content:encoded><![CDATA[<p>There are certain code patterns which you need again and again as a web-designer. One of them is probably an image bar with some images located side by side. This by itself isn&#8217;t difficult, but if you need a fixed width for the whole bar you have to do some calculations, especially when gaps are involved. Wouldn&#8217;t it be nice to be able to specify a percentage for the images, for example 25% if you want four images side by side, and also define a gutter absolutely independent from this total width? Well, then read on please. </p>
<p>I&#8217;ve prepared <a href="http://codepen.io/edge0703/pen/fnqud">a little example</a> which showcases this type of pattern. Four images, located in an unordered list with floated list items, each 25% wide and width a gutter of 3% in bet-between. To be able to set the width this way without the need to care for the gutters needs a few preparations:</p>
<ol>
<li>Set the <code>box-sizing</code> to <code>border-box</code> so that the padding of the items isn&#8217;t added to the width (don&#8217;t forget about <code>-moz-box-sizing</code> for Firefox).</li>
<li>Define the gutter with paddings instead of margins (3%).</li>
<li>Give the list itself a negative margin of -3% so that the padding of the first item gets &#8220;swallowed&#8221; and isn&#8217;t displayed.</li>
</ul>
<p>If you want the bar to be responsive just set the images to <code>max-width: 100%</code> and it always fills the whole window. But it&#8217;s also possible to specifiy a width for the bar. Wrap everything inside a container (<code>&lt;div class="container"&gt;</code>) and assign a width to it: a fixed width (<code>600px</code>) is possible just like a relative width (<code>60%</code>). Works in pretty every browser, even IE down to version 8.</p>
<p>This way an arbitrary number of items next to each other is possible. If you need five, set the width of the &lt;li&gt; to <code>20%</code>, for three items use <code>33.33%</code>. No more calculations, just one simple percentage value.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.css3files.com/2013/01/16/how-to-responsive-image-bar/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Form validation done right</title>
		<link>http://www.css3files.com/2012/12/14/form-validation-done-right/</link>
		<comments>http://www.css3files.com/2012/12/14/form-validation-done-right/#comm</comments>
		<pubDate>Fri, 14 Dec 2012 22:23:44 +0000</pubDate>
		<dc:creator>Christian Krammer</dc:creator>
				<category><![CDATA[Allgemein]]></category>

		<guid isPermaLink="false">http://www.css3files.com/?p=1635</guid>
		<description><![CDATA[<p>One of most useful additions of HTML5 is definitely the built-in form validation. No more complicated scripts, just set the <code>required</code> attribute and you are ready to go. Unfortunately there's a snag to it: the current state of form validation is pretty mediocre. While the "trinity" Chrome, Firefox and Opera all bring decent support, Safari stays far behind and the only Internet Explorer capable of this feature is IE10. So what to do now if you want to validate a form so that it works in every browser?</p> <div class="more"><a href="http://www.css3files.com/2012/12/14/form-validation-done-right/">Continue reading</a></div>]]></description>
			<content:encoded><![CDATA[<p>One of most useful additions of HTML5 is definitely the built-in form validation. No more complicated scripts, just set the <code>required</code> attribute and you are ready to go. Unfortunately there&#8217;s a snag to it: the current state of form validation is pretty mediocre. While the &#8220;trinity&#8221; Chrome, Firefox and Opera all bring decent support, Safari stays far behind and the only Internet Explorer capable of this feature is IE10. So what to do now if you want to validate a form so that it works in every browser?</p>
<p>Of course you could relapse to jQuery and use one of the many ready-made plugins, but that&#8217;s anything but future-proof. Definitely the way to go is to let the capable browser do their native thing and for the rest resort to a <a href="http://remysharp.com/2010/10/08/what-is-a-polyfill/">polyfill</a>. The downside: JavaScript and jQuery are still needed, but the time will come when you can purely rely on the native support of the browsers and chuck out the script. So what do we need to validate a form in the the said way? </p>
<h3>The official way</h3>
<p>For the &#8220;modern&#8221; browsers the only thing really needed for validation is the <code>required</code> attribute:</p>
<pre>&lt;input type="email" required/&gt;</pre>
<p>Since that&#8217;s a boolean attribute you don&#8217;t need to set a value. Admittedly you get a different error message for every browser, but the result is what matters. Beyond that you can also use the <code>title</code> attribute to set a custom message that gets displayed alongside the default message:</p>
<pre>&lt;input type="email" required title="You really need to fill out this field!"/&gt;</pre>
<p>Unfortunately Chrome is the only one to display this custom message at the moment. </p>
<p>But how to tell the browser which content is actually allowed to be inputted? That&#8217;s when the pattern attribute comes into play. It takes a regular expression as a value:</p>
<pre>&lt;input type="email" required title="You really need to fill out this field!" pattern="[0-9]{4}"/&gt;</pre>
<p>In this case a four-digit combination of numbers needs to be inserted. If you are not that into this kind of stuff, you can visit the excellent website <a href="http://html5pattern.com">html5pattern.com</a> which gives you a wealth of different patterns.</p>
<h3>Let&#8217;s polyfill</h3>
<p>Now that we&#8217;ve taken care of the modern guys let&#8217;s turn towards the retarded pals. Although there are a few <a href="https://github.com/dperini/nwxforms">different</a> <a href="https://github.com/ryanseddon/H5F">polyfills</a> to choose from the most feasible one is the <a href="http://afarkas.github.com/webshim/demos/index.html">WEBSHIMS LIB</a>, a collection of numerous polyfills for the not-so-capable browsers. Basically the employment is pretty simple: Load up <a href="http://modernizr.com/download/">Modernizr</a>, <a href="http://jquery.com/">jQuery</a> and the <a href="https://github.com/aFarkas/webshim/downloads">WEBSHIM polyfill</a> (polyfiller.js) and add the script to the <code>&lt;head&gt;</code> of your website:</p>
<pre>&lt;script>
     $.webshims.polyfill();
&lt;/script&gt;</pre>
<p>Now browsers with no native support for form validation will show a nice little error message for every required field. Unfortunately there&#8217;s a little drawback: pretty every browser with native support gives you a different text. Wouldn&#8217;t it be nice to get a a nice uniform one for every single one? That&#8217;s when the WEBSHIMS LIB also assists modern browsers. </p>
<p>Just expand the above invocation with a few lines:</p>
<pre>&lt;script&gt;
	$.webshims.setOptions('forms', {
		overrideMessages: true
	});
	$.webshims.setOptions({
		waitReady: false
	});
	$.webshims.polyfill();
&lt;/script&gt;</pre>
<p>Now you get the same text for every browser, even with language support. Here&#8217;s an <a href="http://www.css3files.com/playground/forms/form.html">example</a> for such a form.</p>
<p>To go one step further you can also instruct the script to use the same appearance for the error messages for every single browser:</p>
<pre>&lt;script&gt;
	$.webshims.setOptions('forms', {
		overrideMessages: true,
		replaceValidationUI: true
	});
	$.webshims.setOptions({
		waitReady: false
	});
	$.webshims.polyfill();
&lt;/script&gt;</pre>
<p>Neat, huh? To change this appearance use the CSS classes <code>.validity-alert-wrapper .va-arrow</code> (for the arrow) and <code>.validity-alert-wrapper .va-box</code> (for the container itself).</p>
<p>Additionally the WEBSHIMS LIB also enables a few other features for legacy browsers like a date picker. If you often have to deal with forms and especially their validation you should check out this polyfill. It&#8217;s very powerful and can both assist modern and legacy browsers. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.css3files.com/2012/12/14/form-validation-done-right/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Relative is the new absolute: the rem unit</title>
		<link>http://www.css3files.com/2012/10/11/relative-is-the-new-absolute-the-rem-unit/</link>
		<comments>http://www.css3files.com/2012/10/11/relative-is-the-new-absolute-the-rem-unit/#comm</comments>
		<pubDate>Thu, 11 Oct 2012 06:50:41 +0000</pubDate>
		<dc:creator>Christian Krammer</dc:creator>
				<category><![CDATA[Allgemein]]></category>

		<guid isPermaLink="false">http://www.css3files.com/?p=1580</guid>
		<description><![CDATA[<p>For me one of the hottest things CSS3 has to offer is not an obvious one like <a href="http://www.css3files.com/animation">animations</a> or <a href="http://www.css3files.com/2012/09/24/ios6-brings-us-the-joy-of-two-new-css3-properties/">filters</a>, but a pretty inconspicuous: the <code>rem</code> unit. I recently employed it at a project for the first time and it really thrilled me. But one thing first, before I continue with my excitement. You know, these days it's recommended to use relative units (like <code>em</code>) instead of absolute ones (like <code>px</code>), because the Web's no fixed place, why should we use fixed units then?</p> <div class="more"><a href="http://www.css3files.com/2012/10/11/relative-is-the-new-absolute-the-rem-unit/">Continue reading</a></div>]]></description>
			<content:encoded><![CDATA[<p>For me one of the hottest things CSS3 has to offer is not an obvious one like <a href="http://www.css3files.com/animation">animations</a> or <a href="http://www.css3files.com/2012/09/24/ios6-brings-us-the-joy-of-two-new-css3-properties/">filters</a>, but a pretty inconspicuous: the <code>rem</code> unit. I recently employed it at a project for the first time and it really thrilled me. But one thing first, before I continue with my excitement. You know, these days it&#8217;s recommended to use relative units (like <code>em</code>) instead of absolute ones (like <code>px</code>), because the Web&#8217;s no fixed place, why should we use fixed units then?</p>
<p>Unfortunately the problem with relative units is, well, that they are relative. For one thing &ndash; and I&#8217;m speaking strictly of <code>em</code> &ndash; they are relative to their parent. So if we have an element with a <code>font-size</code> of <code>1.4em</code>, all the paddings you set in <code>em</code>s are relative to this size, which makes the math very difficult (if you strictly relate to px units or the dimensions of another element). And moreover inheritance is a big problem. If you have an <code>&lt;li&gt;</code> which is sized at <code>1.2em</code> and nest another <code>&lt;li&gt;</code> inside it, it effectively gets a <code>font-size</code> of 1.2 &times; 1.2 = <code>1.44em</code>. While the first can be helpful in some cases, say if you want the paddings always relate to their parent if things get enlarged, the latter is pretty annoying.</p>
<h3>rem is the saviour</h3>
<p>And here is where the <code>rem</code> unit comes into play. This one&#8217;s not relative to its parent but to the root (therefore &#8220;r&#8221;em) of the document, so in most cases based on a <code>font-size</code> of <code>16px</code> (which is the default for HTML documents nowadays &ndash; yep, even across browsers). Therefore every unit you want to be relative has to be divided by this factor to get the <code>rem</code> unit. So if you want all spaces and sizes on your page to be consistent and only dependent on one factor (the document) and not numerous ones (their parents), this is the unit for you. I&#8217;ve set up a <a href="http://codepen.io/edge0703/pen/Eqenm">quick demo</a> to depict this difference. The first <code>&lt;h1&gt;</code> with the class of <code>.one</code> is sized with <code>em</code>, the second with the class of <code>.two</code> with <code>rem</code> (accordingly their paddings). If you change the <code>font-size</code> of the first heading the left <code>padding</code> grows or shrinks relative to it. Whereas for the second heading the <code>padding</code> always stays the same &#8211; relative to the document. Not to mention that the <code>padding</code> for the first heading is by far larger since it&#8217;s based on the heading&#8217;s size.</p>
<p>The same goes for the aforementioned nested lists. Please have a look at another <a href="http://codepen.io/edge0703/pen/DijuC">demo</a>. Since the <code>font-size</code> for the <code>&lt;li&gt;</code>s of the first list, with the class <code>.one</code>, is set in <code>em</code>, the nested items are double the size of the non-nested (remember 1.2 &times; 1.2 = 1.44). But for the second list the nested item remains at the intended size &#8211; therefore the same as the non-nested ones (list no. three &#8211; <code>.three</code> &#8211; is for later).</p>
<h3>Why should I bother?</h3>
<p>The single most important question for you might be now: Why should I bother to size things in <code>rem</code> and not just use <code>px</code>? Well, let&#8217;s say you want to enlarge everything on your site as soon as it exceeds a certain width limit. With everything <code>rem</code> you just set the <code>font-size</code> of the <code>&lt;html&gt;</code> tag to <code>110%</code> and, magic, everything is 10% bigger. But what to do with everything <code>px</code> in this case? Good luck with that! Make a media query and overwrite every single element, that is supposed to be larger? No way! Try it out yourself in the <a href="http://codepen.io/edge0703/pen/DijuC">demo</a> from above and change the <code>font-size</code> of the <code>&lt;html&gt;</code> tag. While the first and second list adapt, the third remains at the original size.</p>
<p>However there is one pitfall: the <code>rem</code> unit is <a href="http://caniuse.com/#feat=rem">not supported</a> by Internet Explorer < 9 (and Android 1.6, if you have to bother). But there is a relatively quick fix: for every property you use <code>rem</code>, repeat it beforehand with <code>px</code> values (remember, by default <code>rem</code> = <code>px</code>/16). A bit tedious, but the only way to <code>rem</code> at the moment.</p>
<p>One thing last: the conventional <code>em</code> unit still has its right to exist, for example for the measure (the line-length) of paragraphs, which are intended to adapt relatively to the font-size and nothing else. And like I said before, if you want <code>margin</code>s or <code>padding</code>s that resize relative to its parent (and you don't care about actual pixel sizes or a relation to other elements). So, at the end of the day the <code>rem</code> unit is a valuable tool in our tool belt to tailor device- and resolution-independent layouts. I love it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.css3files.com/2012/10/11/relative-is-the-new-absolute-the-rem-unit/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>iOS6 gives us two new CSS3 properties</title>
		<link>http://www.css3files.com/2012/09/24/ios6-brings-us-the-joy-of-two-new-css3-properties/</link>
		<comments>http://www.css3files.com/2012/09/24/ios6-brings-us-the-joy-of-two-new-css3-properties/#comm</comments>
		<pubDate>Mon, 24 Sep 2012 10:11:27 +0000</pubDate>
		<dc:creator>Christian Krammer</dc:creator>
				<category><![CDATA[Allgemein]]></category>

		<guid isPermaLink="false">http://www.css3files.com/?p=1554</guid>
		<description><![CDATA[<p>It's always great when new CSS properties are supported in (desktop) browsers. But as long as this support is limited to Chrome (or Safari) it doesn't provide much benefit, since the user base isn't that broad yet (but fortunately growing). However they become really interesting as soon as they are backed up by mobile devices powered by WebKit, in this case the iPhone and iOS6. With this new operating system two new CSS3 techniques find their way into a broader audience.</p> <div class="more"><a href="http://www.css3files.com/2012/09/24/ios6-brings-us-the-joy-of-two-new-css3-properties/">Continue reading</a></div>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s always great when new CSS properties are supported in (desktop) browsers. But as long as this support is limited to Chrome (or Safari) it doesn&#8217;t provide much benefit, since the user base isn&#8217;t that broad yet (but fortunately growing). However they become really interesting as soon as they are backed up by mobile devices powered by WebKit, in this case the iPhone and iOS6. With this new operating system two new CSS3 techniques find their way into a broader audience.</p>
<h3>CSS3 filters</h3>
<p>They allow enormous manipulations of the content like blur, greyscale or the adaption of the saturation. I&#8217;ve build a <a href="http://codepen.io/edge0703/pen/vkgny">demo</a> which showcases all the available filters and their employment. You can read more about them at the <a href="https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html">official specs</a>. A totally awesome way to play around with filters is provided by Adobe&#8217;s <a href="http://html.adobe.com/webstandards/csscustomfilters/cssfilterlab/">CSS FilterLab</a>. </p>
<h3>CSS3 Cross-fade</h3>
<p>As against filters I can&#8217;t see that much potential to be a valuable CSS3 property that will be massively deployed. It&#8217;s nice to be able to blend in two different images, but the emphasis is on &#8220;nice&#8221;, not more. However to play around a bit I&#8217;ve also made a <a href="http://codepen.io/edge0703/pen/Hridk">quick demo</a>. The specs can be found <a href="http://www.w3.org/TR/2011/WD-css3-images-20110217/#cross-fade-function">here</a>.</p>
<p>Except from the iOS devices both of the techniques only work in Chrome and Safari 6 so far. Support in Firefox or IE10 is uncertain for now. </p>
<p>What do you think about them? I&#8217;m really excited about CSS3 filters, but it will take a long time until we can finally apply them in a desktop environment. But for apps it&#8217;s definitely a great addition and as good as ready to use.</p>
<p><cite>Source: <a href="http://www.mobilexweb.com/blog/iphone-5-ios-6-html5-developers">mobilexweb.com</a></cite></p>
]]></content:encoded>
			<wfw:commentRss>http://www.css3files.com/2012/09/24/ios6-brings-us-the-joy-of-two-new-css3-properties/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>What is design?</title>
		<link>http://www.css3files.com/2012/09/11/what-is-design/</link>
		<comments>http://www.css3files.com/2012/09/11/what-is-design/#comm</comments>
		<pubDate>Tue, 11 Sep 2012 11:06:26 +0000</pubDate>
		<dc:creator>Christian Krammer</dc:creator>
				<category><![CDATA[Allgemein]]></category>

		<guid isPermaLink="false">http://www.css3files.com/?p=1532</guid>
		<description><![CDATA[<p>That's a pretty good question, which even seasoned professionals can't answer properly to what I've read lately. Is it art? Is it creativity? Or is design just design, standing for itself? To my understanding it is just the latter, and only the latter. It's a fundamental, it's the base of everything we as "creatives", as web-designers, do each day. Without design no website would be structured properly, it would convey no meaning, it would be just a mess no user could decode.</p> <div class="more"><a href="http://www.css3files.com/2012/09/11/what-is-design/">Continue reading</a></div>]]></description>
			<content:encoded><![CDATA[<p>That&#8217;s a pretty good question, which even seasoned professionals can&#8217;t answer properly to what I&#8217;ve read lately. Is it art? Is it creativity? Or is design just design, standing for itself? To my understanding it is just the latter, and only the latter. It&#8217;s a fundamental, it&#8217;s the base of everything we as &#8220;creatives&#8221;, as web-designers, do each day. Without design no website would be structured properly, it would convey no meaning, it would be just a mess no user could decode. That&#8217;s really the principle of it all. A good, usable website is not about <a href="http://www.andyrutledge.com/the-design-lesson.php">gradients, drop-shadows or rounded corners</a>, it&#8217;s about the clever use of typography, color, grids, white-space, emphasis, &#8230; Since I&#8217;m pretty obsessed about design and everything involved lately I&#8217;ve read a ton of articles about it and want to share these resources with you:</p>
<h3>Articles</h3>
<ul>
<li><a href="http://www.digital-web.com/articles/principles_of_design/">The principles of design</a></li>
<li><a href="http://char.txa.cornell.edu/">Art, design and visual thinking</a></li>
<li><a href="https://www.vitsoe.com/gb/about/good-design">Dieter Rams&#8217; ten principles of design</a></li>
<li><a href="http://www.andyrutledge.com/the-design-lesson.php">The design lesson: 1 of 1</a></li>
<li><a href="http://www.andyrutledge.com/gestalt-principles-1-figure-ground-relationship.php">Gestalt principles of perception</a></li>
<li><a href="http://retinart.net/graphic-design/forget-rules-graphic-design/">Forget all the rules about graphic design</a></li>
</ul>
<h3>Books</h3>
<ul>
<li><a href="http://www.fivesimplesteps.com/products/a-practical-guide-to-designing-for-the-web">Designing for the Web</a> (<a href="http://designingfortheweb.co.uk/book/index.php">free online version</a>)</li>
<li><a href="http://www.sitepoint.com/books/design2/">The principles of beautiful web design</a></li>
<li><a href="http://www.fivesimplesteps.com/products/a-practical-guide-to-designing-the-invisible">Designing the invisible</a></li>
<li><a href="http://www.amazon.com/Universal-Principles-Design-Revised-Updated/dp/1592535879/ref=sr_1_1?ie=UTF8&#038;qid=1347359052&#038;sr=8-1&#038;keywords=universal+principles+of+design">Universal principles of design</a></li>
<li><a href="http://www.amazon.com/Elements-Typographic-Style-Robert-Bringhurst/dp/0881792063/ref=sr_1_5?s=books&#038;ie=UTF8&#038;qid=1347359075&#038;sr=1-5&#038;keywords=typography">The elements of typographic style</a></li>
</ul>
<p>If you are like me, who never enjoyed a traditional graphical education, these publications are a mine of information. But even if you consider yourself to be a seasoned, educated professional, have a look, peruse what you know (or seem to know) and be delighted at your knowledge. Another good way to test your designs skills is the <a href="http://www.andyrutledge.com/creativity-is-not-design-test-2.php">Design test 2</a> by Andy Rutledge. It may seem overwhelming at first, but if you truly call yourself a designer you should at least try it and not immediately close the current tab due to the complexity of this &#8220;test&#8221;. Here are <a href="https://www.evernote.com/shard/s43/sh/ed33aee9-6aec-45f5-b073-256f1ab486c6/9d5cf58b34db056b05cb834a6d3dbec0">my answers</a>. Try it for yourself, post your answers, let&#8217;s start a discussion about your findings, what&#8217;s right, what&#8217;s wrong, what can be done better.</p>
<p>Now I also understand why &#8220;pros&#8221; like <a href="http://elliotjaystocks.com/">Elliot Jay Stocks</a> or Andy Clarke (unfortunately his approach is not online anymore) redesign their websites to its simplest form. Back then I really couldn&#8217;t understand why they did this, but with growing knowledge I more and more understand their motives. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.css3files.com/2012/09/11/what-is-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New: Now with radial gradients</title>
		<link>/gradient</link>
		<comments>/gradient#comm</comments>
		<pubDate>Mon, 10 Sep 2012 10:44:38 +0000</pubDate>
		<dc:creator>Christian Krammer</dc:creator>
				<category><![CDATA[Allgemein]]></category>

		<guid isPermaLink="false">http://www.css3files.com/?p=1518</guid>
		<description><![CDATA[<p>I'm glad to announce that css3files.com now also provides descriptions for radial gradients, namely <a href="http://www.css3files.com/gradient/#radialgradient">radial-gradient</a> and <a href="http://www.css3files.com/gradient/#repeatingradialgradient">repeating-radial-gradient</a>. Based on this addition the site should be pretty complete now since it offers all important CSS3 properties you will need regularly. I hope everything's clear and I'd love to hear some comments about the newest additions. If you think there is an important CSS3 property still missing please tell me likewise in the <a href="http://www.css3files.com/gradient/#comm">comments</a>. </p> <div class="more"><a href="/gradient">Continue reading</a></div>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m glad to announce that <em>css3files.com</em> now also provides descriptions for radial gradients, namely <a href="http://www.css3files.com/gradient/#radialgradient">radial-gradient</a> and <a href="http://www.css3files.com/gradient/#repeatingradialgradient">repeating-radial-gradient</a>. Based on this addition the site should be pretty complete now since it offers all important CSS3 properties you will need regularly. I hope everything&#8217;s clear and I&#8217;d love to hear some comments about the newest additions. If you think there is an important CSS3 property still missing please tell me likewise in the <a href="http://www.css3files.com/gradient/#comm">comments</a>. </p>
]]></content:encoded>
			<wfw:commentRss>/gradient/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
