tagsoup.org

Having sat in on an interesting all-star seminar on CSS organisation at @Media 06 I figured I could post 5 tips about how I did for the template I've just built for this blog. It won't suit every person and every project of course, but you might be interested:

  1. While writing the markup (before the CSS of course), copy all the id and class names into a CSS file as they are added to the page. This means when it's completely finished any empty (and therefore unused) ones can be removed from both the CSS and the markup.
  2. Use the
    @import 'your.css';
    CSS filter format to hide presentation from v4 PC browsers and Mac IE.
  3. Put any hacks in a separate file, using IE conditionals to include it - I like this because it means only IE users have to download the extra file: Serves them right.
  4. For small sites have one CSS file. Use comments in this file to split it up and find your way about. I suggest "Global" (with "Layout" and "typography" sub-sections) then individual page sections (e.g. "mainContent" etc.). For large sites the number and organisation of files will depend on the design. You may have a global CSS file and then individual files for each discrete site section or you may have a global file and then separate files for repeated page elements, or both - whatever's suitable, but use the comments either way.
  5. Have individual CSS rules all on one line so the file doesn't get too tall (it's harder to read initially, but you get used to it) and order with positional values first, then sizing then decoration to help quickly spot the bit you need.

Labels:

0 Comments | Back Links |

I realised recently I have a set rules / patterns I observe when choosing T-Shirts to buy. Here they are:

  1. No slogans, especially funny ones. It's not the 80's any more.
  2. Avoid logos. I'm not a walking billboard.
  3. Don't buy ringer-less white cotton - they always look like you got it free with 10 beers, whatever's actually printed on it.
  4. I don't like designs with straight edges, imprecise edges helps it blend with the rest of the shirt and look much classier, as does having the print somewhere other than the centre of the chest.
  5. Don't shop where everyone else does. The internet helps here - here's my shortlist of favourite suppliers. NB however that American sizes are sometimes one up from UK ones - get measurements if you can.

0 Comments | Back Links |

TFL have quietly introduced a few cool tools recently, forming the backbone of my 5 top tips for travelling round London efficiently:

  1. You can go to the Oystercard Shop and set your Oystercard* to auto top up from your credit/debit card whenever it drops below £5. No more queueing to top up as the last train departs.
  2. It's quicker to walk between some stations. Well we all know that, but which ones? This map shows all stations that are within 500m of each other. Here's a compendium of tube map versions while we're at it.
  3. Fed up of the slow online journey planner? Use the PDA version instead. (Thanks Nik.)
  4. You can get updates texted or mailed to you when lines you use are affected by repair work with the TFL travel alert service.
  5. And if you're too late for the tube it's night busses or minicabs. Where can you get the number of the local minicab from though? Why, TFL of course. This mobile service will return you the text of a licences firm near where you are right now. Summary: HOME to 60835.
* I won't bother saying get an Oystercard - whatever your concerns about privacy it's too much of a cash benefit to eschew.

0 Comments | Back Links |

Subscribe to
Posts [Atom]

If you liked this, you might also like: hampson.org.uk