RSS feeds with a Safari CSS Theme

Screenshot of Safari RSS

Screenshot of Safari RSS

Safari RSS?

Safari RSS is Apple’s default web browser for Mac OS X Tiger. As indicated by its name, it now features a built-in RSS (and Atom) reader. Aside from the powerful feed indicator and notification functions, Apple has created an elegant design as an alternative to complicated-looking XML-based feeds. While the XML format is intended to be human-readable, Apple has coated it over with blue accent gradients and hidden all the tags. For many users, this will be the defining look of RSS/Atom feeds.

We can make our RSS/Atom feeds look similar to the Safari RSS look. All we need is the proper CSS file linked as a stylesheet from our RSS/Atom XML file.

Screenshot of Raw XML in Mozilla Firefox

Screenshot of Raw XML in Mozilla Firefox

Some Background

When you load an XML feed in a web browser, it’ll often display raw XML tags in a hierarchy tree. Users who unknowingly click on an orange RSS button experience this. Why confused people with a dead end page?

Screenshot of Blogspot Atom with CSS Feed

Screenshot of Blogspot Atom + CSS Feed

Other websites have began to style their XML feeds with CSS. Dive Into Mark’s Atom Feed mimics his website. Sam Ruby also posted an Atom+CSS example. All current Blogger/Blogspot Atom feeds are greeted with CSS-styled XML. In addition, Atom’s inclusion of an tag can let users know that it is designed to be read in a syndicated feed reader.

