MediaWiki:Common.css

From NetHackWiki
Revision as of 20:15, 7 December 2010 by Paxed (talk | contribs) (uncomment response page bg color, it's needed)
Jump to navigation Jump to search

Note: After saving, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
/*<pre>*/
/* edit this file to customise CSS for all skins */

/* prevent blurry images, such as 16x16 tiles being scaled up */
img {
    image-rendering: -moz-crisp-edges;         /* Firefox */
    -ms-interpolation-mode: nearest-neighbor;  /* IE */
}


/* keep superscript and subscript text from breaking the line-spacing */
#bodyContent sup {
    font-size: smaller;
    vertical-align: baseline;
    position: relative;
    bottom: 0.33em;
}
#bodyContent sub {
    font-size: smaller;
    vertical-align: baseline;
    position: relative;
    bottom: -0.25em;
}

/* PRE OVERFLOW
 * If "pre" text overflows, provide a scrollbar. */
pre {
  overflow: auto;
}

/* PRETTY TABLES
 * The wikitable or prettytable class skins normal tables. */
table.wikitable,
table.prettytable {
  margin: 1em 1em 1em 0;
  background: #f9f9f9;
  border: 1px #aaaaaa solid;
  border-collapse: collapse;
}

table.wikitable th, table.wikitable td,
table.prettytable th, table.prettytable td {
  border: 1px #aaaaaa solid;
  padding: 0.2em;
}

table.wikitable th,
table.prettytable th {
  background: #f2f2f2;
  text-align: center;
}

table.wikitable caption,
table.prettytable caption {
  margin-left: inherit;
  margin-right: inherit;
}




/* Style for the NetHack encyclopedia entries
 * http://nethackwiki.com/wiki/Template:Encyclopedia
 */
.nhencyclopedia {
  font-family: Palatino Linotype;
  font-style: italic;
  background-color: rgb(191, 191, 142);
  border: 2px dashed rgb(181, 181, 132);
  margin: 0.5em;
  padding: 1em;
  width: 60%;
}


/* Basic style for NetHack screen symbol templates
 * http://nethackwiki.com/wiki/Category:Function_templates
 */
span.nhsym {
  background-color:#000000;
  font-family: monospace;
  padding: 1px;
  font-weight: bold;
  font-size: large;
  line-height: 125%;
}

.ttyscreen,
.ttyscreen p,
.ttyscreen span.nhsym {
  padding: 0;
  line-height: 100%;
}
.ttyscreen a:hover .nhsym {
  background-color:#aaaaaa;
  color:#000000;
}

/* Colors for NetHack screen symbol templates
 * Users with personal stylesheets may override these colors.
 *   For example      span class="nhsym clr-blue"
 *   Alternatively    span class="nhsym" style="color:#0000AA;"
 */
