<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Sickdesigner.com</title>
	
	<link>http://sickdesigner.com</link>
	<description>The work and play of Radu Chelariu</description>
	<lastBuildDate>Tue, 02 Apr 2013 10:21:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Sickdesigner" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="sickdesigner" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>The rise &amp; fall of a designer’s ego</title>
		<link>http://sickdesigner.com/the-rise-fall-of-a-designers-ego/</link>
		<comments>http://sickdesigner.com/the-rise-fall-of-a-designers-ego/#comments</comments>
		<pubDate>Fri, 29 Mar 2013 07:52:49 +0000</pubDate>
		<dc:creator>Radu Chelariu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sickdesigner.com/?p=2024</guid>
		<description><![CDATA[Here's a little story about how I was once so foolish and childish as to think the world would fit in one man's hand. I briefly mention Valdemort and douche.]]></description>
				<content:encoded><![CDATA[<p>Warning: this is a semi-narrative post, and while there are some technical aspects to it, it should be read as a cautionary story, for the most part.</p>
<p>It was last year, in July. 2012. I was at my peak, I had the world in my palm and then I blew it.</p>
<p>Late 2011 I got a call from <a title="Nicola Fratter on Twitter" href="https://twitter.com/inveniodesign" target="_blank">Nicola Fratter</a>. We&#8217;d met that year in Barcelona at the <a title="The OFFF Festival in Barcelona" href="http://www.offf.ws/bcn2013/" target="_blank">OFFF</a>. We&#8217;d hit it off; him, <a title="Yari D'Areglia on Twitter" href="https://twitter.com/yariok" target="_blank">Yari D&#8217;Areglia</a>, <a title="Nicola Armellini on Twitter" href="https://twitter.com/jumpzero" target="_blank">Nicola Armellini</a> and I. We spent most of the three festival days together. It was wonderful and he mentioned, half joking, that he should organize his own conference. We encouraged it, but thought nothing of it. Then the call came.</p>
<p>Nicola invited me to speak at the conference he was organizing. He was to call it <a title="Feed The Brain Conference" href="http://www.feedthebrain.it/" target="_blank">Feed the Brain</a> and it was to be held in Venice. Venice. I always wanted to see that place, and here was my chance to finally see it and have my first time speaking experience, as well.</p>
<p>I later saw the rest of the speaker lineup. I was the noob. I remember being shocked for a while. I was going up on the same stage as <a title="Janko Jovanovic on Twitter" href="https://twitter.com/jankowarpspeed" target="_blank">Janko Jovanovic</a>, <a title="Brendan Dawes on Twitter" href="https://twitter.com/brendandawes" target="_blank">Brendan Dawes</a>, <a title="Marco Dugonjic on Twitter" href="https://twitter.com/markodugonjic" target="_blank">Marko Dugonjic</a>, <a title="Mike Kus on Twitter" href="https://twitter.com/mikekus" target="_blank">Mike Kus</a> and even Smashing&#8217;s own <a title="Vitaly Friedman on Twitter" href="https://twitter.com/smashingmag" target="_blank">Vitaly Friedman</a>. The guys from Jumpzero, Nicola Armellini and Yari D&#8217;Areglia were on the panel as well, though, as it turned out, it was only Nicola who took the stage. I knew I had to get up on that stage and be the best I could. And I had nothing.<br />
Some time passed. Quite a bit of time passed. It took me about 6 months to stumble upon a subject I deemed worthy to be spoken about in front of industry experts I almost idolize and who knows how many peers. Peers who were going to look at me and, rightfully, go &#8220;who is this douche?&#8221;.</p>
<h3>The rise</h3>
<p>It was Easter last year. I was working on the problem of determining the actual physical size of a device via Javascript (or any other accesible web technology for that matter). And what started as a simple research into an obscure peeve of mine turned into a full fledged scavenger hunt. I didn&#8217;t eat that day, I barely got any sleep.</p>
<p>I went straight for the <a title="The Resolution Media Query official spec" href="http://www.w3.org/TR/css3-mediaqueries/#resolution" target="_blank">resolution media query</a>. It didn&#8217;t work in any browser or any device/platform I tried. It seemed a bit strange that it didn&#8217;t, but I went on, trying measurement after technique. As a last resort I even looked into scaling SVGs to 100% and sniffing their width with Javascript. It made no difference. It was cold and raining outside, heavy clouds filled the sky and not a ray of sunshine shun that day, but with each step I uncovered, I felt closer and closer to a solution. Or at least an answer. That answer, as it turns out, was 96.</p>
<p>96. I kept hitting 96dpi/ppi (the web&#8217;s full of people interchangeably using these units) time and time again. And then the final <a title="A pixel is not a pixel is not a pixel" href="http://www.quirksmode.org/blog/archives/2010/04/a_pixel_is_not.html" target="_blank">nail in the coffin came</a>. Every browser presumes 96dpi devices. I was angry, sad, nearly neurotic from too much caffeine and nicotine and not enough food or water. I even called and interrupted my friend <a title="Paul Axente on Twitter" href="https://twitter.com/AxentePaul" target="_blank">Paul</a>&#8216;s Easter dinner to pick his brain. He tried but didn&#8217;t manage to calm me down. A few more hours of scouring every corner of the web for any crumpet of information on the subject followed. To no avail. 96. Even the W3C themselves <a title="The W3C spec on CSS3 Values " href="http://www.w3.org/TR/css3-values/#absolute-lengths" target="_blank">have it backwards</a>, stating that <cite>too much existing content relies on the assumption of 96dpi, and breaking that assumption breaks the content</cite>. Even after knowing this for some time, seeing that line written in the actual spec still makes me want to send emails to the W3C asking them &#8220;Have you gone full retard?!&#8221;.</p>
<h4>EDID</h4>
<p>The next day I went back to it. And found something. I found <a title="Extended display identification data on Wikipedia" href="http://en.wikipedia.org/wiki/Extended_display_identification_data" target="_blank">EDID</a>, the industry standard for storing display information. EDID has been in use for almost 30 years now, bless you <a title=" Tnterface standard for the PC, workstation, and consumer electronics industries" href="http://www.vesa.org/" target="_blank">VESA</a>, and is supported pretty much everywhere. And there&#8217;s software that can read EDID, <a title="EDID Viewer for Windows" href="http://www.softpedia.com/get/System/System-Info/EDID-Viewer.shtml" target="_blank">here</a> and <a title="SwitchResX 4 for OSX" href="http://www.madrau.com/indexSRX4.html" target="_blank">there</a>, for every platform.</p>
<p>So, why don&#8217;t browsers read EDID? Is there a security risk? Hardly. Is it difficult to implement? Not even close. Are there any hardware limitations? Please. Would it impact performance? Perhaps, but we have browsers capable of leveraging <a title="WebGL on Wikipedia" href="http://en.wikipedia.org/wiki/WebGL" target="_blank">3D graphics</a>* nowadays. Is a tiny little string containing the actual, physical width and height of a screen really that heavy on performance?</p>
<p>If you&#8217;ve read so far, you might be curious to know why knowing the physical size of a device is important after all. Quite simply, it&#8217;s the natural, logical next step to <strong>Responsive Web Design</strong>. What is the greatest lesson that RWD has taught us? The web is not made of pixels, it&#8217;s a flexible environment used by real world beings: us. The old 960px grid was silly. It was a lie. <strong>The pixel is a lie</strong>. We all had a mental nuclear meltdown when we realized it and we&#8217;ve been struggling to find ways of avoiding pixel based work ever since. Working with physical units instead of digital ones would be the final step in completely moving web design and development from a non human centered focus, to a truly future proof activity.</p>
<h4>Why physical units?</h4>
<p>Knowing and, thus, working with actual physical dimensions gives us more freedom at less cost.<br />
Think about having true cross-browser and cross-platform sites/apps. Simply write <code>button{ width: 1in; }</code> and you can rest knowing that no matter the device, be it phone, computer or a fridge, that button will always be large enough for most people to press it without difficulty. Bam, design for humans, not devices.</p>
<p>Which brings me to my second reason why using physical sizes is a good idea: true showcase. You could showcase actual physical things at a 1:1 scale ratio on every digital device you could conceive. Having spoken about this with an actual online cosmetics retailer the reply I got was simply &#8220;I need this asap; money&#8217;s no object&#8221;. So the interest and the application for this technology exists. Yet no one is actively asking for it.</p>
<h3>The fall</h3>
<p>The conference day came. It was a most humid day in Venice and having found out I was the first speaker just the night before the conference was not helping my nervousness. And then I went on stage. And I told everyone there the story of EDID and how I was hoping for a community-wide revolution. I even had a plan to set up a petition website and gather as many followers on this as possible and then persuade browser makers, OS makers, video card makers, whoever was needed, that we needed EDID. But the audience reaction was mute. Some people asked a few questions, but most had a blank look on their face. They didn&#8217;t get it. Some of the speakers did, though. Most notably Vitaly, Marko and Nicola Armellini.</p>
<p>Vitaly was even kind enough to extend an invitation to <a title="Responsive Web Design With Physical Units" href="http://mobile.smashingmagazine.com/2013/03/21/responsive-web-design-with-physical-units/" target="_blank">write a post on Smashing Magazine</a> about this subject. Which I gladly accepted and I still thank him for it. Following, a mere few months after the conference, as I was about to launch the petition website and subsequently the Smashing post to go with it and persuade all of you fine people to join me in my windmill fight <a title="Resolution Media Query support announced" href="https://www.webkit.org/blog/2194/last-week-in-webkit-resolution-media-queries-and-timeouts-for-xhr/" target="_blank">this thing happened</a>. And I was crushed and happy both at once. It meant that someone was, in fact, thinking about this problem seriously, and it meant that widespread support is to arrive faster than I, one man, could do by myself. Moreover, it wasn&#8217;t going to be done via a public EDID function, but rather by implementing the resolution media query.</p>
<p>I had failed. I wasn&#8217;t fast enough, connected enough, resourceful enough to make good on my promise of a free EDID. But that doesn&#8217;t mean the story&#8217;s over. Soon enough all the cool things I mentioned earlier will be widespread. And when they will, it will mean yet another paradigm shift in the ever changing world of web design and development. I may have failed in my endeavors, but I, like you, am a designer and we&#8217;ve grown professionally to believe and thrive off the benefits of the entire community, not the one person&#8217;s ego. Today, I&#8217;ve shed all resentment towards this issue and eagerly await the time when we will, in fact, be able to truly design for humans.</p>
<p>Thanks for reading.</p>
<p><small>* We don&#8217;t talk about VRML. VRML is Valdemort.</small></p>
<p><em>Cheers, all!</em></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=iS3TgCX6lZA:-47mbzLhzn4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=iS3TgCX6lZA:-47mbzLhzn4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?i=iS3TgCX6lZA:-47mbzLhzn4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=iS3TgCX6lZA:-47mbzLhzn4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=iS3TgCX6lZA:-47mbzLhzn4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?i=iS3TgCX6lZA:-47mbzLhzn4:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Sickdesigner/~4/iS3TgCX6lZA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sickdesigner.com/the-rise-fall-of-a-designers-ego/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Time … lapse</title>
		<link>http://sickdesigner.com/time-lapse/</link>
		<comments>http://sickdesigner.com/time-lapse/#comments</comments>
		<pubDate>Sun, 17 Mar 2013 12:06:08 +0000</pubDate>
		<dc:creator>Radu Chelariu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sickdesigner.com/?p=2015</guid>
		<description><![CDATA[After learning everything I could about timelapse photography these past months, I recently decided to put together my first timelapse video. It's not much, but I've learned quite a bit from the whole process.]]></description>
				<content:encoded><![CDATA[<p>As most designers, I find it challenging to get out of my comfort zone and try out new mediums of self expression and designery exploration. One of these is timelapse photography. I&#8217;ve been dickin&#8217; around with it for a few months, learning whatever I could from wherever I could.<br />
Earlier this month I took a weekend holiday off to a remote caban in the woods and decided it would high time to actually do a proper timelapse video. You&#8217;ll find the result below. It&#8217;s not exceptional, heck, not even mediocre but I&#8217;m proud of myself for going about the right paces of this process and have learned heaps of new stuff about planning your shots, peering into the future, setting up your camera for consistent shots, editing, color grading, batch processing RAW camera files and generally the workflow behind a timelapse video.</p>
<h4>Time</h4>
<p><iframe src="http://player.vimeo.com/video/61472789" width="500" height="213" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></p>
<p>It&#8217;s called time and it&#8217;s in honor of my mother, Magda, with whom I share my love of photography, fine art and design. Love you, mom!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=D2UE0pDUf18:CgSDMVmN16I:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=D2UE0pDUf18:CgSDMVmN16I:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?i=D2UE0pDUf18:CgSDMVmN16I:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=D2UE0pDUf18:CgSDMVmN16I:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=D2UE0pDUf18:CgSDMVmN16I:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?i=D2UE0pDUf18:CgSDMVmN16I:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Sickdesigner/~4/D2UE0pDUf18" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sickdesigner.com/time-lapse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pixel–parity rems</title>
		<link>http://sickdesigner.com/pixel-parity-rems/</link>
		<comments>http://sickdesigner.com/pixel-parity-rems/#comments</comments>
		<pubDate>Sun, 17 Mar 2013 11:46:13 +0000</pubDate>
		<dc:creator>Radu Chelariu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sickdesigner.com/?p=2006</guid>
		<description><![CDATA[Aral Balkan recently wrote a wonderful post about achieving pixel-parity rems by using CSS preprocessors. I tackled the issue of doing the same thing, but without any preprocessor involved.]]></description>
				<content:encoded><![CDATA[<p>If the title of this post sounds familiar, that&#8217;s because you probably read <a href="http://aralbalkan.com/" target="_blank">Aral Balkan&#8217;s</a> post called, you guessed it, <a href="http://aralbalkan.com/notes/pixel-parity-rems/" target="_blank">Pixel–parity rems</a>. To sum it up, in this post, Aral investigates how to go about using rems in real projects without having to feel like an accountant, constantly checking your calculator. Rems are funky like that and when Aral mentions you can end up with values like <code>0.458333333333333em</code>, he&#8217;s not kidding. It&#8217;s quite mind boggling to think of writing code like that, especially for us designer types who&#8217;d much rather visualize designs than slave away with a calculator half the day.</p>
<p>At first Aral suggest using <code>font-size: 1px</code> on the <code><html></code> element which would provide a 1:1 ratio between rem and pixel but, as Aral mentions, that&#8217;s not a real option as, and I quote, <q>On some browsers it erroneously conflicts with the minimum font size setting in the accessibility settings</q>. Well, that sucks hard. He then goes on to explain how we can use CSS preprocessors to achieve parity, regardless of the aforementioned browser quirks.</p>
<p>But here&#8217;s the thing: not everyone likes or prefers using preprocessors. I&#8217;m one of those people* and I know a great deal others who will stand by me on this one. Furthermore, there are projects where using preprocessors is just overkill. So, should rems be limited to preprocessor powered projects? Of course not, that&#8217;d be silly. But there is hope yet.</p>
<h4>Parity for everyone</h4>
<p>Aral focused on using a 1:1 parity, which is nice and elegant and all, but as mentioned above, doesn&#8217;t work reliably. So, I say, why not use a 100:1 parity? Seeing as rems, and ems for that matter, are a relative percentage unit, using a 100:1 parity would work just like a 1:1 parity, with a decimal point 2 spaces to the left. As such:</p>
<div id="fvch-codeblock-0" class="fvch-codeblock">
<table>
<tr>
<td class="fvch-line-numbers">
<pre>1
2
3
</pre>
</td>
<td class="fvch-code">
<pre id="fvch-code-0"><span class="css">html{ <span class="css-property">font-size<span class="css-selector">:</span><span class="css-value"> 100px</span></span>; }
     h1{ <span class="css-property">font-size<span class="css-selector">:</span><span class="css-value"> 0.36rem</span></span>; } <span class="css-comment">/* renders 36px */</span>
     p{ <span class="css-property">font-size<span class="css-selector">:</span><span class="css-value"> 0.18rem</span></span>; } <span class="css-comment">/* renders 18px */</span></span></pre>
</td>
</tr>
</table>
</div>
<p>And that&#8217;s it. No weird maths, no pesky browser bugs to get in the way, no jumping through hoops, and will work for projects which do not employ preprocessors.</p>
<p><em>Cheers, all!</em></p>
<p>* I do appreciate the amazing features that preprocessors like SASS or LESS bring to the table and have actually used SASS in a few projects. I&#8217;m not hating on the technology, I&#8217;m saying I prefer the vanilla flavor.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=-872D0yWabM:kEX2cg8G0RE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=-872D0yWabM:kEX2cg8G0RE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?i=-872D0yWabM:kEX2cg8G0RE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=-872D0yWabM:kEX2cg8G0RE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=-872D0yWabM:kEX2cg8G0RE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?i=-872D0yWabM:kEX2cg8G0RE:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Sickdesigner/~4/-872D0yWabM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sickdesigner.com/pixel-parity-rems/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>A bag of [code] tricks</title>
		<link>http://sickdesigner.com/a-bag-of-code-tricks/</link>
		<comments>http://sickdesigner.com/a-bag-of-code-tricks/#comments</comments>
		<pubDate>Mon, 10 Dec 2012 08:46:16 +0000</pubDate>
		<dc:creator>Radu Chelariu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[anchor]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[input]]></category>
		<category><![CDATA[number]]></category>
		<category><![CDATA[pattern]]></category>
		<category><![CDATA[placeholder]]></category>
		<category><![CDATA[tel]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://sickdesigner.com/?p=1978</guid>
		<description><![CDATA[Whether a newbie or a veteran, here are some short and sweet tricks to help you get your web dev stuff from "OK" to "Spock level".]]></description>
				<content:encoded><![CDATA[<p>I lied. They&#8217;re not tricks. That would imply some sort of, well, trickery. This is just a list of pretty cool little snippets of code you can just pop into your projects. Most are centered around the idea of making things more usable and useful to your average user.</p>
<h4>Required inputs</h4>
<div id="fvch-codeblock-0" class="fvch-codeblock">
<table>
<tr>
<td class="fvch-line-numbers">
<pre>1
</pre>
</td>
<td class="fvch-code">
<pre id="fvch-code-0"><span class="html"><span class="html-form-element">&lt;input type=<span class="html-attribute">&quot;text&quot;</span> required /&gt;</span></span></pre>
</td>
</tr>
</table>
</div>
<p>Simple and sweet. And you should know it by now. But, in case you don&#8217;t, this is the HTML5 way of doing form validation on required fields. That&#8217;s really all there is to it.</p>
<h4>Number inputs</h4>
<div id="fvch-codeblock-1" class="fvch-codeblock">
<table>
<tr>
<td class="fvch-line-numbers">
<pre>1
</pre>
</td>
<td class="fvch-code">
<pre id="fvch-code-1"><span class="html"><span class="html-form-element">&lt;input type=<span class="html-attribute">&quot;number&quot;</span> placeholder=<span class="html-attribute">&quot;Digits, dude!&quot;</span> pattern=<span class="html-attribute">&quot;[0-9]*&quot;</span> /&gt;</span></span></pre>
</td>
</tr>
</table>
</div>
<p>This one has two tricks. The placeholder bit replaces the old &#8220;click and the text disappears&#8221; we used to have happen with JavaScript, while the pattern attribute defines what kind of data the input will take. The pattern attribute is especially useful for mobile users as focusing on the input will bring up either only the numbered keyboard or the regular keyboard switched to number view, depending on phone and operating system. Both are a heck of a lot more useful than pulling up the regular keyboard and having to switch to number view manually.</p>
<h4>Call me maybe?</h4>
<div id="fvch-codeblock-2" class="fvch-codeblock">
<table>
<tr>
<td class="fvch-line-numbers">
<pre>1
</pre>
</td>
<td class="fvch-code">
<pre id="fvch-code-2"><span class="html"><span class="html-anchor-element">&lt;a href=<span class="html-attribute">&quot;tel:0123456789&quot;</span>&gt;</span>Prank call at 0123456789<span class="html-anchor-element">&lt;/a&gt;</span></span></pre>
</td>
</tr>
</table>
</div>
<p>So simple and effortless, this one. Simply prefix tel: to a phone number (as you would enter it on your own phone) as the href of an anchor. For extra points, I set a <code>cursor: default;</code> on desktops and laptops as they&#8217;re less likely to be able to use this functionality.</p>
<h4>Before, there was</h4>
<div id="fvch-codeblock-3" class="fvch-codeblock">
<table>
<tr>
<td class="fvch-line-numbers">
<pre>1
2
3
4
5
6
7
8
9
</pre>
</td>
<td class="fvch-code">
<pre id="fvch-code-3"><span class="css">span:before{
    <span class="css-property">background<span class="css-selector">:</span><span class="css-value"> #E2F1E6</span></span>;
    <span class="css-property">border<span class="css-selector">:</span><span class="css-value"> 1px solid #E0E5E8</span></span>;
    <span class="css-property">content<span class="css-selector">:</span><span class="css-value"> <span class="css-string">''</span></span></span>;
    <span class="css-property">display<span class="css-selector">:</span><span class="css-value"> block</span></span>;
    <span class="css-property">float<span class="css-selector">:</span><span class="css-value"> left</span></span>;
    <span class="css-property">height<span class="css-selector">:</span><span class="css-value"> 16px</span></span>;
    <span class="css-property">margin<span class="css-selector">:</span><span class="css-value"> 0 10px 0 0</span></span>;
    <span class="css-property">width<span class="css-selector">:</span><span class="css-value"> 16px</span></span>; }</span></pre>
</td>
</tr>
</table>
</div>
<p>Someone, somewhere decided it was a good idea to only use :before and :after to insert icon fonts. Not that that&#8217;s a bad idea, quite the contrary, but rather I&#8217;d say that we can use these very useful pseudo-elements for more than that. In fact, with the above code, you insert a tiny little green box which can be used as a kind of icon. Without an icon font.</p>
<h4>Tuck belly, straighten spine</h4>
<div id="fvch-codeblock-4" class="fvch-codeblock">
<table>
<tr>
<td class="fvch-line-numbers">
<pre>1
2
3
4
5
6
7
</pre>
</td>
<td class="fvch-code">
<pre id="fvch-code-4"><span class="css">b, strong{ 
    <span class="css-property">font-family<span class="css-selector">:</span><span class="css-value"> SansationBold, sans-serif</span></span>;
    <span class="css-property">font-weight<span class="css-selector">:</span><span class="css-value"> normal</span></span>; }

i, em, address{
    <span class="css-property">font-family<span class="css-selector">:</span><span class="css-value"> SansationItalic, sans-serif</span></span>;
    <span class="css-property">font-style<span class="css-selector">:</span><span class="css-value"> normal</span></span>; }</span></pre>
</td>
</tr>
</table>
</div>
<p>Whenever I use a site-wide custom font, in the above example I&#8217;m using Sansation, I always reset the weight for <code>b</code> and <code>strong</code> and the slant for <code>i</code>, <code>em</code> and <code>address</code> to avoid faux bolds and italics. This is targeting Firefox, mostly, but other, more obscure browsers overcompensate as well.</p>
<p>They aren&#8217;t the greatest or most advanced tricks in the world, but they&#8217;re sure to make your project more usable and provide your users with a better experience.</p>
<h4>A quick note</h4>
<p>I am aware that HTML5 doesn&#8217;t require one to use self closing tags. However, I still use them on account of my code highlighting plugin being a bit old-school. Until the plugin is updated, the self closing stuff stays.</p>
<p><em>Cheers, all!</em></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=fschotCwddI:uCiQbCsvcy8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=fschotCwddI:uCiQbCsvcy8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?i=fschotCwddI:uCiQbCsvcy8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=fschotCwddI:uCiQbCsvcy8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=fschotCwddI:uCiQbCsvcy8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?i=fschotCwddI:uCiQbCsvcy8:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Sickdesigner/~4/fschotCwddI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sickdesigner.com/a-bag-of-code-tricks/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>HSP Update, November 2012</title>
		<link>http://sickdesigner.com/hsp-update-november-2012/</link>
		<comments>http://sickdesigner.com/hsp-update-november-2012/#comments</comments>
		<pubDate>Fri, 16 Nov 2012 09:56:08 +0000</pubDate>
		<dc:creator>Radu Chelariu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sickdesigner.com/?p=1972</guid>
		<description><![CDATA[Update for the Starter Pack, featuring an excellently considerate CSS reset by the good Iain MacDonald.]]></description>
				<content:encoded><![CDATA[<p>The latest update for the Starter Pack comes in the form of a new reset!<br />
The good Iain MacDonald wrote <a title="Iain's post" href="http://iainspad.com/strppd-css/" target="_blank">a very fine post about it</a> on his website and seeing as he based the reset on Eric Meyer&#8217;s classic chunk of code as well as a tiny bit of my old reset, I was intrigued. After reading the whole thing twice I just jumped to integrate it in the Starter Pack. The reason for that rash, impulsive decision is not so impulsive, actually. The whole point of the Starter Pack is to give people a tool that is considerate to *their* needs and Iain&#8217;s wonderful reset stays true to that creed.<br />
It&#8217;s incredibly balanced in what it resets and how and I very much like that he addresses issues with mobiles but without going so much into mobile details that it becomes a mobile reset.</p>
<p>The changes have already been added to the Starter Pack archive and, of course, you can download the latest version over nya:<br />
<a class="demo" href="http://sickdesigner.com/resources/HTML5-starter-pack/index.html">Get the Starter Pack</a></p>
<p><em>Cheers, all!</em></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=Ds5aW3n8miU:5ZBaQ7A7m9U:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=Ds5aW3n8miU:5ZBaQ7A7m9U:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?i=Ds5aW3n8miU:5ZBaQ7A7m9U:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=Ds5aW3n8miU:5ZBaQ7A7m9U:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=Ds5aW3n8miU:5ZBaQ7A7m9U:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?i=Ds5aW3n8miU:5ZBaQ7A7m9U:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Sickdesigner/~4/Ds5aW3n8miU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sickdesigner.com/hsp-update-november-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HSP Update, October 2012</title>
		<link>http://sickdesigner.com/html5-starter-pack-update-october-2012/</link>
		<comments>http://sickdesigner.com/html5-starter-pack-update-october-2012/#comments</comments>
		<pubDate>Wed, 10 Oct 2012 05:39:35 +0000</pubDate>
		<dc:creator>Radu Chelariu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[2012]]></category>
		<category><![CDATA[boilerplate]]></category>
		<category><![CDATA[clean]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[october]]></category>
		<category><![CDATA[pack]]></category>
		<category><![CDATA[simple]]></category>
		<category><![CDATA[starter]]></category>

		<guid isPermaLink="false">http://sickdesigner.com/?p=1952</guid>
		<description><![CDATA[I've been hard at work these past few days, getting ready to release the latest major update to the HTML5 Starter Pack. And, guess what, it's here!]]></description>
				<content:encoded><![CDATA[<p>It&#8217;s been almost two years since I first released the HTML5 Starter Pack and, boy, have things changed since then! A lot of new stuff went into this latest release, and a lot of stuff got thrown out.<br />
Be sure to check out more detailed descriptions on the pack&#8217;s very own (newly designed) page.</p>
<p><a class="demo" href="http://sickdesigner.com/resources/HTML5-starter-pack/index.html">Get the Starter Pack</a></p>
<h4>So, what&#8217;s new</h4>
<p>As I said, a lot of stuff&#8217;s new. The last update had a bunch of useless markup in the html file. That got thrown out real quick. Instead, now you&#8217;ll just find some basic structure to get you going. Nothing too set in stone, of course.</p>
<p>I focused a lot on the <code>&lt;head&gt;</code> area. Things like humans.txt and <code>&lt;<meta name="author">&gt;</code> have become a widely recognized standard so it just makes sense to try and push people into using them.</p>
<p>Paul Irish&#8217;s <a title="* { box-sizing: border-box } FTW" href="http://paulirish.com/2012/box-sizing-border-box-ftw/" target="_blank">box-sizing fix</a> has its honor role well set in there. It&#8217;s a simple technique that has proven itself time and time again. If you&#8217;re not using it, well, you should.</p>
<p>I&#8217;ve stripped the old head media queries for more practical and faster queries, straight into the main stylesheet. Breakpoints are obviously something you should be adjusting according to each project.</p>
<p>I&#8217;m a very, very big fan of icon fonts. There&#8217;s nothing bad I can possibly say about them and in trying to push more people to use them, I&#8217;ve included the wonderful <a title="Modern Pictograms" href="http://thedesignoffice.org/project/modern-pictograms/" target="_blank">Modern Pictograms </a>by <a title="The Design Office" href="http://thedesignoffice.org" target="_blank">The Design Office</a>.</p>
<p>There&#8217;s very little in terms of IE stuff, as opposed to previous pack releases. This time, you&#8217;ll only find the &#8220;render-me-better&#8221; meta tag and an ie8.css file. No one in their right mind should support IE6 or IE7 anymore. It&#8217;s 2012, people! Get with the program!</p>
<p>This latest release also marks a change in update policy for the HTML5 Starter Pack. Releases will be more incremental, each with its respective blog post and must-have social buzz. No more once-a-year updates.</p>
<p>Well, I hope you all find the new update useful. See you in the comments!</p>
<p><em>Cheers, all!</em></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=UaFm9bA_f5Q:HA3kep_F-Fg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=UaFm9bA_f5Q:HA3kep_F-Fg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?i=UaFm9bA_f5Q:HA3kep_F-Fg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=UaFm9bA_f5Q:HA3kep_F-Fg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=UaFm9bA_f5Q:HA3kep_F-Fg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?i=UaFm9bA_f5Q:HA3kep_F-Fg:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Sickdesigner/~4/UaFm9bA_f5Q" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sickdesigner.com/html5-starter-pack-update-october-2012/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>CSS3 leather stitching</title>
		<link>http://sickdesigner.com/css3-leather-stitching/</link>
		<comments>http://sickdesigner.com/css3-leather-stitching/#comments</comments>
		<pubDate>Thu, 04 Oct 2012 04:48:20 +0000</pubDate>
		<dc:creator>Radu Chelariu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[effect]]></category>
		<category><![CDATA[simple]]></category>
		<category><![CDATA[stitched]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://sickdesigner.com/?p=1930</guid>
		<description><![CDATA[Here's an easy tutorial on how to do a very realistic stitched effect with just CSS that uses two divs and a bit of elbow grease to be done right.]]></description>
				<content:encoded><![CDATA[<p>Yesterday, I came across <a title="CSS3 Stitched Effect" href="http://www.developerdrive.com/2012/10/css3-stitched-effect/" target="_blank">this little post</a> by <a title="Todd Dunham's website" href="http://www.dragonfruitdevelopment.com" target="_blank">Todd Dunham</a> over at Developer Drive and thought to myself &#8220;well, that&#8217;s not a very convincing effect&#8221;. Sure, Todd was very clean about his markup and used just one element in his attempt to recreate a stitched effect, but are we to trade quality over purism? Sometimes the answer to that question is yes, but, to me, this time it was a resounding <strong>no</strong>.</p>
<p>So, I set out to pull off my own take on the whole CSS3 Stitched Effect. Take a look at the demo and below I&#8217;ll explain some of the code.<br />
<a target="_blank" class="demo" href="http://sickdesigner.com/demo/css3-stitched-effect/stitchme.html">Demo</a></p>
<h4>The HTML</h4>
<p>I used <a title="Stock photo: Black Leather" href="http://www.sxc.hu/photo/1302730" target="_blank">this image</a> from SXC as a leather texture. The brown texture is the same picture, just scaled down and slightly edited in good ol&#8217; Photoshop. The markup is really quite simple, just two divs.</p>
<div id="fvch-codeblock-0" class="fvch-codeblock">
<table>
<tr>
<td class="fvch-line-numbers">
<pre>1
2
3
</pre>
</td>
<td class="fvch-code">
<pre id="fvch-code-0"><span class="html"><span class="html-other-element">&lt;div id=<span class="html-attribute">&quot;stitch&quot;</span>&gt;</span>
<span class="html-other-element">&lt;div id=<span class="html-attribute">&quot;inner-stitch&quot;</span>&gt;</span>Just a CSS leather stitch<span class="html-other-element">&lt;/div&gt;</span>
<span class="html-other-element">&lt;/div&gt;</span></span></pre>
</td>
</tr>
</table>
</div>
<h4>The CSS</h4>
<p>There&#8217;s a fair bit of stuff in the demo but it all boils down to two properties: <code>border</code> and <code>outline</code>. Use these two properties with the same width and alternate colors and you have yourself a stitching effect.</p>
<div id="fvch-codeblock-1" class="fvch-codeblock">
<table>
<tr>
<td class="fvch-line-numbers">
<pre>1
2
3
</pre>
</td>
<td class="fvch-code">
<pre id="fvch-code-1"><span class="css">#inner-stitch{
<span class="css-property">border<span class="css-selector">:</span><span class="css-value"> 1px dashed #000</span></span>;
<span class="css-property">outline<span class="css-selector">:</span><span class="css-value"> 1px dashed #fff</span></span>; }</span></pre>
</td>
</tr>
</table>
</div>
<p></code></p>
<p>Certainly, achieving this effect requires more than just the use of two properties, it's got a lot to do with getting the right colors, maybe doing some rounding off at the corners, subtle stuff like that. It's not a groundbreaking technique, of course, but it does prove one very important point: even a simple technique such as this one takes a bit of elbow grease to get right if quality work is what you're after. Just slapping code in a project and hoping it'll be brilliant right off the bat is a pipe dream.</p>
<p><em>Cheers, all!</em></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=yPVxEq8og_w:sK9LOqrtwQs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=yPVxEq8og_w:sK9LOqrtwQs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?i=yPVxEq8og_w:sK9LOqrtwQs:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=yPVxEq8og_w:sK9LOqrtwQs:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=yPVxEq8og_w:sK9LOqrtwQs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?i=yPVxEq8og_w:sK9LOqrtwQs:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Sickdesigner/~4/yPVxEq8og_w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sickdesigner.com/css3-leather-stitching/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SASS for designers</title>
		<link>http://sickdesigner.com/sass-for-designers/</link>
		<comments>http://sickdesigner.com/sass-for-designers/#comments</comments>
		<pubDate>Sun, 30 Sep 2012 00:00:55 +0000</pubDate>
		<dc:creator>Radu Chelariu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[compass]]></category>
		<category><![CDATA[designers]]></category>
		<category><![CDATA[easy]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[SASS]]></category>
		<category><![CDATA[SCSS]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://sickdesigner.com/?p=1914</guid>
		<description><![CDATA[Like myself, most designers think SASS is all about Ruby and programming and hence, a bitch to get to work. So, here's a step by step tutorial on getting passed that first milestone, getting SASS up and running. For Windows and Mac.]]></description>
				<content:encoded><![CDATA[<p>CSS preprocessors like <a title="Official LESS Website" href="http://lesscss.org" target="_blank">LESS</a> or <a title="Official SASS Website" href="http://sass-lang.com" target="_blank">SASS</a> are cool. They speed up your workflow, they cut down on how much drivel you have to write and are a life saver for multi template projects. There&#8217;s no wonder every frontend guy or gal out there has adopted this cool new way of writing CSS.</p>
<p>A quick side note, if you&#8217;re unsure about which is best, SASS or LESS, <a title="SASS versus LESS by Chris Coyier" href="http://css-tricks.com/sass-vs-less/" target="_blank">this post</a> by the almighty Chris Coyier should answer it.</p>
<p>About 2 years ago, while working at <a title="Mind Magnet Software" href="http://www.mindmagnetsoftware.com" target="_blank">Mind Magnet Software</a>, I had my first run-in with SASS as part of a custom Ruby on Rails project for a client. And it was a gruesome experience, to say the least. Back then, we were using .sass syntax, as SCSS was just beginning to show its head and Compass worked about three days a week. I exaggerate, but the point is, back then, the technology wasn&#8217;t mature enough. Working over a RoR project for the first time didn&#8217;t help, either.</p>
<p>Since then, I ignored SASS and focused more on interaction design and usability in the ecommerce world. But every now and again, the subject of preprocessors kept popping up either on Twitter, Facebook or the odd secret designer society group (what, you guys don&#8217;t have that?) and every time it did there was one term which seemed tonbe ombilically attached to SASS: Ruby. This has been, for some time now, the main deterrent for switching to SASS for a large crowd of non-Ruby designers. Like myself, there are many designers out there who work extensively with CMSs like WordPress or Magento, to name but a few, or even just custom projects. And they aren&#8217;t embracing any CSS preprocessor for one very good reason: they don&#8217;t know they can.</p>
<p>Well, as the discussion about preprocessors has gathered a bit of momentum in recent time, I decided to take a closer look at what the fuss was all about. I&#8217;ve definitely became enamored with SCSS, especially its the more relaxed take on tabbing (something SASS was really bad at) and wanted to fit it into my regular workflow, which usually implies a lot of work with Magento and its quirky bits. Until now, I&#8217;ve been using a sandbox theme I put together, but I felt I could streamline the process even further by using SASS.</p>
<p>So, in a nutshell, here&#8217;s how I got SASS working for me on both OSX and Windows:</p>
<h4>Windows</h4>
<h5>Step 1: Install Ruby</h5>
<p>Go to <a href="http://rubyinstaller.org" target="_blank">http://rubyinstaller.org</a> and download and run the latest Ruby installer .exe</p>
<h5>Step 2: Install SASS</h5>
<p>Once Ruby&#8217;s installed, run a prompt window. On any Windows version earlier than 8, press Start and in the Run field type CMD and hit Enter. On Windows 8, press Win+Q, type CMD and hit Enter.<br />
In your prompt window type <code>gem install sass</code> and hit Enter. Some time later, SASS will be installed.</p>
<h5>Step 3: Install Compass</h5>
<p>In the same prompt window, type <code>gem install compass</code>. Some time later, Compass will be installed. Compass is what you&#8217;ll be using to process your SCSS code into browser readable CSS.</p>
<h5>Step 4: Make a project</h5>
<p>Make a test folder anywhere you want. Shift+Right Click in that folder and click Open Command Prompt Here. In the prompt window which just appeared type <code>compass create project name</code>. After a few seconds, your test folder will be populated with a bunch of ruby nonsense, a /sass folder and a /stylesheets folder. Pretty self explanatory, really.</p>
<h5>Step 5: Get ready to rumble</h5>
<p>In the same prompt window, type <code>compass watch</code> and lo and behold, Compass will let you know that it&#8217;s watching your every move, ready to compile any changes to the SCSS files in the the /sass folder of your test project.</p>
<p>As a side note, what I like to do is mount an FTP server to disk and create a project right up on the server, thenthe compiled CSS to my actual project. This way, whenever I make any changes to the SCSS file, Compass will automatically compile the CSS file on the server and all I have to do is hit Refresh in my browser. Pretty sweet deal, if you ask me.</p>
<h4>OSX</h4>
<h5>Step 1: Install Ruby</h5>
<p>You don&#8217;t need to install anything. OSX comes with Ruby preinstalled. Woohoo!</p>
<h5>Step 2: Install SASS</h5>
<p>Open a Terminal window and type <code>sudo gem install sass</code>. As Ruby is part of the OSX core, you need to provide your admin password, that&#8217;s what the &#8220;sudo&#8221; is for.</p>
<h5>Step 3: Install Compass</h5>
<p>Same as before, type <code>sudo gem install compass</code>. Bla, bla, time passes, Compass is installed.</p>
<h5>Step 4: Make a project</h5>
<p>Macs don&#8217;t have that whole Shift+Right Click to open a prompt window thing, but fortunately, there&#8217;s <a href="http://code.google.com/p/cdto/">this little app</a> that opens up a Terminal window based on the front most Finder window. And it&#8217;s free! As with Windows, type <code>compass create projectname</code> to start up a new project.</p>
<h5>Step 5: Get ready to rumble</h5>
<p>In the same terminal window, type <code>compass watch</code> and Compass will let you know that it&#8217;s ready to compile any changes to the SCSS files in the the /sass folder of your test project.</p>
<p>OSX is a little bitch about mounted FTP servers in that it can do it natively, but it&#8217;s read-only, which is a real bummer. Fortunately, there are alternatives, like <a title="Panic's Transmit" href="http://panic.com/transmit/" target="_blank">Transmit</a>, which I recommend mostly because it&#8217;ll work on Mountain Lion as well as lesser felines.</p>
<p>There you have it, kids, the designer friendly way of getting up and running with SASS. And if, by chance, you&#8217;re still on the fence about preprocessors, just remember that the CSS working group has already started to add things like variables and mixins to future versions of CSS. Do yourself a favor and jump on the bandwagon while you can still call yourself an early adopter.</p>
<p><i>Cheers, all!</i></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=bLILB_9f5Bg:1aKgE6mqu14:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=bLILB_9f5Bg:1aKgE6mqu14:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?i=bLILB_9f5Bg:1aKgE6mqu14:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=bLILB_9f5Bg:1aKgE6mqu14:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=bLILB_9f5Bg:1aKgE6mqu14:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?i=bLILB_9f5Bg:1aKgE6mqu14:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Sickdesigner/~4/bLILB_9f5Bg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sickdesigner.com/sass-for-designers/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Input filtering, Quicksand style</title>
		<link>http://sickdesigner.com/input-filtering-quicksand-style/</link>
		<comments>http://sickdesigner.com/input-filtering-quicksand-style/#comments</comments>
		<pubDate>Wed, 19 Sep 2012 18:58:47 +0000</pubDate>
		<dc:creator>Radu Chelariu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[data-*]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[input]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[quicksand]]></category>
		<category><![CDATA[RegExp]]></category>
		<category><![CDATA[sort]]></category>

		<guid isPermaLink="false">http://sickdesigner.com/?p=1889</guid>
		<description><![CDATA[A quick and easy way of filtering a set of items via a text input, inspired by Jacek Galanciak's famous jQuery plugin, Quicksand.]]></description>
				<content:encoded><![CDATA[<p>If you&#8217;re not familiar with <a title="Quicksand's website" href="http://razorjack.net/quicksand/" target="_blank">Quicksand</a>, well, prepare to have your mind blown, because it&#8217;s the cat&#8217;s pajamas, kids. Seriously, it&#8217;s a very cool plugin, capable of some very fancy visual sorting.</p>
<p>But, as cool as Quicksand is, it does lack in some departments. Most notably, for me, it sorts through lists based on preset filters, not based on user input. And that&#8217;s quite a shame, really. How cool would it be to sort seamlessly through a list of items by just typing in an input. So, I set out to do exactly that.</p>
<p><strong>For a live demo, check out the blog listing <a href="http://sickdesigner.com/blog-posts/" target="_blank">here</a>.</strong></p>
<p>Do note that this is not a Quicksand patch script. My script has no other dependencies other than jQuery itself. Mostly, this is so because I can&#8217;t make heads or tails of Quicksand&#8217;s inner workings, and when that happens, I, usually, just do things my own way. May not be the best way, but it&#8217;s the best I can do with my limited knowledge of JavaScript.</p>
<p>Let&#8217;s get started on this bad boy.</p>
<h4>Some basic HTML</h4>
<p>We&#8217;ll be using the <code>data-*</code> attribute to hold all the meta information about each item. We&#8217;ll be using this information, which can be a fair bit more verbose than what other attributes can hold, to sort through the list.</p>
<div id="fvch-codeblock-0" class="fvch-codeblock">
<table>
<tr>
<td class="fvch-line-numbers">
<pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
</pre>
</td>
<td class="fvch-code">
<pre id="fvch-code-0"><span class="html"><span class="html-comment">&lt;!-- An input wherein you can type your filter --&gt;</span>
<span class="html-form-element">&lt;input id=<span class="html-attribute">&quot;type-me&quot;</span> type=<span class="html-attribute">&quot;text&quot;</span> /&gt;</span>

<span class="html-comment">&lt;!-- A list of items to sort out --&gt;</span>
<span class="html-comment">&lt;!-- I used a bunch of cars. You can use whatever you want. --&gt;</span>
<span class="html-other-element">&lt;ul&gt;</span>
<span class="html-other-element">&lt;ul&gt;</span><span class="html-comment">&lt;!-- Three roadsters --&gt;</span>
    <span class="html-other-element">&lt;li data-sort=<span class="html-attribute">&quot;roadster Wiesmann Roadster MF4&quot;</span>&gt;</span><span class="html-image-element">&lt;img src=<span class="html-attribute">&quot;img/mf4.jpg&quot;</span> alt=<span class="html-attribute">&quot;Wiesmann Roadster MF4&quot;</span> /&gt;</span><span class="html-other-element">&lt;/li&gt;</span>
    <span class="html-other-element">&lt;li data-sort=<span class="html-attribute">&quot;roadster Mercedes SLK&quot;</span>&gt;</span><span class="html-image-element">&lt;img src=<span class="html-attribute">&quot;img/slk.jpg&quot;</span> alt=<span class="html-attribute">&quot;Mercedes SLK&quot;</span> /&gt;</span><span class="html-other-element">&lt;/li&gt;</span>
    <span class="html-other-element">&lt;li data-sort=<span class="html-attribute">&quot;roadster Mazda MX5&quot;</span>&gt;</span><span class="html-image-element">&lt;img src=<span class="html-attribute">&quot;img/mx5.jpg&quot;</span> alt=<span class="html-attribute">&quot;Mazda MX5&quot;</span> /&gt;</span><span class="html-other-element">&lt;/li&gt;</span>
<span class="html-other-element">&lt;/ul&gt;</span>
<span class="html-other-element">&lt;/ul&gt;</span>
<span class="html-comment">&lt;!-- Three sports cars --&gt;</span>
<span class="html-other-element">&lt;ul&gt;</span>
<span class="html-other-element">&lt;ul&gt;</span>
    <span class="html-other-element">&lt;li data-sort=<span class="html-attribute">&quot;sports car Lamborghini Aventador&quot;</span>&gt;</span><span class="html-image-element">&lt;img src=<span class="html-attribute">&quot;img/aventador.jpg&quot;</span> alt=<span class="html-attribute">&quot;Lamborghini Aventador&quot;</span> /&gt;</span><span class="html-other-element">&lt;/li&gt;</span>
    <span class="html-other-element">&lt;li data-sort=<span class="html-attribute">&quot;sports car Aston Martin DB9&quot;</span>&gt;</span><span class="html-image-element">&lt;img src=<span class="html-attribute">&quot;img/db9.jpg&quot;</span> alt=<span class="html-attribute">&quot;Aston Martin DB9&quot;</span> /&gt;</span><span class="html-other-element">&lt;/li&gt;</span>
    <span class="html-other-element">&lt;li data-sort=<span class="html-attribute">&quot;sports car electric BMW i8&quot;</span>&gt;</span><span class="html-image-element">&lt;img src=<span class="html-attribute">&quot;img/i8.jpg&quot;</span> alt=<span class="html-attribute">&quot;BMW i8&quot;</span> /&gt;</span><span class="html-other-element">&lt;/li&gt;</span>
<span class="html-other-element">&lt;/ul&gt;</span>
<span class="html-other-element">&lt;/ul&gt;</span>
<span class="html-comment">&lt;!-- Three sedans --&gt;</span>
<span class="html-other-element">&lt;ul&gt;</span>
<span class="html-other-element">&lt;ul&gt;</span>
    <span class="html-other-element">&lt;li data-sort=<span class="html-attribute">&quot;sedan car Mazda 3&quot;</span>&gt;</span><span class="html-image-element">&lt;img src=<span class="html-attribute">&quot;img/mazda3.jpg&quot;</span> alt=<span class="html-attribute">&quot;Mazda 3&quot;</span> /&gt;</span><span class="html-other-element">&lt;/li&gt;</span>
    <span class="html-other-element">&lt;li data-sort=<span class="html-attribute">&quot;sedan car Volkswagen Passat&quot;</span>&gt;</span><span class="html-image-element">&lt;img src=<span class="html-attribute">&quot;img/passat.jpg&quot;</span> alt=<span class="html-attribute">&quot;Volkswagen Passat&quot;</span> /&gt;</span><span class="html-other-element">&lt;/li&gt;</span>
    <span class="html-other-element">&lt;li data-sort=<span class="html-attribute">&quot;sedan car Mercedes C Klasse&quot;</span>&gt;</span><span class="html-image-element">&lt;img src=<span class="html-attribute">&quot;img/c-klasse.jpg&quot;</span> alt=<span class="html-attribute">&quot;Mercedes C Klasse&quot;</span> /&gt;</span><span class="html-other-element">&lt;/li&gt;</span>
<span class="html-other-element">&lt;/ul&gt;</span>
<span class="html-other-element">&lt;/ul&gt;</span>
<span class="html-comment">&lt;!-- And three SUVs --&gt;</span>
<span class="html-other-element">&lt;ul id=<span class="html-attribute">&quot;filter-me&quot;</span>&gt;</span>
    <span class="html-other-element">&lt;li data-sort=<span class="html-attribute">&quot;suv BMW Hybrid X6&quot;</span>&gt;</span><span class="html-image-element">&lt;img src=<span class="html-attribute">&quot;img/x6.jpg&quot;</span> alt=<span class="html-attribute">&quot;BMW Hybrid X6&quot;</span> /&gt;</span><span class="html-other-element">&lt;/li&gt;</span>
    <span class="html-other-element">&lt;li data-sort=<span class="html-attribute">&quot;suv Honda CRV&quot;</span>&gt;</span><span class="html-image-element">&lt;img src=<span class="html-attribute">&quot;img/crv.jpg&quot;</span> alt=<span class="html-attribute">&quot;Honda CRV&quot;</span> /&gt;</span><span class="html-other-element">&lt;/li&gt;</span>
    <span class="html-other-element">&lt;li data-sort=<span class="html-attribute">&quot;suv Land Rover Range Rover Evoque&quot;</span>&gt;</span><span class="html-image-element">&lt;img src=<span class="html-attribute">&quot;img/evoque.jpg&quot;</span> alt=<span class="html-attribute">&quot;Land Rover Range Rover Evoque&quot;</span> /&gt;</span><span class="html-other-element">&lt;/li&gt;</span>
<span class="html-other-element">&lt;/ul&gt;</span></span></pre>
</td>
</tr>
</table>
</div>
<h4>Some not so special CSS</h4>
<p>You can use whatever CSS you want as there are no actual CSS dependencies with this script, so you can style whatever pleases your retinas. Seriously, whatever floats your boat. Get creative!</p>
<h4>The JS to make it all work</h4>
<p>Read the comments in the script to get an idea of how I made it work. Or reverse engineer the script in my blog listing page, if that&#8217;s more up your alley.</p>
<div id="fvch-codeblock-1" class="fvch-codeblock">
<table>
<tr>
<td class="fvch-line-numbers">
<pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
</pre>
</td>
<td class="fvch-code">
<pre id="fvch-code-1"><span class="js"><span class="js-comment">// Make sure everything's all nice and loaded before running the script</span>
$<span class="js-bracket">(</span><span class="js-client-keyword">document</span><span class="js-bracket">)</span>.ready<span class="js-bracket">(</span><span class="js-function-keyword">function</span><span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-bracket">{</span>

<span class="js-comment">// After each new character has been typed...</span>
$<span class="js-bracket">(</span><span class="js-string">'#type-me'</span><span class="js-bracket">)</span>.keyup<span class="js-bracket">(</span><span class="js-function-keyword">function</span><span class="js-bracket">(</span><span class="js-bracket">)</span><span class="js-bracket">{</span>

<span class="js-comment">// Pass whatever's in the input to a variable...</span>
<span class="js-reserved-keyword">var</span> sortQuery <span class="js-operator">=</span> $<span class="js-bracket">(</span><span class="js-reserved-keyword">this</span><span class="js-bracket">)</span>.val<span class="js-bracket">(</span><span class="js-bracket">)</span>;

<span class="js-comment">// Iterate through all the list items</span>
$<span class="js-bracket">(</span><span class="js-string">'#filter-me li'</span><span class="js-bracket">)</span>.each<span class="js-bracket">(</span><span class="js-function-keyword">function</span><span class="js-bracket">(</span><span class="js-bracket">)</span><span class="js-bracket">{</span>

<span class="js-comment">// Get each list item's data-* attribute value</span>
<span class="js-reserved-keyword">var</span> dataSortValue <span class="js-operator">=</span> $<span class="js-bracket">(</span><span class="js-reserved-keyword">this</span><span class="js-bracket">)</span>.attr<span class="js-bracket">(</span><span class="js-string">'data-sort'</span><span class="js-bracket">)</span>;

<span class="js-comment">// Create a new regular expression from the user input data</span>
reg <span class="js-operator">=</span> <span class="js-reserved-keyword">new</span> <span class="js-native-keyword">RegExp</span><span class="js-bracket">(</span><span class="js-string">'\('</span><span class="js-operator">+</span>sortQuery<span class="js-operator">+</span><span class="js-string">'\)'</span> , <span class="js-string">'gi'</span><span class="js-bracket">)</span>;

<span class="js-comment">// Match the user input to the data-* value</span>
<span class="js-reserved-keyword">if</span> <span class="js-bracket">(</span>dataSortValue.<span class="js-native-keyword">match</span><span class="js-bracket">(</span>reg<span class="js-bracket">)</span><span class="js-bracket">)</span> <span class="js-bracket">{</span>
$<span class="js-bracket">(</span><span class="js-reserved-keyword">this</span><span class="js-bracket">)</span>.fadeIn<span class="js-bracket">(</span><span class="js-number">3</span><span class="js-number">0</span><span class="js-number">0</span><span class="js-bracket">)</span>; <span class="js-comment">// If it matches, keep it.</span>
<span class="js-bracket">}</span>
<span class="js-reserved-keyword">else</span><span class="js-bracket">{</span>
$<span class="js-bracket">(</span><span class="js-reserved-keyword">this</span><span class="js-bracket">)</span>.fadeOut<span class="js-bracket">(</span><span class="js-number">3</span><span class="js-number">0</span><span class="js-number">0</span><span class="js-bracket">)</span>; <span class="js-comment">// If it doesn't match, bin it.</span>
<span class="js-bracket">}</span>

<span class="js-bracket">}</span><span class="js-bracket">)</span>;
<span class="js-bracket">}</span><span class="js-bracket">)</span>;
<span class="js-bracket">}</span><span class="js-bracket">)</span>;</span></pre>
</td>
</tr>
</table>
</div>
<p>I liked this so much, I used it on the Blog Page of this website. Feel free to sort through posts by just typing in the input at the top. Quick tip: the data-* attribute in the Blog Page holds the title and excerpt of each post, which should be enough for basic sorting.</p>
<p><em>Cheers, all!</em></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=1O24CJ3KdhI:QjnoTePgJAg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=1O24CJ3KdhI:QjnoTePgJAg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?i=1O24CJ3KdhI:QjnoTePgJAg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=1O24CJ3KdhI:QjnoTePgJAg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=1O24CJ3KdhI:QjnoTePgJAg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?i=1O24CJ3KdhI:QjnoTePgJAg:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Sickdesigner/~4/1O24CJ3KdhI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sickdesigner.com/input-filtering-quicksand-style/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Fun with Google Maps</title>
		<link>http://sickdesigner.com/fun-with-google-maps/</link>
		<comments>http://sickdesigner.com/fun-with-google-maps/#comments</comments>
		<pubDate>Thu, 13 Sep 2012 05:34:20 +0000</pubDate>
		<dc:creator>Radu Chelariu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[adaptable]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[flexible]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[maps]]></category>
		<category><![CDATA[trick]]></category>

		<guid isPermaLink="false">http://sickdesigner.com/?p=1842</guid>
		<description><![CDATA[Here's a fast, simple and flexible way to have adaptable Google Maps on your website with the cunning use of some CSS positions.]]></description>
				<content:encoded><![CDATA[<p>Here&#8217;s the deal: I&#8217;m going to take a regular Google Maps iframe and stick it as the background of a webpage. You read that right. Then I&#8217;ll just put some dummy text and elements so you can get a better idea of what it&#8217;s going to feel like to use this in a real live project.</p>
<p><a class="demo" href="http://sickdesigner.com/demo/fun-with-google-maps/fun-with-google-maps.html">Demo</a></p>
<p><strong>Demo first, code comes after that.</strong> Don&#8217;t forget to navigate through the examples.</p>
<p>Let&#8217;s get down to it then. The HTML is quite ordinary and I&#8217;ll only be showcasing the important bits:</p>
<div id="fvch-codeblock-0" class="fvch-codeblock">
<table>
<tr>
<td class="fvch-line-numbers">
<pre>1
2
3
</pre>
</td>
<td class="fvch-code">
<pre id="fvch-code-0"><span class="html"><span class="html-comment">&lt;!-- The regular embed code that Google Maps spews out, sans the line break and small tag; also, added &quot;gmap&quot; id as hook --&gt;</span>
<span class="html-other-element">&lt;iframe id=<span class="html-attribute">&quot;gmap&quot;</span> src=<span class="html-attribute">&quot;https://maps.google.com/maps?f=q&amp;amp;source=s_q&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=Cluj-Napoca,+Cluj,+Romania&amp;amp;aq=0&amp;amp;oq=cluj&amp;amp;sll=37.0625,-95.677068&amp;amp;sspn=60.158465,135.263672&amp;amp;ie=UTF8&amp;amp;hq=&amp;amp;hnear=Cluj-Napoca,+Cluj+County,+Romania&amp;amp;ll=46.777248,23.59989&amp;amp;spn=0.206687,0.528374&amp;amp;t=m&amp;amp;z=12&amp;amp;output=embed&quot;</span> frameborder=<span class="html-attribute">&quot;0&quot;</span> marginwidth=<span class="html-attribute">&quot;0&quot;</span> marginheight=<span class="html-attribute">&quot;0&quot;</span> scrolling=<span class="html-attribute">&quot;no&quot;</span> width=<span class="html-attribute">&quot;425&quot;</span> height=<span class="html-attribute">&quot;350&quot;</span>&gt;</span><span class="html-other-element">&lt;/iframe&gt;</span>
<span class="html-other-element">&lt;div id=<span class="html-attribute">&quot;container&quot;</span>&gt;</span><span class="html-comment">&lt;!-- Website stuff goes in here --&gt;</span><span class="html-other-element">&lt;/div&gt;</span></span></pre>
</td>
</tr>
</table>
</div>
<p>The CSS, however is where most of the magic happens:</p>
<div id="fvch-codeblock-1" class="fvch-codeblock">
<table>
<tr>
<td class="fvch-line-numbers">
<pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
</pre>
</td>
<td class="fvch-code">
<pre id="fvch-code-1"><span class="css">body,
html{
<span class="css-property">height<span class="css-selector">:</span><span class="css-value"> 100%</span></span>;
<span class="css-property">width<span class="css-selector">:</span><span class="css-value"> 100%</span></span>; } <span class="css-comment">/* If you don't do this, gremlins will eat your nose. */</span>

#gmap{
<span class="css-property">height<span class="css-selector">:</span><span class="css-value"> 100%</span></span>;
<span class="css-property">left<span class="css-selector">:</span><span class="css-value"> 0</span></span>;
<span class="css-property">position<span class="css-selector">:</span><span class="css-value"> fixed <span class="css-important">!important</span></span></span>; <span class="css-comment">/* Acts in pretty much the same way as background-attachment: fixed for an image background. Has to be !important only if you're using the Google Maps API. */</span>
<span class="css-property">top<span class="css-selector">:</span><span class="css-value"> 0</span></span>;
<span class="css-property">width<span class="css-selector">:</span><span class="css-value"> 100%</span></span>;
<span class="css-property">z-index<span class="css-selector">:</span><span class="css-value"> 1</span></span>; } <span class="css-comment">/* Has to be at least one increment smaller in value than the container's z-index */</span>

#container{
<span class="css-property">background<span class="css-selector">:</span><span class="css-value"> rgba(0, 0, 0, 0.8)</span></span>;
<span class="css-property">border-radius<span class="css-selector">:</span><span class="css-value"> 20px</span></span>;
<span class="css-property">border<span class="css-selector">:</span><span class="css-value"> 3px solid #fff</span></span>;
<span class="css-property">box-shadow<span class="css-selector">:</span><span class="css-value"> 0 10px 20px rgba(0, 0, 0, 0.3)</span></span>;
<span class="css-property">margin<span class="css-selector">:</span><span class="css-value"> 0 auto</span></span>;
<span class="css-property">overflow<span class="css-selector">:</span><span class="css-value"> visible <span class="css-important">!important</span></span></span>; <span class="css-comment">/* Has to be !important only if you're using an on/off switch */</span>
<span class="css-property">padding<span class="css-selector">:</span><span class="css-value"> 40px</span></span>;
<span class="css-property">position<span class="css-selector">:</span><span class="css-value"> relative</span></span>;
<span class="css-property">top<span class="css-selector">:</span><span class="css-value"> 100px</span></span>;
<span class="css-property">width<span class="css-selector">:</span><span class="css-value"> 800px</span></span>;
<span class="css-property">z-index<span class="css-selector">:</span><span class="css-value"> 2</span></span>; } <span class="css-comment">/* Has to be at least one increment larger in value than the Google Maps iframe z-index */</span></span></pre>
</td>
</tr>
</table>
</div>
<p>And that&#8217;s about it. The demo pages show off two extra examples, one in which I used the Goole Maps API instead of the regular embed code and another one in which I added a small jQuery control to turn off the container which would allow users to take full advantage of the screen real estate to interact with the map.</p>
<h4>A few caveats</h4>
<p>The whole technique relies on setting the <code>body</code> and <code>html</code> elements to 100% width and height and a bit of <code>z-index</code> trickery.</p>
<p>If you&#8217;re using the Google Maps API, you need to call <code>!important</code> on your <code>position:fixed</code> because the good people at Google decided that if the map comes via their API, then it should have <code>position: relative</code>. I still can&#8217;t figure why they did that.</p>
<p>If you&#8217;re using an on/off switch, like I did in the third demo, the container will need to have an <code>overflow: visible !important</code> to avoid any clipping.</p>
<h3>So&#8230;</h3>
<p>This isn&#8217;t a revolutionary technique or anything groundbreaking, but it is a creative use of Google Maps and a fairly good way of getting a handle on what CSS positions do and how they do it.</p>
<p><em>Cheers, all!</em></p>
<h4>Update</h4>
<p><a title="Isac Lagerblad's Twitter page" href="https://twitter.com/icaaq" target="_blank">Isac Lagerblad</a> caught an accessibility bug with one of the Google Maps demos, wherein the maps iframe should be loaded at the end of the document in order to prevent screenreaders from having to go through all the Google Maps tiles before getting to the actual content. Demo has now been updated, thanks Isac!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=TtuyRanvqn4:MdpkjwbX3SA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=TtuyRanvqn4:MdpkjwbX3SA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?i=TtuyRanvqn4:MdpkjwbX3SA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=TtuyRanvqn4:MdpkjwbX3SA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=TtuyRanvqn4:MdpkjwbX3SA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?i=TtuyRanvqn4:MdpkjwbX3SA:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Sickdesigner/~4/TtuyRanvqn4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sickdesigner.com/fun-with-google-maps/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Selectively creative</title>
		<link>http://sickdesigner.com/selectively-creative/</link>
		<comments>http://sickdesigner.com/selectively-creative/#comments</comments>
		<pubDate>Sun, 09 Sep 2012 21:28:39 +0000</pubDate>
		<dc:creator>Radu Chelariu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[idea]]></category>
		<category><![CDATA[inspiration]]></category>
		<category><![CDATA[selection]]></category>
		<category><![CDATA[style]]></category>
		<category><![CDATA[trick]]></category>

		<guid isPermaLink="false">http://sickdesigner.com/?p=1832</guid>
		<description><![CDATA[Doing ::selection styles is such a creative block for me, you would've believe it. So here's a fun way of looking at these bits of a website that gets even my creative spark lighting up.]]></description>
				<content:encoded><![CDATA[<p>Let&#8217;s face it, ::selection styles are about as boring as watching turtles fuck. I, borderline, hate doing the damned things and I&#8217;m sure I&#8217;m not the only one with this mindset. I mean about ::selections, not about the turtle thing.</p>
<p>Fortunately, here&#8217;s a pretty nifty idea about ::selections I sort of just stumbled upon: <strong>styling them differently throughout the website</strong>. And the code for that just couldn&#8217;t be simpler:</p>
<div id="fvch-codeblock-0" class="fvch-codeblock">
<table>
<tr>
<td class="fvch-line-numbers">
<pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre>
</td>
<td class="fvch-code">
<pre id="fvch-code-0"><span class="css"><span class="css-comment">/* General style */</span>
::selection{
    <span class="css-property">background<span class="css-selector">:</span><span class="css-value"> #000</span></span>;
    <span class="css-property">color<span class="css-selector">:</span><span class="css-value"> #fff</span></span>; }

    <span class="css-comment">/* Area specific style */</span>
    #id ::selection{
        <span class="css-property">background<span class="css-selector">:</span><span class="css-value"> #a20</span></span>;
        <span class="css-property">color<span class="css-selector">:</span><span class="css-value"> #ef0</span></span>; }

    <span class="css-comment">/* Another area specific style */</span>
    .class ::selection{
        <span class="css-property">background<span class="css-selector">:</span><span class="css-value"> #b1f</span></span>;
        <span class="css-property">color<span class="css-selector">:</span><span class="css-value"> #fff</span></span>; }</span></pre>
</td>
</tr>
</table>
</div>
<p><i>*Vendor prefixes needed, of course</i></p>
<p>Pretty cool, huh? Just don&#8217;t get too carried away with this, lest you waste countless hours just tweaking ::selections like some sort of weird OCD crazed loony. No disrespect intended to people actually suffering from OCD.</p>
<p><i>Cheers, all!</i></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=D7XwxwBRiWY:mFfojbBhBBY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=D7XwxwBRiWY:mFfojbBhBBY:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?i=D7XwxwBRiWY:mFfojbBhBBY:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=D7XwxwBRiWY:mFfojbBhBBY:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=D7XwxwBRiWY:mFfojbBhBBY:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?i=D7XwxwBRiWY:mFfojbBhBBY:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Sickdesigner/~4/D7XwxwBRiWY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sickdesigner.com/selectively-creative/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Breaking the line break</title>
		<link>http://sickdesigner.com/breaking-the-line-break/</link>
		<comments>http://sickdesigner.com/breaking-the-line-break/#comments</comments>
		<pubDate>Sat, 08 Sep 2012 11:53:14 +0000</pubDate>
		<dc:creator>Radu Chelariu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[break]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[line]]></category>
		<category><![CDATA[trick]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://sickdesigner.com/?p=1824</guid>
		<description><![CDATA[Line breaks are a pain in the ass. So here's an itty bitty little trick with line breaks that maybe you wouldn't've thought of given most designers' sheer disgust with this element.]]></description>
				<content:encoded><![CDATA[<p>Usually line breaks are thought of as this big bad wolf and you should avoid using them as much as possible. And generally, I agree, but somehow they keep popping up now and again so here&#8217;s a little trick you may not have thought of doing : styling line breaks!</p>
<p>As I was coding the new Sickdesigner.com (you did notice, didn&#8217;t you?) I, eventually, came upon the comments section. Specifically the comments itself and one thing I noticed WordPress does is it keeps line breaks as users hit Enter in their comments. Not a problem.</p>
<p>But, of course there&#8217;s a but, most users don&#8217;t double Enter for a new paragraph, although if they would, WordPress is so kind as to separate &lt;p&gt; from &lt;p&gt;. So, now I have a problem: user comments look like the blurb of a 12 year old One Direction fan to another 12 year old Justin Bieber fan instead of the elegant, intelectual replies of my peers.</p>
<h3>The jist</h3>
<p>Cmd+C / Cmd+V the very code I used to get user comments properly spaced out and easy to read:</p>
<div id="fvch-codeblock-0" class="fvch-codeblock">
<table>
<tr>
<td class="fvch-line-numbers">
<pre>1
2
3
4
5
6
</pre>
</td>
<td class="fvch-code">
<pre id="fvch-code-0"><span class="css">#comments li p br{ 
    <span class="css-property">clear<span class="css-selector">:</span><span class="css-value"> both</span></span>;
    <span class="css-property">content<span class="css-selector">:</span><span class="css-value"> <span class="css-string">''</span></span></span>;
    <span class="css-property">display<span class="css-selector">:</span><span class="css-value"> block</span></span>;
    <span class="css-property">margin<span class="css-selector">:</span><span class="css-value"> 0 0 10px 0</span></span>;
    <span class="css-property">width<span class="css-selector">:</span><span class="css-value"> 100%</span></span>; }</span></pre>
</td>
</tr>
</table>
</div>
<p>Before you start flaming about what the heck is with that extra code in there, here are some of the issues which lead to this kind of an approach:</p>
<ul>
<li>without a content property, you can do pretty much fuck all with your line breaks; nothing works</li>
<li>if you don&#8217;t clear it, in most cases, it will just behave like an inline-block</li>
<li>which is also why it needs to be a block level element</li>
<li>height and paddings don&#8217;t work; used margin instead, courtesy of <a href="http://twitter.com/ZoranJambor" title="Zoran Jambor's Twitter" target="_blank">Zoran Jambor</a></li>
</ul>
<p>So, a bit of creative thinking and I didn&#8217;t have to go about tinkering with WordPress&#8217; comments engine, of which&#8217;s logic I know nothing about, mostly because I couldn&#8217;t write proper PHP if my life depended on it.</p>
<p><i>Cheers, all!</i></p>
<h4>Update</h4>
<p>The good <a href="http://twitter.com/ZoranJambor" title="Zoran Jambor's Twitter" target="_blank">Zoran Jambor</a> discovered a bug wherein Firefox was disregarding the height property, but margins were working. My initial tests were flawed in seeing margins not working in Chrome for reasons yet unknown. Post updated to reflect new information. Thanks, Zoran!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=lxTlPd90gLY:8IAIHYVqMXQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=lxTlPd90gLY:8IAIHYVqMXQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?i=lxTlPd90gLY:8IAIHYVqMXQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=lxTlPd90gLY:8IAIHYVqMXQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=lxTlPd90gLY:8IAIHYVqMXQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?i=lxTlPd90gLY:8IAIHYVqMXQ:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Sickdesigner/~4/lxTlPd90gLY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sickdesigner.com/breaking-the-line-break/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Masonry in CSS</title>
		<link>http://sickdesigner.com/masonry-css-getting-awesome-with-css3/</link>
		<comments>http://sickdesigner.com/masonry-css-getting-awesome-with-css3/#comments</comments>
		<pubDate>Tue, 03 May 2011 17:38:31 +0000</pubDate>
		<dc:creator>Radu Chelariu</dc:creator>
				<category><![CDATA[html-css]]></category>
		<category><![CDATA[column-count]]></category>
		<category><![CDATA[columns]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[masonry]]></category>
		<category><![CDATA[pinterest]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://sickdesigner.com/?p=1661</guid>
		<description><![CDATA[Use only a few lines of CSS to make a Masonry, or Pinterest, style layout. No Javascript, I promise.]]></description>
				<content:encoded><![CDATA[<p>Gotta tell you folks: this one&#8217;s been bugging me for a week now. I&#8217;m sure everyone is familiar with <a title="David's website" href="http://desandro.com/" target="_blank">David DeSandro</a>&#8216;s awesome jQuery plugin, <a title="jQuery Masonry" href="http://desandro.com/resources/jquery-masonry/" target="_blank">Masonry</a>. Well, what this is is two things. First, it&#8217;s an homage to <a title="David's Twitter" href="http://twitter.com/#!/desandro" target="_blank">David</a> himself and the awesome work that he does. Second, it&#8217;s a kick ass, super simple CSS technique that mimics what Masonry does. With just CSS.</p>
<h3>The all mighty columns</h3>
<p>The solution is so simple that it gave me a brain freeze: CSS columns. Granted, their purpose is to display text in columns like a newspaper, but their display mode is exactly what&#8217;s needed to recreate the Masonry effect. But let&#8217;s get down to the code. What do you need, you say?</p>
<h4>The basic HTML</h4>
<div id="fvch-codeblock-0" class="fvch-codeblock">
<table>
<tr>
<td class="fvch-line-numbers">
<pre>1
2
3
4
5
6
</pre>
</td>
<td class="fvch-code">
<pre id="fvch-code-0"><span class="html"><span class="html-other-element">&lt;div&gt;</span>
<span class="html-anchor-element">&lt;a href=<span class="html-attribute">&quot;#&quot;</span>&gt;</span>Whatever stuff you want to put in here.<span class="html-anchor-element">&lt;/a&gt;</span>
<span class="html-anchor-element">&lt;a href=<span class="html-attribute">&quot;#&quot;</span>&gt;</span>Whatever stuff you want to put in here.<span class="html-anchor-element">&lt;/a&gt;</span>
<span class="html-anchor-element">&lt;a href=<span class="html-attribute">&quot;#&quot;</span>&gt;</span>Whatever stuff you want to put in here.<span class="html-anchor-element">&lt;/a&gt;</span>
...and so on and so forth ad nauseum.
<span class="html-other-element">&lt;/div&gt;</span></span></pre>
</td>
</tr>
</table>
</div>
<h4>And the CSS magic</h4>
<div id="fvch-codeblock-1" class="fvch-codeblock">
<table>
<tr>
<td class="fvch-line-numbers">
<pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre>
</td>
<td class="fvch-code">
<pre id="fvch-code-1"><span class="css">div{
    <span class="css-property">-moz-column-count<span class="css-selector">:</span><span class="css-value"> 3</span></span>;
    <span class="css-property">-moz-column-gap<span class="css-selector">:</span><span class="css-value"> 10px</span></span>;
    <span class="css-property">-webkit-column-count<span class="css-selector">:</span><span class="css-value"> 3</span></span>;
    <span class="css-property">-webkit-column-gap<span class="css-selector">:</span><span class="css-value"> 10px</span></span>;
    <span class="css-property">column-count<span class="css-selector">:</span><span class="css-value"> 3</span></span>;
    <span class="css-property">column-gap<span class="css-selector">:</span><span class="css-value"> 10px</span></span>;
    <span class="css-property">width<span class="css-selector">:</span><span class="css-value"> 480px</span></span>; }

    div a{
        <span class="css-property">display<span class="css-selector">:</span><span class="css-value"> inline-block</span></span>; <span class="css-comment">/* Display inline-block, and absolutely NO FLOATS! */</span>
        <span class="css-property">margin-bottom<span class="css-selector">:</span><span class="css-value"> 20px</span></span>;
        <span class="css-property">width<span class="css-selector">:</span><span class="css-value"> 100%</span></span>; }</span></pre>
</td>
</tr>
</table>
</div>
<p>An interesting fact: the width of the elements within the columned container is not relative to the width of the parent, but the width of the column. In the case of the example above width: 100% actually translates to 150px, not 480px (the width of the parent).</p>
<h4>Fallbacks and browser compatibility</h4>
<p>Of course, our friends at Microsoft have taken good care to not provide support for CSS columns. Not even in IE9! In this case, I recommend slapping in David&#8217;s awesome plugin like so:</p>
<div id="fvch-codeblock-2" class="fvch-codeblock">
<table>
<tr>
<td class="fvch-line-numbers">
<pre>1
2
3
</pre>
</td>
<td class="fvch-code">
<pre id="fvch-code-2"><span class="html"><span class="html-comment">&lt;!--[if lte IE 9]&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery.masonry.min.js&quot;&gt;&lt;/script&gt;
&lt;![endif]--&gt;</span></span></pre>
</td>
</tr>
</table>
</div>
<p>In Microsoft&#8217;s defense, for what it&#8217;s worth, my technique does work (well, even!) in the IE10 Platform Preview. Hopefully they&#8217;ll leave support for columns in the final version, <del>which could be released as early as next year</del> which will see a final release when I&#8217;ll be able to lick the back of my own head.</p>
<p>I&#8217;m guessing there&#8217;s no point in mentioning that this works (brilliantly) in Gecko and Webkit browsers (Mozilla, Chrome, Safari). Opera does weird things that I don&#8217;t quite understand yet, but does an acceptable job of rendering columns (it just has trouble with the gaps and all).</p>
<p><del>This is usually where you&#8217;d find a link to a demo page. This time, however, I direct you to the homepage of this site. Yes, I used it live. I have that much confidence in this. Enjoy, kids!</del> Since the new design doesn&#8217;t use this technique, I put together a demo page here:<br />
<a class="demo" href="http://sickdesigner.com/demo/css-masonry/css-masonry.html" title="Masonry CSS demo page">Demo</a></p>
<p><i>Cheers, all!</i></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=KRoCWhP28pI:YpLU6JHirIc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=KRoCWhP28pI:YpLU6JHirIc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?i=KRoCWhP28pI:YpLU6JHirIc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=KRoCWhP28pI:YpLU6JHirIc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Sickdesigner?a=KRoCWhP28pI:YpLU6JHirIc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Sickdesigner?i=KRoCWhP28pI:YpLU6JHirIc:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Sickdesigner/~4/KRoCWhP28pI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sickdesigner.com/masonry-css-getting-awesome-with-css3/feed/</wfw:commentRss>
		<slash:comments>65</slash:comments>
		</item>
	</channel>
</rss><!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching using disk: basic
Object Caching 897/914 objects using disk: basic

 Served from: sickdesigner.com @ 2013-05-20 14:53:36 by W3 Total Cache -->
