Difference between revisions of "MediaWiki:Common.css"
(remove enwiki-specific code, as most (all?) of it wasn't needed here anyway) |
(fix xkcd icon. add "sections" using comment markup. Improve comments for better documentation. fix rule for explain xkcd:Copyrights) |
||
| Line 1: | Line 1: | ||
| − | /* Custom | + | /********************************************************************** |
| + | * External link tweaks * | ||
| + | **********************************************************************/ | ||
| + | |||
| + | /* Custom icon for links to xkcd.com */ | ||
a.external[href*="xkcd.com"] { | a.external[href*="xkcd.com"] { | ||
| − | background: url("http://www.explainxkcd.com/wiki/images/ | + | background: url("http://www.explainxkcd.com/wiki/images/1/1f/xkcd_favicon.png") no-repeat scroll right center transparent !important; |
padding-right: 18px !important; | padding-right: 18px !important; | ||
} | } | ||
| Line 7: | Line 11: | ||
/* Don't add the external link arrow to urls pointing to this site. | /* 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 | * Also, don't add the xkcd favicon (see above) to elements marked | ||
| − | * with the class "no-xkcd-favicon", nor to the page [[ | + | * with the class "no-xkcd-favicon", nor to the page [[explain xkcd:Copyrights]]. */ |
| − | |||
a.external[href*="explainxkcd.com"], | a.external[href*="explainxkcd.com"], | ||
.no-xkcd-favicon a.external[href*="xkcd.com"], | .no-xkcd-favicon a.external[href*="xkcd.com"], | ||
| − | .page- | + | .page-explain_xkcd_Copyrights a.external[href*="xkcd.com"] { |
background: none !important; | background: none !important; | ||
padding-right: 0 !important; | padding-right: 0 !important; | ||
} | } | ||
| + | /* Don't underline links on hover if so instructed. Used in {{comic}} */ | ||
.no-link-underline a:hover { | .no-link-underline a:hover { | ||
text-decoration: none; | 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 { | a:not(.new) + span.create { | ||
display: none; | display: none; | ||
} | } | ||
| + | /* Add some horizontal padding to tables, if they request it*/ | ||
table.table-padding > * > tr > td { | table.table-padding > * > tr > td { | ||
padding-left: 0.5em; | padding-left: 0.5em; | ||
| Line 29: | Line 39: | ||
} | } | ||
| − | /* Add icons to the left navigation menu */ | + | /********************************************************************** |
| + | * Add icons to the left navigation menu * | ||
| + | **********************************************************************/ | ||
div#p-navigation li a { | div#p-navigation li a { | ||
padding-left: 20px; | padding-left: 20px; | ||
| Line 60: | Line 72: | ||
} | } | ||
| − | /* | + | /********************************************************************** |
| + | * Format tagline * | ||
| + | **********************************************************************/ | ||
#siteSub { | #siteSub { | ||
display: block; | display: block; | ||
Revision as of 03:11, 22 November 2012
/**********************************************************************
* 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;
}
