Difference between revisions of "MediaWiki:Common.css"
(Bolden xkcd's main topics at Category:comics by topic) |
(restore navbox + infobox styes) |
||
| Line 1: | Line 1: | ||
| + | /********************************************************************** | ||
| + | * Styles for the Navbox (navigation box) template * | ||
| + | **********************************************************************/ | ||
| + | .navbox { /* Navbox container style */ | ||
| + | border: 1px solid #aaa; | ||
| + | width: 100%; | ||
| + | margin: auto; | ||
| + | clear: both; | ||
| + | font-size: 88%; | ||
| + | text-align: center; | ||
| + | padding: 1px; | ||
| + | } | ||
| + | .navbox-inner, | ||
| + | .navbox-subgroup { | ||
| + | width: 100%; | ||
| + | } | ||
| + | .navbox th, | ||
| + | .navbox-title, | ||
| + | .navbox-abovebelow { | ||
| + | text-align: center; /* Title and above/below styles */ | ||
| + | padding-left: 1em; | ||
| + | padding-right: 1em; | ||
| + | } | ||
| + | th.navbox-group { /* Group style */ | ||
| + | white-space: nowrap; | ||
| + | /* @noflip */ | ||
| + | text-align: right; | ||
| + | } | ||
| + | .navbox, | ||
| + | .navbox-subgroup { | ||
| + | background: #fdfdfd; /* Background color */ | ||
| + | } | ||
| + | .navbox-list { | ||
| + | border-color: #fdfdfd; /* Must match background color */ | ||
| + | } | ||
| + | .navbox th, | ||
| + | .navbox-title { | ||
| + | background: #ccccff; /* Level 1 color */ | ||
| + | } | ||
| + | .navbox-abovebelow, | ||
| + | th.navbox-group, | ||
| + | .navbox-subgroup .navbox-title { | ||
| + | background: #ddddff; /* Level 2 color */ | ||
| + | } | ||
| + | .navbox-subgroup .navbox-group, | ||
| + | .navbox-subgroup .navbox-abovebelow { | ||
| + | background: #e6e6ff; /* Level 3 color */ | ||
| + | } | ||
| + | .navbox-even { | ||
| + | background: #f7f7f7; /* Even row striping */ | ||
| + | } | ||
| + | .navbox-odd { | ||
| + | background: transparent; /* Odd row striping */ | ||
| + | } | ||
| + | table.navbox + table.navbox { /* Single pixel border between adjacent navboxes */ | ||
| + | margin-top: -1px; /* (doesn't work for IE6, but that's okay) */ | ||
| + | } | ||
| + | .navbox .hlist td dl, | ||
| + | .navbox .hlist td ol, | ||
| + | .navbox .hlist td ul, | ||
| + | .navbox td.hlist dl, | ||
| + | .navbox td.hlist ol, | ||
| + | .navbox td.hlist ul { | ||
| + | padding: 0.125em 0; /* Adjust hlist padding in navboxes */ | ||
| + | } | ||
| + | .navbox .hlist dd, | ||
| + | .navbox .hlist dt, | ||
| + | .navbox .hlist li { | ||
| + | white-space: nowrap; /* Nowrap list items in navboxes */ | ||
| + | white-space: normal !ie; /* IE < 8 no-wraps entire list, so disable it */ | ||
| + | } | ||
| + | .navbox .hlist dd dl, | ||
| + | .navbox .hlist dt dl, | ||
| + | .navbox .hlist li ol, | ||
| + | .navbox .hlist li ul { | ||
| + | white-space: normal; /* But allow parent list items to be wrapped */ | ||
| + | } | ||
| + | ol + table.navbox, | ||
| + | ul + table.navbox { | ||
| + | margin-top: 0.5em; /* Prevent lists from clinging to navboxes */ | ||
| + | } | ||
| + | |||
| + | /********************************************************************** | ||
| + | * Styles for the Infobox template * | ||
| + | **********************************************************************/ | ||
| + | |||
| + | .infobox { | ||
| + | border: 1px solid #aaa; | ||
| + | background-color: #f9f9f9; | ||
| + | color: black; | ||
| + | /* @noflip */ | ||
| + | margin: 0.5em 0 0.5em 1em; | ||
| + | padding: 0.2em; | ||
| + | /* @noflip */ | ||
| + | float: right; | ||
| + | /* @noflip */ | ||
| + | clear: right; | ||
| + | /* @noflip */ | ||
| + | text-align: left; | ||
| + | font-size: 88%; | ||
| + | line-height: 1.5em; | ||
| + | } | ||
| + | .infobox caption { | ||
| + | font-size: 125%; | ||
| + | font-weight: bold; | ||
| + | } | ||
| + | .infobox td, | ||
| + | .infobox th { | ||
| + | vertical-align: top; | ||
| + | } | ||
| + | .infobox.bordered { | ||
| + | border-collapse: collapse; | ||
| + | } | ||
| + | .infobox.bordered td, | ||
| + | .infobox.bordered th { | ||
| + | border: 1px solid #aaa; | ||
| + | } | ||
| + | .infobox.bordered .borderless td, | ||
| + | .infobox.bordered .borderless th { | ||
| + | border: 0; | ||
| + | } | ||
| + | |||
| + | .infobox.sisterproject { | ||
| + | width: 20em; | ||
| + | font-size: 90%; | ||
| + | } | ||
| + | |||
| + | .infobox.standard-talk { | ||
| + | border: 1px solid #c0c090; | ||
| + | background-color: #f8eaba; | ||
| + | } | ||
| + | .infobox.standard-talk.bordered td, | ||
| + | .infobox.standard-talk.bordered th { | ||
| + | border: 1px solid #c0c090; | ||
| + | } | ||
| + | |||
| + | /* styles for bordered infobox with merged rows */ | ||
| + | .infobox.bordered .mergedtoprow td, | ||
| + | .infobox.bordered .mergedtoprow th { | ||
| + | border: 0; | ||
| + | border-top: 1px solid #aaa; | ||
| + | /* @noflip */ | ||
| + | border-right: 1px solid #aaa; | ||
| + | } | ||
| + | |||
| + | .infobox.bordered .mergedrow td, | ||
| + | .infobox.bordered .mergedrow th { | ||
| + | border: 0; | ||
| + | /* @noflip */ | ||
| + | border-right: 1px solid #aaa; | ||
| + | } | ||
| + | |||
| + | /********************************************************************** | ||
| + | * Allow transcluded pages to display in lists rather than a table * | ||
| + | **********************************************************************/ | ||
| + | |||
| + | .listify td { display: list-item; } | ||
| + | .listify tr { display: block; } | ||
| + | .listify table { display: block; } | ||
| + | |||
/********************************************************************** | /********************************************************************** | ||
* External link tweaks * | * External link tweaks * | ||
Revision as of 20:16, 25 November 2012
/**********************************************************************
* Styles for the Navbox (navigation box) template *
**********************************************************************/
.navbox { /* Navbox container style */
border: 1px solid #aaa;
width: 100%;
margin: auto;
clear: both;
font-size: 88%;
text-align: center;
padding: 1px;
}
.navbox-inner,
.navbox-subgroup {
width: 100%;
}
.navbox th,
.navbox-title,
.navbox-abovebelow {
text-align: center; /* Title and above/below styles */
padding-left: 1em;
padding-right: 1em;
}
th.navbox-group { /* Group style */
white-space: nowrap;
/* @noflip */
text-align: right;
}
.navbox,
.navbox-subgroup {
background: #fdfdfd; /* Background color */
}
.navbox-list {
border-color: #fdfdfd; /* Must match background color */
}
.navbox th,
.navbox-title {
background: #ccccff; /* Level 1 color */
}
.navbox-abovebelow,
th.navbox-group,
.navbox-subgroup .navbox-title {
background: #ddddff; /* Level 2 color */
}
.navbox-subgroup .navbox-group,
.navbox-subgroup .navbox-abovebelow {
background: #e6e6ff; /* Level 3 color */
}
.navbox-even {
background: #f7f7f7; /* Even row striping */
}
.navbox-odd {
background: transparent; /* Odd row striping */
}
table.navbox + table.navbox { /* Single pixel border between adjacent navboxes */
margin-top: -1px; /* (doesn't work for IE6, but that's okay) */
}
.navbox .hlist td dl,
.navbox .hlist td ol,
.navbox .hlist td ul,
.navbox td.hlist dl,
.navbox td.hlist ol,
.navbox td.hlist ul {
padding: 0.125em 0; /* Adjust hlist padding in navboxes */
}
.navbox .hlist dd,
.navbox .hlist dt,
.navbox .hlist li {
white-space: nowrap; /* Nowrap list items in navboxes */
white-space: normal !ie; /* IE < 8 no-wraps entire list, so disable it */
}
.navbox .hlist dd dl,
.navbox .hlist dt dl,
.navbox .hlist li ol,
.navbox .hlist li ul {
white-space: normal; /* But allow parent list items to be wrapped */
}
ol + table.navbox,
ul + table.navbox {
margin-top: 0.5em; /* Prevent lists from clinging to navboxes */
}
/**********************************************************************
* Styles for the Infobox template *
**********************************************************************/
.infobox {
border: 1px solid #aaa;
background-color: #f9f9f9;
color: black;
/* @noflip */
margin: 0.5em 0 0.5em 1em;
padding: 0.2em;
/* @noflip */
float: right;
/* @noflip */
clear: right;
/* @noflip */
text-align: left;
font-size: 88%;
line-height: 1.5em;
}
.infobox caption {
font-size: 125%;
font-weight: bold;
}
.infobox td,
.infobox th {
vertical-align: top;
}
.infobox.bordered {
border-collapse: collapse;
}
.infobox.bordered td,
.infobox.bordered th {
border: 1px solid #aaa;
}
.infobox.bordered .borderless td,
.infobox.bordered .borderless th {
border: 0;
}
.infobox.sisterproject {
width: 20em;
font-size: 90%;
}
.infobox.standard-talk {
border: 1px solid #c0c090;
background-color: #f8eaba;
}
.infobox.standard-talk.bordered td,
.infobox.standard-talk.bordered th {
border: 1px solid #c0c090;
}
/* styles for bordered infobox with merged rows */
.infobox.bordered .mergedtoprow td,
.infobox.bordered .mergedtoprow th {
border: 0;
border-top: 1px solid #aaa;
/* @noflip */
border-right: 1px solid #aaa;
}
.infobox.bordered .mergedrow td,
.infobox.bordered .mergedrow th {
border: 0;
/* @noflip */
border-right: 1px solid #aaa;
}
/**********************************************************************
* Allow transcluded pages to display in lists rather than a table *
**********************************************************************/
.listify td { display: list-item; }
.listify tr { display: block; }
.listify table { display: block; }
/**********************************************************************
* External link tweaks *
**********************************************************************/
/* Custom icon for links to xkcd.com */
a.external[href*="xkcd.com"] {
background: url("http://www.explainxkcd.com/wiki/images/1/1f/xkcd_favicon.png") no-repeat scroll right center transparent !important;
padding-right: 18px !important;
}
/* Don't add the external link arrow to urls pointing to this site.
* Also, don't add the xkcd favicon (see above) to elements marked
* with the class "no-xkcd-favicon", nor to the page [[explain xkcd:Copyrights]]. */
a.external[href*="explainxkcd.com"],
.no-xkcd-favicon a.external[href*="xkcd.com"],
.page-explain_xkcd_Copyrights a.external[href*="xkcd.com"] {
background: none !important;
padding-right: 0 !important;
}
/* Don't underline links on hover if so instructed. Used in {{comic}} */
.no-link-underline a:hover {
text-decoration: none;
}
/**********************************************************************
* Special styles for [[List of all comics]] (and elsewhere) *
**********************************************************************/
/* Don't show create link for articles that already exist */
a:not(.new) + span.create {
display: none;
}
/* Add some horizontal padding to tables, if they request it*/
table.table-padding > * > tr > td {
padding-left: 0.5em;
padding-right: 0.5em;
}
/**********************************************************************
* Add icons to the left navigation menu *
**********************************************************************/
div#p-navigation li a {
padding-left: 20px;
background-repeat: no-repeat;
line-height: 2em;
}
div#p-navigation li#n-mainpage-description a {
background-image: url("http://upload.wikimedia.org/wikipedia/commons/3/3f/House_icon.png");
}
div#p-navigation li#n-Latest-comic a {
background-image: url("http://upload.wikimedia.org/wikipedia/commons/5/5b/New_silk.png");
}
div#p-navigation li#n-portal a {
background-image: url("http://upload.wikimedia.org/wikipedia/commons/d/de/Group.png");
}
div#p-navigation li#n-xkcd-com a {
background-image: url("http://www.explainxkcd.com/wiki/images/thumb/2/26/Favicon.png/16px-Favicon.png");
}
div#p-navigation li#n-recentchanges a {
background-image: url("http://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Farm-Fresh_clock_edit.png/16px-Farm-Fresh_clock_edit.png");
}
div#p-navigation li#n-randompage a {
background-image: url("http://upload.wikimedia.org/wikipedia/commons/b/b3/Silk_arrow_switch.png");
}
div#p-navigation li#n-All-comics a {
background-image: url("http://upload.wikimedia.org/wikipedia/commons/c/c0/Images.png");
}
div#p-navigation li#n-help a {
background-image: url("http://upload.wikimedia.org/wikipedia/commons/a/aa/Help.png");
}
/**********************************************************************
* Format tagline *
**********************************************************************/
#siteSub {
display: block;
font-style: italic;
opacity:0.5;
padding-left: 20px;
background-image: url("http://www.explainxkcd.com/wiki/images/thumb/6/6d/BlackHat_head.png/16px-BlackHat_head.png");
background-repeat: no-repeat;
}
/**********************************************************************
* Bolden xkcd's main topics at Category:comics by topic *
**********************************************************************/
.page-Category_Comics_by_topic a[title$=Romance],
.page-Category_Comics_by_topic a[title$=Sarcasm],
.page-Category_Comics_by_topic a[title$=Math],
.page-Category_Comics_by_topic a[title$=Language] {
font-weight: bold;
}
