feed.css 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /*
  2. Make RSS and Atom feeds at least semi-legible to folk who accidentally
  3. load them in a browser...
  4. Compatibility:
  5. * Mozilla is fine.
  6. * Safari 1.2: the RSS <link> text isn't shown
  7. * Opera 7.5 uses the style sheet instead of its native RSS mode.
  8. * IE/Mac 5.2: none of the :before content works; doesn't get the charset right and displays garbage for non-ASCII.
  9. * IE/Win 6.0: No background color, borders, font size, font weight, or :before content.
  10. */
  11. /* RSS: */ rss, channel, title, link, description, language, generator, lastBuildDate, item, pubDate, author, comments, creator,
  12. /* Atom: */ feed, id, modified, tagline, entry, issued, created, updated, summary, comment {
  13. display: block;
  14. }
  15. rss, feed {
  16. background: white;
  17. color: black;
  18. margin: 1em;
  19. font-family: "Verdana", "Tahoma", "Arial", "Helvetica", sans-serif;
  20. line-height: 1.5em;
  21. font-size: 76%;
  22. }
  23. rss:before {
  24. content: "This RSS feed is meant to be read in a syndicated news reader, and isn't ideal for a web browser.";
  25. }
  26. feed:before {
  27. content: "This Atom feed is meant to be read in a syndicated news reader, and isn't ideal for a web browser.";
  28. }
  29. rss:before, feed:before {
  30. color: red;
  31. text-align: center;
  32. line-height: 2em;
  33. }
  34. channel>title,
  35. item>title,
  36. feed>title,
  37. entry>title {
  38. font-weight: bold;
  39. border-bottom: solid 1px #aaa;
  40. margin-left: -0.5em;
  41. }
  42. channel>title, feed>title {
  43. font-size: larger;
  44. }
  45. item>title, entry>title {
  46. font-size: large;
  47. }
  48. item, entry {
  49. margin-top: 1em;
  50. margin-left: 2em;
  51. }
  52. item>description, entry>summary {
  53. white-space: pre;
  54. overflow: auto;
  55. background: #f8f8ff;
  56. }
  57. pubDate:before { content: "Date: " }
  58. link:before { content: "Link: " }
  59. author:before, creator:before { content: "Author: " }
  60. description:before { content: "Description: " }
  61. id:before { content: "Id: " }
  62. generator:before { content: "Generator: " }
  63. language:before { content: "Language: " }
  64. lastBuildDate:before { content: "Updated: " }
  65. comments:before { content: "Comments page: " }
  66. tagline:before { content: "Tagline: " }
  67. issued:before { content: "Issued: " }
  68. created:before { content: "Created: " }
  69. modified:before { content: "Modified: " }
  70. updated:before { content: "Updated: " }
  71. summary:before { content: "Summary: " }
  72. comment:before { content: "Comment: " }
  73. pubDate:before, link:before, author:before, description:before,
  74. language:before, generator:before, lastBuildDate:before, comments:before,
  75. tagline:before, issued:before, created:before, modified:before,
  76. summary:before, comment:before, creator:before, id:before, updated:before {
  77. color: #224;
  78. font-weight: bold;
  79. }
  80. feed link:after {
  81. content: attr(href);
  82. }