Make it So!

  • Make a backup of your RSS/Atom templates.

  • Add the xml-stylesheet tag into the second line of your RSS or Atom feed.

    RSS 2.0:

    <?xml version=\"1.0\" encoding=\"utf-8\"?>
    <?xml-stylesheet href="feed.css" type="text/css"?>
    <rss version="2.0?>
    <channel>
    <title>starvingartist</title>
    ...

    Atom 0.3:

    <?xml version=\"1.0\" encoding=\"utf-8\"?>
    <?xml-stylesheet href="feed.css" type="text/css"?>
    <feed version="0.3?
       xmlns="http://purl.org/atom/ns#"
       xmlns:dc="http://purl.org/dc/elements/1.1/"
       xml:lang="en">
    <title>starvingartist</title>
    ...
    
    
    This is a syndicated feed, designed to be read in a syndicated feed reader. I recommend BlogLines (web-based), SharpReader (Windows), or NetNewsWire Lite (Mac OS X). Just paste the address of this feed into the feed reader to "subscribe" to this feed, and you'll always be up to date with the latest news.
  • Upload the following customized CSS file (feed.css) and image files (bgside.png, bgtitle.png, info.gif) into the same directory as your RSS and Atom XML feeds. This styles your XML into the Safari look.

  • Load up your XML Feed files. Now, with the CSS file, your RSS 2.0 or Atom 0.3 should look like this:

    Safari-Themed Atom with CSS

    Safari-Themed Atom with CSS
  • So What?

    At the very least, raw XML is not displayed to user. They’re presented with something much more simplified and helpful. It also shouldn’t affect syndicated feed readers, since the XML stylesheets aren’t usually applied. While this currently works only for RSS 2.0 and Atom 0.3 XML feeds, it can be modified to work with any other XML document. Client-side XSL Transformations could be used to modify the XML much further than CSS styles. It’s currently being used by services such as FeedBurner and is supported in IE5/Win, Mozilla and Opera 8.

    Notes: There’s some extra padding issues with IE that are still unresolve. And I’m having problems styling RSS 1.0 feeds. Anyone have any ideas? Feel free to play around with it. :)

    19 Responses to “RSS feeds with a Safari CSS Theme”

    1. fiz Says:

      That’s cool. I had never heard of XML style sheets. :)

    2. Ben Says:

      Is it possible to get this style sheet to work in firefox Sage Rss Reader extension, I really like the design.

    3. starvingartist Says:

      Ben: I haven’t used the Sage RSS/ATOM feed aggregator before, but I believe you can modify the HTML templates and the CSS file by editing the files under your Sage’s “chrome://sage/content/res/” folders (where ‘chrome’ is located depends on where you installed it).

      You’ll find “template-html.txt”, “template-item.txt” and “sage.css” to modify.

    4. starvingartist Says:

      For those still looking for a Sage skin, there’s a Safari RSS Skin for Sage available for download at deviantART. Instructions notes are available in the artist’s comment area.

    5. 萧峰 Says:

      您们好,我的朋友们!我很高兴能与你们交流。听着,我真诚的朋友们,你们的确做得很不错,或许可以说是棒极了!我很希望能为google的未来服务。
      谢谢!

    6. Auralis Says:

      I second what 萧峰 said.

    7. Tom Says:

      Very nice idea, im afraid I this might be the default stylesheet for my feeds now.

      On another note, I just saw the minimal screenshot and I must say that looks very nice indeed. If this any news on when Joe Public will be able to play with it?

    8. DrFooMod2 Says:

      Nice! My Sage is now über-Safari’ef up. w00t!

    9. Alan Kay Says:

      The links seem to be down.

    10. Colt Says:

      Awesome site by the way. I hope everyone gives you at least $20.00 like I have to keep this site up. Thank you!!

    11. Marivel Nowinski Says:

      This is a actually incredible potent source that you’re offering and you simply offer it away cost-free!! I enjoy discovering websites which can be conscious of the particular within providing you with an excellent studying source regarding absolutely no expense. We genuinely dearly cherished examining this website. Enjoy it!

    12. klikopolo Says:

      Thanks a lot for giving everyone remarkably splendid opportunity to read articles and blog posts from this website. It’s usually very terrific and as well , jam-packed with a lot of fun for me and my office friends to search the blog at minimum thrice in one week to see the newest things you have got. And indeed, I am actually pleased for the wonderful creative ideas you serve. Selected two areas in this article are essentially the simplest we’ve ever had.

    13. klikopolo Says:

      I in addition to my pals came viewing the best secrets and techniques from the blog while suddenly I had an awful feeling I never expressed respect to the web blog owner for those strategies. All of the guys were excited to read them and have seriously been using those things. Many thanks for being indeed thoughtful and for figuring out this kind of incredible guides millions of individuals are really needing to know about. Our honest apologies for not saying thanks to sooner.

    14. Sang Connick Says:

      I and also my guys have already been looking through the good pointers found on your site and so immediately developed a terrible suspicion I had not expressed respect to the blog owner for those strategies. Those young men became for this reason joyful to learn all of them and have in effect really been loving them. Appreciate your simply being so helpful as well as for using this form of awesome topics millions of individuals are really wanting to discover. Our own honest regret for not expressing gratitude to you sooner.

    15. Arnita Glisson Says:

      I wanted to send you the bit of note so as to thank you very much as before for your striking opinions you have documented in this article. This is quite surprisingly open-handed of you to make extensively what a number of people could have distributed for an ebook in making some profit for their own end, specifically since you might well have tried it if you wanted. The inspiring ideas likewise worked to provide a easy way to realize that other people have similar dreams just as my personal own to see a whole lot more regarding this issue. Certainly there are several more enjoyable occasions in the future for those who read through your blog post.

    16. ondertitels Says:

      I need a missing file for a program I have on my computer. I don’t know how it got deleted but it’s gone. I googled the file and found tons of websites to download the file I need, but I heard they may have bad viruses with them. Can anyone help me?

    17. Kerrie Bobson Says:

      Great written content and great layout Your blog deserves all the positive feedback its been getting

    18. how to build a gaming computer for under 500 Says:

      I think you have remarked some very interesting details , thanks for the post.

    19. anna laser tandblekninng Says:

      anna laser tandblekninng…

      [...]y Very few sites that happen to be detailed below, from our point of view are 4y[...]…

    Leave a Reply