As I only sneaked this in at the very end of my Advent Calendar post, let me wonder whether you caught the photo advent calendar I’m posting on Flickr each day. It’s a bit old by now but it’s still a pretty challenging memory game. See the photos with the slight disadvantage that you can’t see their comments then. Alternatively, subscribe to their feed which gives you the photos together with my comments. While I’m not the biggest fan of Flickr, I have to admit that all this is quite neat and fun.
If you made it all the way down to here and are technically minded, perhaps you can tell me something about the topic of using CSS in news feeds. As most of these pages’ looks depends on my style sheet, the feed tends to look much worse than the actual page. In particular, in the feed you won’t be warned about links to German pages,
my sidenotes won’t be de-emphasised,
and the position of images will be a bit crappy. So I’m wondering whether there is some magic that lets me include a global reference to a style sheet into my feed which the feed reader will use. Or what would be a viable alternative that doesn’t require too much work or bandwidth from me or my subscribers.
You are unfortunately out of luck with the RSS styling: some see this as an advantage of the medium rather than a drawback (myself included), though it is sometimes a little disappointing to see things rendered unstyled (inline images, for instance).
You can style things manually on the element using the style attribute, but that will require a fair bit of overhead on your behalf, and basically kills your chances of an easy site redesign in the future.
Perhaps you could dynamically attach style attributes to HTML elements in your feed using Brad Choate’s MT RegEx plugin. It’d cost you a little more bandwidth, though.
Obviously not the answer I would have liked, but at least reassuring to know that not finding a ‘clean’ solution wasn’t just a consequence of bad Googling.
I’ll have a look at the regexp plugin, but I fear I might not be able to come up with sufficiently clever regexps to emulate CSS’ cleverness.
RegEx might be a bit tricky in places, but I figure at least for simple things you’ll be able to do a find/replace on strings like:
…for your sidenotes, replacing it with:
You won’t be able to pull off anything really cool with pseudoelements, siblings, or children, etc, since you don’t have the selectors to play with, but it’s worth a look. Come to think of it, I should really do this myself for images that I’d prefer to float that end up looking like ass when they’re inline.
“So I’m wondering whether there is some magic that lets me include a global reference to a style sheet into my feed which the feed reader will use.”
Maybe a HTTP header?
http://www.w3.org/TR/REC-html40/present/styles.html: “The HTTP Link header has the same effect as a LINK element with the same attributes and values. Multiple Link headers correspond to multiple LINK elements occurring in the same order. For instance,
Link: http://www.acme.com/corporate.css; REL=stylesheet corresponds to:
The RegEx-type solution sounds interesting too, but using HTML in RSS/Atom is somewhat questionable/non-standard/problematic anyway and should be done sparsely.
Finally, in many cases, I do indeed like the fact that feeds do not force their own styling on me. In the case of your blog, though, that’s not the case — your styling is light and helpful, rather than heavy and annoying.
I think I found a way to deal with this without having to get into reg exps. I simply included some of my CSS essentials into each item of my feed. I’m sure this isn’t good HTML (are style tags allowed outside the header?) and I’m sure some people will consider it ‘funky’. But it works for me™ in NewsFire – and thus I presume for other WebKit based aggregators.
Try the mildly styled feed.
My guess is that the header won’t do much good there as the style sheet has to be associated to each entry in the feed. Feed readers would need to support this at least.
I really don’t understand why people go on whining when feeds are styled. If they only were plain text we couldn’t even have links or images in there. And once we start allowing HTML, it seems arbitrary to stop there. Particularly for those images which really should be floating…
I like it. (The “mildly styled feed”, that is.)
Received data seems to be invalid. The wanted file does probably not exist or the guys at last.fm changed something.