Stuff & Nonsense Home

Where you’ll find designer, author and speaker Andy Clarke. The bastard.

Blogging And All That Malarkey

Designing tweetCC

This week Brian Suda and I launched tweetCC, a Twitter micro-app that allows Twitter users to declare a Creative Commons license for their tweeted content. I’ll be writing more about why we decided to make tweetCC and why licensing you tweets is important in a future entry, but as several people have commented on my design and CSS implementation, first a few words about them.

tweetCC is a simple app and uses just three templates, the home page, search results and a list/article page. This allowed design and implementation to be fast and furious. In-fact I designed the layouts and made the markup and CSS one evening earlier this week. Brian then integrated his php code hooking into the Twiter API and after a few tweaks to the layout and content, the site was ready for its soft boiled launch the same day.

I much prefer to work fast by splashing virtual paint around a canvas. I often find that when a design is spontaneous that I am much happier with the end result than when I labour over every detail. For tweetCC I made a colour swatch and just one rough static visual (for the home page), in Fireworks, to give me a general direction. From there I moved straight into markup and CSS and handled type issues like leading and tracking as well as layout specifics in code. I know that I've harped on about this process before, but designing in the browser is so much faster, more spontaneous and I would dare to say, more creative, than making web page visuals in Photoshop or Fireworks.

Type

tweetCC's design tries to make more from less. Just one (main) typeface and two colours. Depending on your device, you'll see Palatino, Georgia, Times, or a default serif for both body copy and headings. The one place I allowed myself the luxury of another typeface was ampersands in headings. I used italic Hoefler Text via a little (slightly kludgy markup and CSS).

Publish <strong class="amp">&</strong> license tweets with Creative Commons

strong.amp { font-family : "Hoefler Text"; font-style : italic; font-weight : normal; }

I also stuck like glue to a typographic hierarchy placing all type sizes into a scale where they have relationships with other sizes:

body { font : 16px/1.6 Palatino, Georgia, Times, serif; }
h1, h2 { font-size : 48px; }
h3 { font-size : 24px; }
h4 { font-size : 16px; }

That's not a new idea, but when you use only one typeface in a design, even the tiniest decisions matter.

Colours

I made a swatch of dirty colours, but decided to just use two colours in the CSS; one for the base plus white. A long time ago I started trying to reduce the number of colours in my designs, using tints of single colours instead. tweetCC gave me a chance to take this approach in another direction. I used CSS RGBa for the white text at several levels of transparency allowing more or less of the base colour to show through.

body { 
background : transparent url(body.png); 
color : rgba(255, 255, 255, .5); 
text-shadow : #000 1px 1px 2px; }

a, a:visited { color : rgba(255, 255, 255, .8); }

#content { border-top : 3px double rgba(255, 255, 255, .25); }

And so on.

If I used an image, I made it in white and exported it as an PNG image with alpha-transparency to achieve the same effect.

Because I couldn't decide which base colours in my swatch to use in the final design, Brian made the decision for me. We used all of them through a php script that selects a colour at random on page load. There are now ten colours the script can select from.


tweetCC red

Of course not all browsers can (or should) see exactly the same design. Internet Explorer in particular cannot understand RGBa. IE6 misses alpha-transparent PNGs too. As it has become traditional for me to make different designs for different browsers, IE7 is served a design that is as close to optimum as it can handle.


tweetCC as seen through IE7

IE6 (the black-and-white TV of the web) is served a black-and-white design.


tweetCC as seen through IE6

My objective here was not to discriminate against people using IE6 In-fact I really like the black-and-white version and I strangely wish that more people could see it.

Other progressive enrichments come in the form of CSS columns for Mozilla and Webkit based-browsers.

#content div { 
-webkit-column-count : 4; 
-webkit-column-gap : 20px; 
-moz-column-count : 4; 
-moz-column-gap : 20px; }

The more I use CSS multi-columns, the more I am frustrated that neither the W3C's CSS Working Group or the browser makers who bankroll it have so far come up with a solution to something as fundamental to design as say — columns. But that's a story for another blog.

So there you have it, tweetCC. I hope you like it.

Leave your comment

Chris Mahon

February 21 2009 @ 01:41am #

Just wanted to say the handling of multi colour variations is awesome, definitely something I’m going to investigate for future projects :)

Ryan Merrill

February 21 2009 @ 02:13am #

Nice write up on the design/coding, Andy. I think the site looks great in each color.

I did have one question, though. You said that you used CSS multi-columns, but it doesn’t work in IE7.