.clr-blue          { color:#0000AA; }
.clr-green         { color:#00AA00; }
.clr-cyan          { color:#00AAAA; }
.clr-red           { color:#AA0000; }
.clr-magenta       { color:#AA00AA; }
.clr-brown         { color:#AA5500; }
.clr-lightgray     { color:#AAAAAA; }
.clr-darkgray      { color:#555555; }
.clr-brightblue    { color:#5555FF; }
.clr-brightgreen   { color:#55FF55; }
.clr-brightcyan    { color:#55FFFF; }
.clr-orange        { color:#FF5555; }
.clr-brightmagenta { color:#FF55FF; }
.clr-yellow        { color:#FFFF55; }
.clr-white         { color:#FFFFFF; }

#NH_sym_popup_window {
  position: fixed;
  z-index: 1000;
  top: 0.25em;
  left: 0.25em;
  border: 1px solid lightgray;
  background: white;
  float: left;
  padding: 0.25em;
  margin: 0.25em;
}

/*
 * Keyboard key symbol.
 * See http://nethackwiki.com/wiki/Template:Kbd
 */
.kbdsym {
 font-family:monospace;
 white-space:nowrap;
 color:#000;
 background:#eee;
 border:2px outset #aaa;
 text-align:center;
 vertical-align:middle;
 line-height:1.6em;
 padding:.1em .2em .1em .2em;
}

/* Forum formatting -Algorithm & -Splaka */
/*.forumheader { border: 1px solid #aaa; background-color: #f9f9f9; margin-top: 1em; padding: 12px; }*/
.forumlist td span { display: block; padding-left: 10px; font-size: smaller }
.forumlist td span a { text-decoration: none; }
.forumlist td span.forum_author { padding-left: 30px; }
.forumlist td.forum_edited a { text-decoration: none }
.forumlist td.forum_title a { padding-left: 20px; }
.forumlist td.forum_title span a { padding-left: 0px }
.forumlist td.forum_title a.forum_new { font-weight: bold; background: url(/images/4/4e/Forum_new.gif) 
center left no-repeat; padding-left: 20px; }
.forumlist td.forum_title a.forum_new:visited { font-weight: normal; background: none; padding-left: 20px; }
.forumlist th.forum_title { padding-left: 20px; }
/* More forum formatting -paxed */
.forumlist tr:hover th { }
.forumlist tr:nth-child(even) td { background-color: #f0f0f0; }
.forumlist tr:nth-child(even):hover td,
.forumlist tr:hover td { background-color: #e0e0e0; }
.forumlist td.forum_title a { display:block; width:100%; }
.forumlist td.forum_edited a { color:black; text-decoration: none; }
.forumheader { display:none; }


/* talk page and forum page "responses" */
body.ns-talk #bodyContent,
body.ns-110 #bodyContent {
  background-color:#ffffff;
}
body.ns-talk dd,
body.ns-talk dd dd dd dd,
body.ns-talk dd dd dd dd dd dd dd,
body.ns-talk dd dd dd dd dd dd dd dd dd dd,
body.ns-110 dd,
body.ns-110 dd dd dd dd,
body.ns-110 dd dd dd dd dd dd dd,
body.ns-110 dd dd dd dd dd dd dd dd dd dd {
  background-color: #f7f7f7;
}
body.ns-talk dd dd,
body.ns-talk dd dd dd dd dd,
body.ns-talk dd dd dd dd dd dd dd dd,
body.ns-talk dd dd dd dd dd dd dd dd dd dd dd,
body.ns-110 dd dd,
body.ns-110 dd dd dd dd dd,
body.ns-110 dd dd dd dd dd dd dd dd,
body.ns-110 dd dd dd dd dd dd dd dd dd dd dd {
  background-color:#f0f0f0;
}


/* redirect pages in http://nethackwiki.com/wiki/Special:AllPages */
.allpagesredirect { font-style: italic; font-size:smaller; }

/* in Special:RecentChanges : color the "(+X)" or "(-X)" (number of characters added or removed) */
.mw-plusminus-pos { color:#004000 !important; }
.mw-plusminus-neg { color:#400000 !important; }
body.page-Special_RecentChanges .mw-line-even { background-color:#f0f0f0; }
body.page-Special_RecentChanges .mw-line-even:hover,
body.page-Special_RecentChanges .mw-line-odd:hover { background-color:#e0e0e0; }


/* Hilight a line of source code. This relies on javascript, in [[MediaWiki:Common.js]] */
.source-line-hilite { background-color:yellow; }


/* Hide the main page title */
body.page-Main_Page h1.firstHeading { display:none !important; }


/* Skill tables, [[NetHackWiki:Skill_table_generator]] */
.Spell-skilltable .restricted,
.Combat-skilltable .restricted,
.Weapon-skilltable .restricted    { background-color: #f76; }
.Spell-skilltable .basic,
.Combat-skilltable .basic,
.Weapon-skilltable .basic         { background-color: #e96; }
.Spell-skilltable .skilled,
.Combat-skilltable .skilled,
.Weapon-skilltable .skilled       { background-color: #db6; }
.Spell-skilltable .expert,
.Combat-skilltable .expert,
.Weapon-skilltable .expert        { background-color: #cd6; }
.Spell-skilltable .master,
.Combat-skilltable .master,
.Weapon-skilltable .master        { background-color: #bf6; }
.Spell-skilltable .grandmaster,
.Combat-skilltable .grandmaster,
.Weapon-skilltable .grandmaster   { background-color: #af6; }
.Spell-skilltable .unknown_skill,
.Combat-skilltable .unknown_skill,
.Weapon-skilltable .unknown_skill { background-color: #8ff; }




/* [[Template:Features]] [[Template:ASCII]] */
.dungeonfeatures td a:hover,
.ASCIItable td a:hover { background-color:#ff8080; }
.dungeonfeatures td a,
.ASCIItable td a { display: block; }
.dungeonfeatures td .selflink,
.ASCIItable td .selflink {
      display: block;
      background-color:#b0ff80;
}
.ASCIItable td a,
.ASCIItable td .selflink { text-align:center; }


/* [[Template:Todo]] */
.todo {
  width: 90%;
  border: solid 3px #FFCCFF;
  background-color: #FFEEFF;
  text-align: left;
  padding: 1em;
  margin-left:auto;
  margin-right:auto;
}

/* [[Template:Delete]] */
.delete {
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  border: solid 3px black;
  background-color: yellow;
  text-align: left;
  padding: 1em;
}

/* [[Template:Merge]] */
.merge {
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  border: solid 3px black;
  background-color: lightgreen;
  text-align: left;
  padding: 1em;
}

/* [[Template:Fairuse]], [[Template:NGPL]], [[Template:CWI]], [[Template:Rodney]], [[Template:Basedon]], [[Template:JAH]], [[Template:DOD]] */
.license_fairuse,
.license_ngpl,
.license_cwi,
.license_rodney,
.license_basedon,
.license_jah,
.license_dod {
  width: 80%;
  margin-left:auto;
  margin-right:auto;
  background-color: #F1F1DE;
  border:2px solid #999966;
  padding: 1em;
}


/* [[Template:Speechbubble]] */
/* speechbubble css from http://nicolasgallagher.com/pure-css-speech-bubbles/ */
.speechbubble {
  position:relative;
  padding:15px;
  margin:1em 0 3em;
  color:lightgray;
  background:black; /* default background for browsers without gradient support */
  -moz-border-radius:10px;
  -webkit-border-radius:10px;
  border-radius:10px;
}
.speechbubble:after {
  content:"";
  display:block; /* reduce the damage in FF3.0 */
  position:absolute;
  bottom:-15px; /* value = - border-top-width - border-bottom-width */
  left:50px; /* controls horizontal position */
  width:0;
  height:0;
  border-width:15px 15px 0; /* vary these values to change the angle of the vertex */
  border-style:solid;
  border-color:black transparent;
}

/* Syntax coloring via GeSHi */
.mw-geshi {
  background-color:#f9f9f9;
  border: 1px dashed #2F6FAB;
  padding: 1em;
}
.mw-geshi li:hover {
  background-color: #ffffdd;
}

/* fix rendering bug where insufficient line height causes characters to be clipped, */
/* making e.g. underscores look like spaces */
.mw-geshi #line .de1, .mw-geshi #line .de2,
.mw-geshi .geshiline .de1, .mw-geshi .geshiline .de2 {
  font: 1em/1.6em monospace; margin: -0.4em 0;
}

/*</pre>*/