skip navigation
The bit,

Posts Tagged ‘design’

The 2nd half of design

People say football is a game of two halves. In the same way, so is design. The first half where you understand the problems and test methods to solve these issues. I’ll pick up this in a separate blog post. As for this post (the 2nd half), it’s all about the logic, math and patterns.

This is the area developers and designers have a lot in common, which will then get implementing through the markup and styles (HTML and CSS).

This stage’s core is all about re-using, discovering logical visual theories and patterns, then applying them through mathematics and implementation. There’s a few other parts of the game going alongside, but lets focus on this area of it. This sometimes gets applied to paper, stays in people’s heads or through word of mouth. Rarely does it go into the stylesheet as a reminder or guidance or how it gets there. On occasions it goes into a pattern library – which needs pulls these workings out into a slipstream.

We naturally don’t keep the workings out of this in the implementation area. Yet if you look at any well written program, you’ll get to see clear workings out of the programs implementation within the program itself. Keeping this knowledge in the program itself will allow it to be easily updated, reused, applied else where with modifications by yourself and others in months and years to come.

So enter SASS. For those of you that don’t know what it is, it’s a better way of writing CSS – enabling nested rules, variables, mixins, selector inheritance and more.

The real game changer for us is the combination of being able to do calculations (of numbers and variables) and variables (giving a number or a calculation a name).

The very thought of this should say it all… you can now actually say in your code what the designer is thinking. Here’s why this is awesome.

div { width: 960px;  }

div#welcome {
  width: 910px;
  padding: 10px 25px;
  background-color: #f3f3f3;
  }

div#my-talk  {
  width: 410px;
  padding: 10px  425px 10px 25px;
  background: #f3f3f3 url(me-talking-to-someone.jpg) right center;
  }

Can you understand why both those two are different quickly? Now if you were to just commend some of the differences…

/* setting all div widths... there really wasn't a need for this yet? */
div { width: 960px;  }

/* So the welcome div has no image in it... but I want all text to be padded
on the left and right and to have a bg colour */
div#welcome {
width: 910px;
padding: 10px 25px;
background-color: #f3f3f3;
}

/* Now we're cooking!  Added in a nice background image of me talking... the padding is to push the right side in and the width is adjusted accordingly */
div#my-talk  {
width: 410px;
padding: 10px  425px 10px 25px;
background: #f3f3f3 url(me-talking-to-someone.jpg) right center; }

The above code is a lot more useful, for understanding it – but not for editing it quickly. If the differences were explained in equations and variables, you would get the following

$paddingSides = 25px
$largeImageSize = 425px
$divDefaultWidth = 960px
$widthDivHasContent = $divDefaultWidth - $paddingSides
$widthDivHasContentHasLargeImage = $widthDivHasContent - $largeImageSize

div {
  width: $divDefaultWidth

  #welcome {
    width: $widthDivHasContent
    padding: 10px $paddingSides
    background-color: #f3f3f3
  }
  #my-talk {
    width: $widthDivHasContentHasLargeImage
    padding: 10px  $largeImageSize 10px $paddingSides
    background: #f3f3f3 url(me-talking-to-someone.jpg) right center
  }
}

Because of how we’ve now separated the workings out (design calculations) from the implementations. It makes it easy to see any design problems and fix them.

HTML5. Again.

This time last year I released my new blog built from scratch on the barebones wordpress theme from Elliot Jay Stocks – starkers, which I nicknamed themed up as sharp due to it’s sharp speech bubbles and used the V logo (standing in for my surname – Vong).

Today I relaunch a similar project which I’ve been working on/off for a while now and hindered due to discover my web host (MediaTemple) not supporting the latest version of Ruby (1.6 and not 1.5). So after playing locally with StaticMatic, Jekyll and GitHub on Ruby, I reverted to a new blank theme and moving over my HAML and SASS.

The whole thing is versioned on my local servers with GIT, written in HAML (similar to zen-coding without the expansion of tags) and SASS. Despite moving away from StaticMatic, the whole site written for it was compiled out to HTML for me to export into php. Something I was very grateful for!

Chunky bacon - a Why's poignant guide to Ruby quote

Alongside building the site, I’ve been reading lots of SitePoint and O’Reilly books such as jQuery: Novice to ninja, Why’s Poignant Guide to Ruby, Introducing HTML 5 (Voices That Matter) and I’ve just started on a JavaScript Cookbook as well as a few other books.

For those of you doing web design or building up design patterns – lots of the new semantics in HTML5 will help you in picking and reusing information/designs patterns you have. A great example can be found when looking at the inner workings of: sections, articles and hgroups containing headers, content and footer elements inside them – which could start up some interesting discussions on how you could use them in your layouts. Something that Jeremy Keith looks at in his book HTML5 for Web Designers.

It does all make me wonder how many mistakes we’re all going to make as a result of everyone having different interpretations of how it works with it all being so new. This knock on effect will have a real impact for those of us with little time to practice using HTML5 outside of production, however the web has proved over the years that even the most horrible of implementations and hacks can still have some good impact. If you’re not sure of where to start, a good reference place to begin is with Remy Sharp and Bruce Lawson’s HTML5 examples by simply viewing the source of the example pages.

Despite the use of this site being fully in HTML5 and the existence of Modernizer (the jS script to enable HTML5 for IE and pre-HTML5 browsers), For production and huge traffic websites – I’ll be sticking with div tags using classes their future HTML5 replacements. Using the safest bits of HTML5 – such as improvements to forms improvements and the HTML5 doctype/charset utf-8. In the mean time, I like to think of this site and my mini-projects as preparation for the invasion of the HTML(5) element snatchers.

Right. Enough serious stuff. Now for something random and different. First person to guess where the inspiration for this comes from wins something cool. Just tweet me the answer through the link below.

PS. The video above is using YouTube’s experimental HTML5 feature – an iFrame ;) .