Replacing class="alignright" etc Was: Re: [wp-hackers] Linking stylesheet to RSS feeds

Lynne Pope lynne.pope at
Fri Jun 19 00:01:37 GMT 2009

2009/6/19 Jeremy Clarke <jer at>

> On Thu, Jun 18, 2009 at 9:26 AM, Lynne Pope<lynne.pope at> wrote:
> > The same argument applies - inline styles override user styles.User
> styles
> > in this case being the uniform UA implemented by feed aggregators as well
> as
> > the end user who may have styled their own reader experience.
> I agree on principal with what you're saying, but if only for my
> personal curiosity, do you really think that a few key styles will
> really break people's style customizations?

Yep, sure do. Inline styles take precedence over user styles (which,
includes browser and feed reader/aggregator application styles - the reason
many feed readers strip inline styling).

In the case of content viewed in a browser, this can have a serious impact
on accessibility.
There are loads of reasons why someone may choose to use their own style
sheet on certain sites (or choose to turn off CSS altogether on some sites)
and I routinely do this myself on some. There are also some sites that I
won't bother visiting at all, beause the styling makes it hard for me to
quickly read the content - for those, I read their feeds. If they styled
their feeds I just wouldn't bother.

And, for me, this has nothing to do with accessibility and everything to do
with usability - there are some really badly designed sites out there that
seem to put design above readability!

> I mean, in the context of
> a blog post .alignright is almost structural for the content. An image
> that's .alignright has a very specific semantic relationship with the
> paragraph that follows it (e.g. it might say 'the photo to the right'
> in the text). I can't help thinking that in these cases having inline
> styles for float: and margin-left: (or margin-right:, i just mean
> defining the margin opposite the float) not only makes sense but is
> almost necessary.

Those two classes aren't semantic. There is nothing about alignright that
says it must align to the right. It's not always aligned or floated to the
right even in WordPress core, which overrides it and flips it around for
sites that use RTL.

> Having any kind of complex post layout in a feed
> reader is impossible otherwise.

The debate about whether to style feeds has arisen many times over the past
few years, in loads of different places outside of WordPress. Generally,
those who say they want it state that they want control over the appearance
of their content and want to add branding. Well, people do have control over
the way their content is displayed - its called a web page and HTML/CSS
makes styling easy.

Feeds,on the other hand, are for syndicating content. Feed readers are not
browsers and feeds were never designed to be read in browsers. Browsers are
designed to recognise feed data and to pass it on to a feed application.

It's also called, "syndication" for a reason - feeds are not designed to be
served to just one end-user. Other sites take feeds, apply their styling,
and display the feed content within their own sites. Any CSS included with
the feed then impacts on the ability for aggregators to display the content.
You don't see Reuters or the New York Times syndicating their styling. It's
all about words.

Not saying filtering .alignright into styles for RSS should be in
> core, but I think it's a pretty acceptable practice when your content
> depends on it (I do it manually on my blog and I haven't recieved any
> complaints :P )

Yeah, well I don't complain or comment on a site that is unusable to me but
I won't subscribe to any feeds that use styling either;) If I want to see
the styling, I will visit the web page

Ok, so that's a personal preference and not everyone shares it, but at least
if the styling is provided by an external XSL sheet, users (and their
reader/aggregator apps) have the option of not using it. Impose styling
through inline styles and users get only two choices - put up with it
(assuming it makes the content accessible to them) or don't read at all.


More information about the wp-hackers mailing list