More Fun With Slashdot's CSS

Slashdot has updated their CSS style sheets again. Yet again, there are little tweaks that would be nice. So here are some custom rules to add to your Firefox userContent.css file.

This contains rules to change Slashdot back to a Serif font, bolds the comment counts on the main page, and fixes some headers that were left with black text on various colored backgrounds - including black backgrounds in certain sections.

Update: Now contains rules to fix the "comment score" header (when viewing a comment, it's the box that lists the break down of moderation scores) and the "recent submissions" header.
Update 2: Added the missing Apache, BSD, and Features sections, which helpfully aren't listed under the sections bar on the left, but do, in fact, exist.
Update 3: Removed the rules to adjust the comment score, since Slashdot altered their own CSS to move the score to the left of the title.

@-moz-document domain(slashdot.org)
{
  /*
   * Making the font serif is a whole bunch of rules designed to make Slashdot
   * look more like "traditional" Slashdot with a serif font.  Specifically,
   * the font is made larger for comments and stories, but a whole bunch of
   * related fonts need to be made smaller due to space constraints.
   *
   * To keep the sans-serif font, remove/comment out the rules between here and
   * "End Serif Rules" below:
   */
  body {
    font-family: 'Times New Roman', 'Bitstream Vera Serif', Times, serif !important;
    font-size: 12pt !important;
  }
  div.commentSub, div.briefarticles, div.storylinks {
    font-size: 10pt !important;
  }
  #commentControlBox select, #commentControlBox input.button {
    font-size: 10pt !important;
  }
  /*
   * End Serif Rules
   */
  /* Makes comment count links bold on the main page. */
  .storylinks .comments a {
    font-weight: bold !important;
  }
  /*
   * Corrects "data head" to have white text on dark backgrounds (all of
   * 'em...), and adds padding to bring it inline with other elements
   */
  table:not(.data) .data_head {
    color: #FFF !important;
    background-image: url(http://images.slashdot.org/article-title-bg.png) !important;
    background-color: #044 !important;
    background-repeat: repeat-x !important;
  }
  table:not(.data) tr.data_head>th:first-child, tr.data_head>td:first-child {
    background-image: url(http://images.slashdot.org/article-title-left.png) !important;
    background-repeat: no-repeat;
  }
  table:not(.data) tr.data_head th, tr.data_head td {
    padding: 0.4em 0.56em 0.52em 0.8em !important;
  }
}

/*
 * Various overrides for site-specific content.
 */
@-moz-document domain(apache.slashdot.org) {
  table:not(.data) .data_head {
    background-image: url(http://images.slashdot.org/article-title-bg-apache.png) !important;
    background-color: #303 !important;
  }
  table:not(.data) tr.data_head>th:first-child, tr.data_head>td:first-child {
    background-image: url(http://images.slashdot.org/article-title-left-apache.png) !important;
  }
}
@-moz-document domain(apple.slashdot.org) {
  table:not(.data) .data_head {
    background-image: url(http://images.slashdot.org/article-title-bg-apple.png) !important;
    background-color: #000 !important;
  }
  table:not(.data) tr.data_head>th:first-child, tr.data_head>td:first-child {
    background-image: url(http://images.slashdot.org/article-title-left-apple.png) !important;
  }
}
@-moz-document domain(ask.slashdot.org) {
  table:not(.data) .data_head {
    background-image: url(http://images.slashdot.org/block-title-bg.png) !important;
    background-color: #666 !important;
  }
  table:not(.data) tr.data_head>th:first-child, tr.data_head>td:first-child {
    background-image: url(http://images.slashdot.org/block-title-left.png) !important;
  }
}
@-moz-document domain(bsd.slashdot.org) {
  table:not(.data) .data_head {
    background-image: url(http://images.slashdot.org/block-title-bg-bsd.png) !important;
    background-color: #700 !important;
  }
  table:not(.data) tr.data_head>th:first-child, tr.data_head>td:first-child {
    background-image: url(http://images.slashdot.org/block-title-left-bsd.png) !important;
  }
}
/* books.slashdot.org uses the main theme */
@-moz-document domain(developers.slashdot.org) {
  table:not(.data) .data_head {
    background-image: url(http://images.slashdot.org/article-title-bg-dev.png) !important;
    background-color: #369 !important;
  }
  table:not(.data) tr.data_head>th:first-child, tr.data_head>td:first-child {
    background-image: url(http://images.slashdot.org/article-title-left-dev.png) !important;
  }
}
/* features.slashdot.org uses the main theme (and, yes, it exists) */
@-moz-document domain(games.slashdot.org) {
  table:not(.data) .data_head {
    background-image: url(http://images.slashdot.org/article-title-bg-games.png) !important;
    background-color: #004 !important;
  }
  table:not(.data) tr.data_head>th:first-child, tr.data_head>td:first-child {
    background-image: url(http://images.slashdot.org/article-title-left-games.png) !important;
  }
}
@-moz-document domain(hardware.slashdot.org) {
  table:not(.data) .data_head {
    background-image: none !important;
  }
  table:not(.data) tr.data_head>th:first-child, tr.data_head>td:first-child {
    background-image: url(http://images.slashdot.org/slc.gif) !important;
  }
}
/* interviews.slashdot.org uses the main theme */
@-moz-document domain(it.slashdot.org) {
  table:not(.data) .data_head {
    background-image: url(http://images.slashdot.org/article-title-bg-it.png) !important;
    background-color: #898163 !important;
  }
  table:not(.data) tr.data_head>th:first-child, tr.data_head>td:first-child {
    background-image: url(http://images.slashdot.org/article-title-left-it.png) !important;
  }
}
@-moz-document domain(linux.slashdot.org) {
  table:not(.data) .data_head {
    background-image: url(http://images.slashdot.org/article-title-bg-linux.png) !important;
    background-color: #000 !important;
  }
  table:not(.data) tr.data_head>th:first-child, tr.data_head>td:first-child {
    background-image: url(http://images.slashdot.org/article-title-left-linux.png) !important;
  }
}
@-moz-document domain(politics.slashdot.org) {
  table:not(.data) .data_head {
    background-image: url(http://images.slashdot.org/article-title-bg-politics.png) !important;
    background-color: #061B46 !important;
  }
  table:not(.data) tr.data_head>th:first-child, tr.data_head>td:first-child {
    background-image: url(http://images.slashdot.org/article-title-left-politics.png) !important;
  }
}
/* science.slashdot.org uses the main theme */
@-moz-document domain(yro.slashdot.org) {
  table:not(.data) .data_head {
    background-image: url(http://images.slashdot.org/article-title-bg-yro.png) !important;
    background-color: #630 !important;
  }
  table:not(.data) tr.data_head>th:first-child, tr.data_head>td:first-child {
    background-image: url(http://images.slashdot.org/article-title-left-yro.png) !important;
  }
}
Topics: