Delete feed.css
authorBartosz Dziewoński <matma.rex@gmail.com>
Tue, 26 Aug 2014 14:50:16 +0000 (16:50 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Tue, 26 Aug 2014 14:57:08 +0000 (16:57 +0200)
It was a stylesheet loaded with our RSS and Atom feeds, intended to make
them legible when shown in a regular browser. Browsers these days tend
to have their own UI for feeds (for example IE 11 and Firefox 31), and
these that don't pretty-print the XML, which means the stylesheet
provides very little added value.

Per discussion on I6268d663.

Bug: 69277
Change-Id: I2ce9650c01f8f245707f5e88ee46520c5e598ce4

RELEASE-NOTES-1.24
includes/Feed.php
skins/common/feed.css [deleted file]

index c2a1e2b..2bf5090 100644 (file)
@@ -357,6 +357,8 @@ changes to languages because of Bugzilla reports.
 * Removed WikiPage::estimateRevisionCount(). (deprecated since 1.19)
 * MYSQL: Enum item added to "major MIME type" columns.
   Running update.php on MySQL < v5.1 may result in heavy processing.
+* RSS and Atom feeds generated by MediaWiki no longer include a fallback
+  stylesheet. It was ignored by most browsers these days anyway.
 
 ==== Renamed classes ====
 * CLDRPluralRuleConverter_Expression to CLDRPluralRuleConverterExpression
index 60e623b..03dd7f5 100644 (file)
@@ -258,20 +258,11 @@ abstract class ChannelFeed extends FeedItem {
        }
 
        /**
-        * Output the initial XML headers with a stylesheet for legibility
-        * if someone finds it in a browser.
+        * Output the initial XML headers.
         */
        protected function outXmlHeader() {
-               global $wgStylePath, $wgStyleVersion;
-
                $this->httpHeaders();
                echo '<?xml version="1.0"?>' . "\n";
-               echo '<?xml-stylesheet type="text/css" href="' .
-                       htmlspecialchars( wfExpandUrl(
-                               "$wgStylePath/common/feed.css?$wgStyleVersion",
-                               PROTO_CURRENT
-                       ) ) .
-                       '"?' . ">\n";
        }
 }
 
diff --git a/skins/common/feed.css b/skins/common/feed.css
deleted file mode 100644 (file)
index dc0453d..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
-Make RSS and Atom feeds at least semi-legible to folk who accidentally
-load them in a browser...
-
-Compatibility:
-* Mozilla is fine.
-* Safari 1.2: the RSS <link> text isn't shown
-* Opera 7.5 uses the style sheet instead of its native RSS mode.
-* IE/Mac 5.2: none of the :before content works; doesn't get the charset right and displays garbage for non-ASCII.
-* IE/Win 6.0: No background color, borders, font size, font weight, or :before content.
-
-*/
-
-/* RSS: */ rss, channel, title, link, description, language, generator, lastBuildDate, item, pubDate, author, comments, creator,
-/* Atom: */ feed, id, modified, tagline, entry, issued, created, updated, summary, comment {
-       display: block;
-}
-
-rss, feed {
-       background: white;
-       color: black;
-       margin: 1em;
-       font-family: "Verdana", "Tahoma", "Arial", "Helvetica", sans-serif;
-       line-height: 1.5em;
-       font-size: 76%;
-}
-
-rss:before {
-       content: "This RSS feed is meant to be read in a syndicated news reader, and isn't ideal for a web browser.";
-}
-
-feed:before {
-       content: "This Atom feed is meant to be read in a syndicated news reader, and isn't ideal for a web browser.";
-}
-
-rss:before, feed:before {
-       color: red;
-       text-align: center;
-       line-height: 2em;
-}
-
-channel > title,
-item > title,
-feed > title,
-entry > title {
-       font-weight: bold;
-       border-bottom: solid 1px #aaa;
-       margin-left: -0.5em;
-}
-
-channel > title, feed > title {
-       font-size: larger;
-}
-
-item > title, entry > title {
-       font-size: large;
-}
-
-item, entry {
-       margin-top: 1em;
-       margin-left: 2em;
-}
-
-item > description, entry > summary {
-       white-space: pre;
-       overflow: auto;
-       background: #f8f8ff;
-}
-
-pubDate:before {
-       content: "Date: ";
-}
-
-link:before {
-       content: "Link: ";
-}
-
-author:before, creator:before {
-       content: "Author: ";
-}
-
-description:before {
-       content: "Description: ";
-}
-
-id:before {
-       content: "Id: ";
-}
-
-generator:before {
-       content: "Generator: ";
-}
-
-language:before {
-       content: "Language: ";
-}
-
-lastBuildDate:before {
-       content: "Updated: ";
-}
-
-comments:before {
-       content: "Comments page: ";
-}
-
-tagline:before {
-       content: "Tagline: ";
-}
-
-issued:before {
-       content: "Issued: ";
-}
-
-created:before {
-       content: "Created: ";
-}
-
-modified:before {
-       content: "Modified: ";
-}
-
-updated:before {
-       content: "Updated: ";
-}
-
-summary:before {
-       content: "Summary: ";
-}
-
-comment:before {
-       content: "Comment: ";
-}
-
-pubDate:before, link:before, author:before, description:before,
-language:before, generator:before, lastBuildDate:before, comments:before,
-tagline:before, issued:before, created:before, modified:before,
-summary:before, comment:before, creator:before, id:before, updated:before {
-       color: #224;
-       font-weight: bold;
-}
-
-feed link:after {
-       content: attr(href);
-}