Styling Atom 1.0 feeds with CSS

Tuesday, 31 Jan 2006

Via Uche Ogbuji in #atom, I saw Sam Ruby’s CSS stylesheet for Atom. It has a couple of drawbacks: there are a number of style rules specific to Sam’s HTML use, the style rules are very repetitive with little use of implicit inheritance, and worst of all, it’s a mish-mash of rules for Atom 0.3 and 1.0.

I added a @namespace declaration first thing. Unfortunately IE does not support that; if it did, I could just have said * { display: block }, but since IE would apply that to all tags in a document, including those in the XHTML namespace, I had to list all elements to apply display:block to explicitly.

Actual styling is very minimal in this stylesheet: black on white text, a few light grey elements and borders, very little font size fiddling, and the font is simply sans-serif.

Since I spent 15 minutes cleaning it up, I decided it was worth sharing, so here you go: atom.css