Page MenuHomePhabricator

RSS so bloated with CSS repeated every line
Closed, DeclinedPublic

Description

RSS feeds are so bloated. The CSS stuff is just repeated for every line.
Can't CSS just be declared once somewhere and then single letters used?
A separate file perhaps that such CSS-smart RSS readers could pull in?
And is CSS much value in RSS feeds?


Version: 1.20.x
Severity: enhancement
URL: http://radioscanningtw.jidanni.org/index.php?title=Special:RecentChanges&feed=rss

Details

Reference
bz17058

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:27 PM
bzimport set Reference to bz17058.
bzimport added a subscriber: Unknown Object (MLST).

I wish it could, but <style> tags don't seem to work in many popular readers while inline styles do. Life sucks. :(

And yes, the styles make a *huuuuuuge* difference to legibility of the diff display.

Am I mistaken, or is it a total waste to write class="..." in an RSS environment, at least the current way we see?

Here's what I found out so far running

$ firefox http://radioscanningtw.jidanni.org/index.php?title=Special:RecentChanges&feed=rss

which contains

<?xml-stylesheet type="text/css" href="http://radioscanningtw.jidanni.org/skins/common/feed.css?223"?>
...class='diff-marker' etc.

However diff-marker etc. is not mentioned in feed.css, but elsewhere,
and Firefox in fact here doesn't read feed.css afterall, nor any *.css.

So I don't see how feed.css is to achieve the goal at its top,

Make RSS and Atom feeds at least semi-legible to folk who accidentally load them in a browser...
Compatibility:

  • Mozilla is fine.

Note that the headers sent say Content-Type: application/xml ...

Special:NewPages&feed=rss also attempts to invoke feed.css.

feed.css is for browsers that will apply CSS to XML, but *don't* recognize RSS/Atom feeds specifically (for instance, very old versions of Firefox).

Many/most modern browsers know RSS and/or Atom feed formats natively, and never see that XML stylesheet reference. They parse out the feed and build their own user interface for showing you the feed items.

They also tend to completely ignore any <style> blocks in those individual feed items, which is why we have to embed the styles to get legible output; we can't use a <style> block or <link rel="stylesheet"> to style them because it just won't work... This was added in r12913 for bug 1284.

That was 3 years ago, so it wouldn't hurt to do an environmental scan of current feed readers to check for improved <style> support, but unless that's been fixed I'm not sure how much we can do. We could at least reduce the bloat by removing the white background / black foreground or something.

How about XML CDATA enclosures to clean up all those entities?
In Xquery we use e.g., declare option output:cdata-section-elements "description";
to get e.g., <description><![CDATA[<ul><li>中國廣播公司客家頻道台北台</li><li>台北縣板橋市民族路130巷67號</li><li>丙</li></ul>]]></description>
instead of &lt;ul&gt;&lt;li&gt;中國廣播公司鄉親網台北台...
Wonder if it works in RSS.
And now it's 5 years ago...

Closing again per Brion, nothing has changed in the five years and it seems it won't. This is the only way to provide styles with feeds.

(Perhaps "CANTFIX" would be a better resolution than "WONTFIX", but we don't have one. We might use "INVALID", but this is a valid report to me, the issue just happens to be unfixable.)