Does that not necessarily bother you because it is still readable and the gist of the site still comes across effectively?

Andy Clarke

February 21 2009 @ 02:26am #

@Ryan Merrill: “I did have one question, though. You said that you used CSS multi-columns, but it doesn’t work in IE7. Does that not necessarily bother you because it is still readable and the gist of the site still comes across effectively?”

Absolutely. I’m not bothered one bit that people using IE7 don’t see the columns. They are not an integral part of the design, and let’s face it, anyone using that browser will simply not know they are missing. I have also added extra styles for IE6/7 so that things like the blockquotes are more readable without columns. Web sites don’t have to look exactly the same in every browser.

Matt Wondra

February 21 2009 @ 08:18am #

Beautiful work. All it’s missing is a favicon.

... unless the omission was intentional. Don’t want to go pointing fingers at the masters.

Andy Clarke

February 21 2009 @ 10:07am #

@Matt Wondra: That was a cock up, and now there’s a cock favicon. Thanks for the gotcha. I had completely forgotten about a favicon in all the excitement.

DVQ

February 21 2009 @ 02:34pm #

Very nice, I like your use of CSS3 techniques.

Would you mind sharing the random color script with us?

Andy Clarke

February 22 2009 @ 12:29am #

@DVQ: I’m sure Brian won’t mind if I share the random colour script.

<?php
// choose a random background colour
// list of HEX colours to choose from
$colors = array('253e76','340d0e','5d2901');

// randomly select a colour from the list
$bgColour = $colors[rand(0,count($colors)-1)];
echo 'html { background-color: #'.$bgColour.';}';
?>

DVQ

February 22 2009 @ 02:54pm #

@Andy: Thanks, works great!

Tim Van Damme

February 23 2009 @ 05:44am #

I’m in! I love the concept, and the design. One thing I dislike is the styling of links. There isn’t enough visual difference between body text and links.

Régis Kuckaertz

February 23 2009 @ 07:50pm #

Did it, yeah! Would you mind me using TweetCC as a reference to showcase progressive enhancement during some in-house workshops?

I particularly love the styling on the list of users; the transition effect on links is subtle yet very pleasing to the eye. Wunderbar!

Steve Killen

February 23 2009 @ 08:40pm #

Love the restrictions in the design, perfect styling, I would echo Tim’s comment about the lack of contrast between the normal and link text though. My favourite colour is definitely the darker blue but I have a sneaky fondness for the IE6 version.

Andy Clarke

February 23 2009 @ 09:45pm #

@Régis Kuckaertz:: Thanks for your kind comments. I would love you to use tweetCC in your workshops. Go right ahead.

@Tim Van Damme:: I’ll look at the link contrast difference later today.

@Steve Killen: I like the IE6 version too. So much so that I sneaked a similar version into the main set of random colours!

DVQ

February 26 2009 @ 06:45am #

Just a thought, but wouldn’t it be better to use something like:

<body class=”<?php $colors = array(‘253e76’,‘340d0e’,‘5d2901’); $bgColour = $colors[rand(0,count($colors)-1)]; echo ‘bg-color-’.$bgColour.’‘; ?>”>

Thus removing the inline style and allowing from a lot more customization, ie. body.bg-color-253e76 a:hover etc.

chris sharp

February 27 2009 @ 02:31am #

I love your idea of using RGBa to set the colours, but I couldn’t think where I would use it to a similar effect (mainly due to IE).

However, the penny has just dropped, RGBa is perfect for text-shadow and box-shadow.

I’m working on a site where elements have drop shadows, but their background colours are not always the same.  Greyscale shadows weren’t cutting it, so it required a lot of extra lines of CSS (mainly because you can’t just set the color {text-shadow:#141} you have to included the 3 numerical values, so you can’t group together elements with different depth shadows).

RGBa to the rescue.  Set the drop shadow with a greyscale value and then use the alpha to allow just the right amount of background through. The only IE worry is that they may introduce text-shadow before RGBa, but I can live with that for now.

I recognize that this may be industry best practice, but it was a whole new revelation to me.  Thanks Andy

Commenting is not available in this channel entry.
Hardboiled Web Design

Hardboiled Web Design by Andy Clarke

How the latest technologies and techniques will make your websites more creative, flexible and adaptable. Get hardboiled in all formats from Five Simple Steps. Digital formats also available at Amazon.com, Amazon.co.uk and the iBooks store.

We’ve deconstructed this site to focus on content while we restyle. Expect wonkiness during the transition.