Archive for June, 2006

@media, Hot Topics Panel

Saturday, June 17th, 2006 at 1:22am

Closing panel for the conference. Just a mixture of random thoughts and questions.

  • CSS is still an undiscovered country – progressive CSS should come. IE7 is playing catchup with a lot of the other browsers.
  • Evangelising on the use of CSS is done – it should be a given (ha ha ha in some places)
  • We’re now waiting for the next leap forward in what we can depend on as far as browser support for the standards.
  • Tantek demonstrated cutting edge css in Safari – a honeycomb pattern (yes, hexagons!) with rollover change of state – done entirely with CSS and not a graphic in sight. Blimey! That man has an enormous brain…
  • Wireframing applications with XHTML/CSS is the only way to test fluid and changable size of text etc.
  • What’s missing from WebUI – Tantek would like an “undo” analagous function – plus CTL-S to save text in a form as you’re going along (how many times have forms bombed on send, much to our cussing?) Or even better, persist it in the browser so its still there when you come back next time.
  • Yahoo Libraries – no idea why I wrote this down, will have to Google for enlightenment ;-)
  • Can Ajax be made accessible? Questioner wondered whether inaccessibility was a fundamental problem of Ajax, or just how it is implemented on any given site. User Agents are not really fully Ajax capable. Refs, Derek Featherstone/Joe Clarke basecamphq.com
  • According to technorati.com ’s user stats, 15% of users have Javascript turned OFF!
  • It’s best to specialise, but be aware of the designer/developer “trench” :-)

What’s Coming Up?

  • We need real, practical solutions for web designers
  • Best practices
  • Microformats, iCal
  • OpenData – ยต-formats, mashing, GoogleMaps release API, giving us frappr.com
  • hCards hCalendars and RSS

There should be podcasts of the seminars out in due course, available from the @media website.

@media, Fine Art of Web Design

Friday, June 16th, 2006 at 11:03pm

Andy Clarke of Stuff & Nonsense / And All That Malarkey

Andy’s an odd fish! But he thinks of things in different ways, and from different viewpoints. He sees inspiration for web design all over, not just online. “Art is design without compromise” – Jeffrey Veen.

Bound By Boxes
We are hampered every which way by boxes, stemming from:

  • The environment – ie a 2D screen, which is inflexible
  • The Materials – ie the limits of Markup+CSS
  • Medium – poor CSS support in older browsers
  • Ourselves! – unlearning what we have already learned.
  • Refs: Blue Robot’s Reservior, Web Standards Awards

Grid Design
It is a fundamental skill of any designer – using the grid (see also the writeup on Good Design vs Great Design). BUT, what do we end up with?

becomes

Should we look at the web for inspiration, at places like cssreboot, or csszengarden?
Or should we look elsewhere? Maybe a right nav and vertical header could work for your site!

Keep a Scrapbook – could be magazine cuttings, etc, just to give inspiration from other areas. Showed example of page layout which was thus – just an ordered list, effectively – think how this below could be marked up with CSS?

Sometimes the juxtaposition of lines and curves can be quite interesting to think about.

Markup In The Real World
Markup needs to be technically valid but contain elements that have been chosen to convey meaning, semantically. If its tabular data – present it in a table!

Progressive Enhancement
Name given to technique were basic stuff is marked up for styling in IE, plus bells and whistles for other more capable browsers – eg Moz browsers can cope with the :hover class on any element, not just anchors; round corners on boxes are coming!

Transcendent CSS makes full use of all the most up to date CSS techniques. In CSS2.1 this could mean attribute selectors, parent/child/sibling selecctors, pseudo classes eg first/last child etc. Only use hacks to target browsers to turn things off.

Graded Browser Support
Doesn’t mean everyone gets the same thing – but so what if it works and is usable in older browsers. IE7 will level the playing field a bit more (we hope!).

Refs: Yahoo DevNet – Browser Grades
stuffandnonsense.co.uk/downloads/transcendingcss.pdf


@media, Strategic CSS Management

Friday, June 16th, 2006 at 10:41pm

Panel with Roger Johansson, Rachel Andrew and Dave Shea.

Always use basic vanilla CSS and HTML files as your starting point for any project. Then work on repurposing this to suit your bespoke application. This gives you a basic framework on which to build each time. Ref: undohtml.css (google for it or go to the end of this page) zaps all of the default browser formatting. Tantek developed it. Use to copy and paste into all new projects.

Next, stuff in the markup and some greeked content and validate

How to break up multiple CSS files
Several ways to do it, including:

  • by typography, colours, layout (clear:left does this I think)
  • Rachel puts most of her css in one file and pulls out the hacks into a separate one.
  • Divide the sheet up with comments when its more complex.
  • If its a very big sheet – put a Table of Contents at the top with these sort of comments /* page:=Header */ – as CTL-F will find “=name” very easily (equals not otherwise used in the CSS markup so you won’t end up with spurious finds).
  • Dave breaks it up into sections: global nav; sidebar nav; basic html; then will use a separate file for a specific section such as the shopping cart function – he finds it easier to find things again afterwards.
  • List colours @ top of stylesheet in a comment – that way its much easier to do a global search and replace if needed.

One problem arises when you edit a stylesheet – you might rid the markup of a div, but rarely do you then weed out the associated css in the stylsheet – so it can end up rather bloated with old stuff you’re no longer using. Try and use some sort of methodology to see if you can rid yourself of the extras.

Using Dreamweaver & Contribute in a collaborative environment
Some partcipants have DW and Contribute, and break the CSS up so that the typography is in one sheet which the dumb users can see – Contribute users will be able to apply these styles when choosing from their CMS, and so won’t apply a page structure style to something that would blow up. The human factor has to come into play – there’s no right or wrong way – you may choose to have one stylesheet for a small site, but split it up for a CMS-driven one.

COMMENT the CSS so you know what’s what – its boring but very necessary when you come back (or someone else does) six months later and you can’t remember what you did! Dave also finds it useful to comment the markup with div ends such as as you’re not always sure which is the closing </div> tag (felt smug as I’ve already started to do that!).

  • ALWAYS ALWAYS comment Hacks so you remember why they’re there. Useful to include the download/explanation URL in there too, for your future reference.
  • IF you use comments to break up the CSS, use lots of TABs to shift them over to the RHS – they are much easier to scan for quickly that way.
  • If you are a large team, comment the CSS with your name and the date when you make changes

Class/id Naming Conventions
Stick to a scheme, be consistent across projects so you are not left looking for something months later (also stems from using one vanilla template to seed each project). Use names such as .sidebar, #navigation, .menu ie keep the name structural rather than related to how it looks. If there were rigid or ideal naming conventions, it would be great for accessibility as users could then more easily override a given style on a page – but that’s Utopia, it ain’t gonna happen.

You can (if you’re clever) use Server-side scripting to change styles on the fly, but none of the panel had much experience of that.

Code Order
Within your CSS, try and be structural about your layout order – start with wrapper, header, then the rest.
Pick an order that makes sense for global sheets, or global, generic then section-specific.
Within a rule, try and stick to a set order for properties (its just good organisation, doesn’t make any difference); position, float, colour, text align etc.
Specifity- when using rules which override previous ones directly, try and put them near each other, if possible, so you’re not hunting all over the stylesheet. – you can still see the styles which will override the properties.
Or group by elements – H1, H2,… Li…<a href> etc.

Tools
Text editors are OK! Or Topstyle, Firefox Web Developer toolbar (switch sheets on and off stupidly easily) .
Testing
Browsercam – its just like having multiple boxes running different browsers (VM ware?)