<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
  <title>Jon Hadley on scriptogr.am</title>
  <link>http://jon-hadley.com</link>
  <description>Digital Magpie</description>
  <pubDate>2012</pubDate>
 
  <item>
    <title>SASS - Dynamic CSS finally arrives</title>
    <pubDate>Fri, 27 Apr 2012 10:38:00 -0400</pubDate>
    <link>http://jon-hadley.com/post/sass-dynamic-css-finally-arrives</link>
    <guid>http://jon-hadley.com/post/sass-dynamic-css-finally-arrives</guid>     
    <description><![CDATA[<p>"Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It’s translated to well-formatted, standard CSS using the command line tool or a web-framework plugin." - Via <a href="http://sass-lang.com/">Sass-lang.com</a></p>

<p><a href="http://www.siftgroups.com">We've</a> recently been using <a href="http://sass-lang.com/">Sass</a> in <a href="http://drupal.org/">Drupal 7</a> via the base theme <a href="http://drupal.org/project/sasson">Sasson</a>.</p>

<p><a href="http://drupal.org/project/sasson">Sasson</a> deserves a blog post of it's own - it's got many useful, non <a href="http://sass-lang.com/">Sass</a> features to speak of. Most importantly though, it does just enough, without getting in your way, or isolating too many settings to the admin interface. The project maintainers in particular, are refreshingly <a href="http://drupal.org/project/issues/sasson?status=All&amp;categories=All">open and responsive</a>.</p>

<p>But, <strong>what's so great about <a href="http://sass-lang.com/">Sass</a></strong>, particularly in a real-world agency environment?  I'm not going to cover everything - refer to SASS's <a href="http://sass-lang.com/docs.html">great documentation</a> for that but let's dive into some examples of it's major features, from a real world, recently completed project:</p>

<h2>Variables</h2>

<pre class="prettyprint"><code>$background: #fff;
$body-text: #000;
$standard-padding: 30px;
$standard-line-width: 2px;
$block-width: 980px;
</code></pre>

<p>By far the quickest and most obvious time savers are variables. Most large websites will end up duplicating certain standard brand colours, text sizes and padding widths etc. across the site.</p>

<p>Not only is it tiresome to re-write these every single time (to the point where I dream about the hex codes for projects built 6 years ago), it's also prone to human error when the inevitable re-brand takes place and you have to search and replace each value.</p>

<p>Having these variables in a single, easy to read file, also has the knock on effect of making sure you <a href="http://en.wikipedia.org/wiki/Don't_repeat_yourself">Don't Repeat Yourself</a>, as you'll very quickly pick up on duplications or unnecessary variations.</p>

<p>Moreover, once these variables are defined, it's incredibly easy to rebrand cookie cutter sites, by just swapping in new variable library files.</p>

<p>Even better, <a href="http://drupal.org/project/sasson">Sasson</a> can provide variables defined via it's Drupal admin page. This is particularly useful for responsive grid layouts.</p>

<pre class="prettyprint"><code>.views-row-odd{
    padding: [gutter-width] 0 [gutter-width] [gutter-width];
}
.views-row-even{
    padding: [gutter-width] [gutter-width] [gutter-width] 0;
}
</code></pre>

<h3>Operations on variables</h3>

<p>But what about variations on those standards? <a href="http://sass-lang.com/">Sass</a>  allows for that, and more. You can perform mathematic operations on previously defined variables:</p>

<pre class="prettyprint"><code>padding: $small-padding/2;
</code></pre>

<p>Even better, you can combine variables and operations. In the example below, I'm automagically catering for the extra space the padding will add to the width of the box</p>

<pre class="prettyprint"><code>width: $block-width-$small-padding*2;
</code></pre>

<h2>Mixins</h2>

<p>Mixins are similar to variables, but with multiple lines.</p>

<p>This is a commonly used font-face mixin of mine:</p>

<pre class="prettyprint"><code>@mixin font-gothic {
    letter-spacing: 0.015em;
    font-family: "alternate-gothic-no-2-d", sans-serif;
    font-style: normal;
    font-weight: 400;
    text-transform: uppercase;
}
</code></pre>

<p>Rather than repeat these 5 lines every time I want to include the custom font, I now just include the line as follows:</p>

<pre class="prettyprint"><code>h3 {
    font-size: 24px;
    @include font-gothic;
}
</code></pre>

<p>The time saving potential of Mixins are endless. They're particularly great at condensing multi-line CSS3 vendor prefixes down to one line.</p>

<h3>Mixins &amp; Arguments</h3>

<p>One of my favourite features of Mixin's is the ability to add arguments. Again, multi-line CSS3 effects, or cross browser fixes can easily be condensed to one liners. Consider the <a href="http://www.dustindiaz.com/min-height-fast-hack/">min-width hack</a>.</p>

<pre class="prettyprint"><code>@mixin minimum-width($min-width)  {
    min-height:$min-width;
    height:auto !important;
    height:$min-width;
}
</code></pre>

<p>In your scss file you can now just supply a pixel value and all the work is done for you:</p>

<pre class="prettyprint"><code>#navbar { 
    @include minimum-width(980px); 
}
</code></pre>

<h2>Nesting</h2>

<p>Once you've used it, you'll find it hard to look back from nesting. Traditional CSS just seems so bloated in comparison.</p>

<p>Two of my favourite time savers:</p>

<h3>Nested lists</h3>

<pre class="prettyprint"><code>ul li {
    list-style-type: circle;
    ul {
            padding-left: 1em;
        li {
                list-style-type: square;
            }
    }
}
</code></pre>

<h3>Link and hover states</h3>

<pre class="prettyprint"><code>a {
    &amp;:link,
    &amp;:visited {
            color: $body-link;
            text-decoration: none;
    }
}

a {
    &amp;:focus,
    &amp;:hover,
    &amp;:active {
        color: $body-text;
            text-decoration: underline;
    }
}
</code></pre>

<h2>Conclusion</h2>

<p>As the examples above should make clear, not only does <a href="http://sass-lang.com/">Sass</a> make CSS quicker, easier and dare I say it, more fun to create, especially in large CMS contexts; it also drags CSS kicking and screaming into the 21st century, finally adding the dynamic functions we've been afforded in every other language.</p>

<p>Indeed, The <a href="http://w3.org/">W3C</a> has taken note and a working draft for '<a href="http://dev.w3.org/csswg/css3-hierarchies/">CSS Hierarchies</a>' (think nesting) is gaining steam - well, <a href="http://w3.org/">W3C</a> steam at least, at the usual rate of change it will probably be ratified in 2064!</p>

<h3>What about LESS?</h3>

<p><a href="http://lesscss.org/">LESS</a> CSS (not the <a href="http://lessframework.com/">LESS Framework</a>) was influenced by <a href="http://sass-lang.com/">Sass</a> - in fact, <a href="http://sass-lang.com/">Sass</a>'s newer SCSS syntax was in turn added as a response to <a href="http://lesscss.org/">LESS</a> 's cleaner, reusable syntax.</p>

<p>We tried <a href="http://lesscss.org/">LESS</a>  on another project, before settling on <a href="http://sass-lang.com/">Sass</a>. To be honest, there's not a lot to choose between them. We just found the <a href="http://sass-lang.com/">Sass</a> compiler slightly easier to work with and the brilliant <a href="http://www.drupal.org">Drupal</a> integration offered by <a href="http://drupal.org/project/sasson">Sasson</a> was the final nail in the coffin.</p>
]]></description>
  </item>
 
  <item>
    <title>Interaction Conference 2012, Dublin</title>
    <pubDate>Fri, 17 Feb 2012 14:58:00 -0500</pubDate>
    <link>http://jon-hadley.com/post/interaction-conference-2012-dublin</link>
    <guid>http://jon-hadley.com/post/interaction-conference-2012-dublin</guid>     
    <description><![CDATA[<p>I attended the <a href="http://www.ixda.org/">IxDA</a>'s annual conference, <a href="http://interaction12.ixda.org/">IxD12</a>, for the first time at the beginning of February 2012.</p>

<p>The IxDA is a global network dedicated to the professional practice of Interaction Design. It encompasses, among others, UX, IA, graphic design and programming.</p>

<p>I've been to many conferences in the past, including dConstruct, various Carsonified FOWA's &amp; FOWD's (usually of varying quality) and quite a few geekier offerings (PloneCon, DrupalCon and the brilliant Yahoo! <a href="http://www.plasticbag.org/archives/2007/04/a_hack_for_europe/">HackDay</a>).</p>

<p>IxD12 was head and shoulders above any conference I've attended in the past, both in organisation and content. I found the variety of theoretical and practical advice on offer to be perfect.</p>

<p>The only downside was that I've visited Dublin many times before, but that's a minor quibble<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup>.</p>

<h2>Top 3 talks</h2>

<p>Over the coming weeks I hope to <strong>write up my extensive notes online</strong>, but my top 3 highlights of the many great talks were:</p>

<ul>
<li><p><a href="http://www.slideshare.net/Rachel_Hinman/the-mobile-frontier-11393284">The Mobile Frontier</a> - <a href="https://twitter.com/#!/hinman">Rachel Hinman</a> - An instantly useful talk regarding expanding trends in mobile. Tons of useful information in Rachel's slides that you can put in practise immediately.</p></li>
<li><p>Understanding Us: The Next Frontier - <a href="http://twitter.com/#!/dknemeyer">Dirk Knemeyer</a> - A slow burning talk, that really massaged my brain. Lots of his central points have stuck in my mind weeks later. (His slides aren't online yet, as far as I can tell. There's similar on <a href="http://www.slideshare.net/dknemeyer">slideshare.net</a> for now)</p></li>
<li><p><a href="http://abbytheia.wordpress.com/2012/02/04/ia_heuristics/">Does It Have Legs? Information Architecture Heuristics for Interaction Designers</a> - <a href="http://twitter.com/#!/abby_the_ia">Abby Covert</a> - Required reading for any UX/IA professional. Can't wait for the poster.</p></li>
</ul>

<h2>Trending Topics</h2>

<p>The recurring themes over the 3 days I attended seemed to be:</p>

<ul>
<li><p>Mobile is here and has been for a while. In fact, we should all be thinking <a href="http://www.amazon.co.uk/gp/product/0123820944/ref=as_li_ss_tl?ie=UTF8&amp;tag=mophosandphot-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=0123820944">cross-channel</a> now.</p></li>
<li><p>We are all Cyborgs. <a href="http://cyborganthropology.com/What_is_Cyborg_Anthropolog">Cyborg Anthropology</a> - the study of human use of technology - is an increasingly important field.</p></li>
<li><p>Get ideas out of your head and into prototype as fast as possible. Their application will follow.</p></li>
<li><p>Exchange skills. All UX professionals should be able to code at some level.</p></li>
<li><p>Don't test in labs, test in the real world.</p></li>
</ul>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>Won't someone please send me to New Orleans for <a href="http://2012.iasummit.org/">IA Summit 2012</a>. :D&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
]]></description>
  </item>
 
  <item>
    <title>The Beauty of Digital: New technologies, old aesthetics and where the two meet</title>
    <pubDate>Fri, 06 Jan 2012 00:00:00 -0500</pubDate>
    <link>http://jon-hadley.com/post/the-beauty-of-digital-new-technologies-old-aesthetics-and-where-the-two-meet</link>
    <guid>http://jon-hadley.com/post/the-beauty-of-digital-new-technologies-old-aesthetics-and-where-the-two-meet</guid>     
    <description><![CDATA[<blockquote>
  <p>"There's no either/or anymore - digital is part of our creative lives, creating new possibilities and opportunities. But does that mean pre-digital knowledge, expertise and aesthetics are redundant, or is something much more interesting happening as old and new come together in the mix?"</p>
</blockquote>

<p>I attended this <a href="http://www.watershed.co.uk/whatson/3263/new-technologies-old-aesthetics-and-where-the-two/">brilliant panel</a> at the Pervasive Media Studio, The Watershed, Bristol (here's a great <a href="http://www.pmstudio.co.uk/news/2012/01/26/the-beauty-digital-new-technologies-old-aesthetics-and-where-two-meet">supporting blog</a> post).</p>

<p>Much of my enjoyment came from the wide variety of expertise on offer from the speakers:</p>

<h2>Jonathan Waring - Self confessed type nerd</h2>

<p><a href="http://twitter.com/#!/waringdesign">Jonathan</a>, Creative Director, <a href="http://www.3sixty.co.uk/about-us/jon-waring">3Sixty</a>, came from a pre-digital, traditional publishing background, to the extent that the punishment of his first employer in Germany was to force him to painstakingly lay-out, on a letterpress, a poster for a local company - a task that took 4 days.</p>

<p>His central point was based around this experience - perhaps, with the technology currently at our disposal, we are far too quick to dive into <em>creating,</em> without properly considering our approach and taking time.</p>

<p>I didn't buy into this completely, a bad designer is a bad designer whatever their method. But it did ring true with Ben Bodien's <a href="http://24ways.org/2011/crafting-the-front-end">article for 24 ways</a>, suggesting that Web Development is becoming a craft and we should build and hone our tools and techniques over time.</p>

<h2>David McGoran, Roboticist, Puppeteer &amp; Dancer</h2>

<p>David's talk (he's from <a href="http://rustysquid.org.uk/">Rusty Squid</a> a Bristol based collective) was my favourite of the panel, if only because the (frustratingly quick) flash of his <a href="http://www.engadget.com/2008/07/30/heart-robot-loves-to-be-hugged-express-emotions/">Heart Robot</a> tugged at my heart strings - as I'm sure he intended.</p>

<p>David's argument, passionately put, was that we are base, emotional animals and that technology developers would do well to remember this. Although, how to do this, with emotionless computer screens is a challenge. The Gamificaiton approach is a blunt tool to harness our dopamine rush. But he still made me want to get my Arduino out and make something real.</p>

<p>His talk included illustrations of dancers and performers from the 17-1900's, many of whom developed neutral masks or covers for their faces and expressed all of their emotions through their body and pose. Many robotics engineers, would do well to look back at the library of images these early pioneers created, detailing each and every approach for expressing meaning or emotion.</p>

<p>Another great tangent he explored, was how the technology of Greek Theater was often decades ahead of the military technology of the time. Yet now, performance technology is little more than high definition 3D displays.</p>

<p>One centrally agreed point of the night, from David's talk, is that much of the non-digital technology that <strong>is</strong> dying, is actually not as old as we think.</p>

<p>Do we really care about the death of newspapers? After all Martin Luther was an <a href="http://www.economist.com/node/21541719">avid tweeter 500 years ago</a>.</p>

<h2>Baldur Bjarnason - PhD subject: eBooks and interactivity</h2>

<p>I learned a lot from <a href="http://twitter.com/#!/fakebaldur">Baldur</a>, including the real origin of the phrase "You can't tell a book from it's cover".</p>

<p>In fact books never had designed covers before <em>mass</em> production, for the unwashed <em>masses</em>, came along. Before that, rich society types had their books binded individually and decorated to their tastes.</p>

<p>Baldur also expressed his dislike of the ever popular grid systems and it's modern day equivalent - the Windows Phone 7 <a href="http://en.wikipedia.org/wiki/Metro_Design_Language/">Metro design language</a>. Both systems that have taken the emotion and fun out of design, whilst trying to keep a standard blank playing field for all users.</p>

<p>His argument was that Apple products were so loved, because they chose to embrace emotion in design - people enjoy them (Although, personally I find their recent skeuomorphism trend slightly jarring).</p>

<p>Finally, he mentioned many interesting developments in the eBooks arena, the subject of his PhD thesis. Many sounded very useful - standardised hash tags for each page of a book for example - but it couldn't help but remind me of of Nicholas Carr's key arguments in '<a href="http://www.amazon.co.uk/gp/product/1848872259/ref=as_li_ss_tl?ie=UTF8&amp;tag=mophosandphot-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=1848872259">The Shallows</a>': we are meant to be reading and consuming information in considered isolation, not skimming the surface and exploring tangents on Wikipedia every 2 minutes.</p>

<h2>Simon Johnson - Game Designer</h2>

<p>I'm a big fan of <a href="https://twitter.com/#!/donnyBronson">Simon Johnson</a>, <a href="http://slingshoteffect.co.uk/">Slingshot</a> and <a href="http://igfest.org/about-igfest">Igfest's</a> work - the success of their now multi city <a href="http://slingshoteffect.co.uk/ourgames/28-28hourslater">Zombie Apocalypse game</a> speaks for itself.</p>

<p>I was less aware of their work with the <a href="http://slingshoteffect.co.uk/ourgames/4-tweeture">Tweeture Bot</a> and '<a href="http://slingshoteffect.co.uk/ourgames/18-hatgame">The Hat Game</a>'. Both great adaptations of existing social media, which both produced some brilliant off-line results.</p>

<p>Another talk that made me want to get the hardware out again.</p>

<p>A final point of the evening, regarding the over-prevalence of Victorianism in recent retro 'designs' was amusingly undermined by Simon and David's rather dashing flat caps.</p>

<hr />

<p>A great night. Many thanks to hosts by <a href="http://twitter.com/#!/chrissharratt">Chris Sharratt</a> , Editor of creative industries website <a href="creativetimes.co.uk">creativetimes.co.uk</a>, and <a href="http://twitter.com/#!/clarered">Clare Reddington</a>, Director, iShed and <a href="http://www.pmstudio.co.uk/">Pervasive Media Studio</a></p>
]]></description>
  </item>
    
</channel>
</rss>
