Category: Code

Open site redesign using a pattern library

As I’ve mentioned previously, I’m in the process of redesigning this web site. It’s very much a work in progress. Pattern Library As a first step I’m building a pattern library and I’ve decided to open source the repo during the build process. I’m using Pattern Lab for the purpose.

Code

The HTML5 Document Outline

The MDN page titled Sections and Outlines of an HTML5 Document includes the following warning: There are currently no known implementations of the outline algorithm in graphical browsers or assistive technology user agents […] authors are advised to use heading rank (h1 – h6). Given the speed at which CSS3 is implemented, this is disappointing. […]

Code

Firefox inputs and line-heights

For years, Firefox has taken the prize for the single most frustrating rule in a UA stylesheet. input { line-height: normal !important }

Code

Why Use a Naming Convention

In my last post, I mentioned I was trialling the SUIT CSS naming convention as I redevelop this site.  More generically, let’s address why a naming convention should be used at all. For the purposes of this post, I’m talking specifically about class naming conventions. (While one may have naming conventions for JavaScript functions, variables, […]

Code

Trying the SUIT CSS Naming Convention

I’m in the process of redeveloping this site. The site will still use WordPress but I’ll be adding a custom skin. I’ve been wanting to try Pattern Lab for a while, so the first step is to create a pattern library. It’s early days, today’s task it to set up a reset and base styles. […]

Code

Heart

As a tribute to Eric Meyer’s daughter Rebecca, the named colour rebeccapurple has been accepted into the CSS spec. Rebecca passed away on her sixth birthday recently.

Code

Relative Unit Based Media Queries

Based on the standard browser font-size of 16px, the following media query to have an affect on screens 160 pixels wide and up. @media only screen and ( min-width : 10em ) { html { background-color: #ddd; } } Now, I would expect adding the following code would cause the media query above to have […]

Code

Automatically generate Pattern Lab on git pull

Pattern libraries are becoming better known as sites such as the BBC and A List Apart release their pattern libraries publicly. For the uninitiated, a pattern library is a collection of elements used on a web site. They define everything from the base font to page layouts. Brad Frost and Dave Olsen’s Pattern Lab is […]

Code

Conditional IE classes

The HTML5 Boilerplate popularised the html tag conditional classes pattern. This pattern is usually some variation of: <!DOCTYPE html> <!–[if lt IE 7 ]> <html lang=”en” class=”ie6″> <![endif]–> <!–[if IE 7 ]> <html lang=”en” class=”ie7″> <![endif]–> <!–[if IE 8 ]> <html lang=”en” class=”ie8″> <![endif]–> <!–[if IE 9 ]> <html lang=”en” class=”ie9″> <![endif]–> <!–[if (gt IE […]

Code

Optimising the Typekit Code

The Typekit kit editor provides two versions of the embed code, the default version blocks rendering and the asynchronous version which can produce a flash of unstyled content (FOUC). In the case of Typekit, I prefer the FOUC over slowing down rendering. The asynchronous code also offers the advantage of your site staying online should […]

Code