MediaWiki:Common.css

From MOASSpedia
Jump to navigation Jump to search

Note: After publishing, 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 / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
/* CSS placed here will be applied to all skins */

/**
 * Style for horizontal lists (separator following item).
 * @source https://mediawiki.org/wiki/Snippets/Horizontal_lists
 * @revision 9 (2016-08-10)
 * @author [[User:Edokter]]
 */
.hlist dl,
.hlist ol,
.hlist ul {
	margin: 0;
	padding: 0;
}

/* Display list items inline */
.hlist dd,
.hlist dt,
.hlist li {
	/* don't trust the note that says margin doesn't work with inline
	 * removing margin: 0 makes dds have margins again */
	margin: 0;
	display: inline;
}

/* Display nested lists inline */
/*
We remove .inline since it's not used here.
.hlist.inline,
.hlist.inline dl,
.hlist.inline ol,
.hlist.inline ul,
*/
.hlist dl dl, .hlist dl ol, .hlist dl ul,
.hlist ol dl, .hlist ol ol, .hlist ol ul,
.hlist ul dl, .hlist ul ol, .hlist ul ul {
	display: inline;
}

/* Hide empty list items */
.hlist .mw-empty-li,
.hlist .mw-empty-elt {
	display: none;
}

/* Generate interpuncts */
.hlist dt:after {
	content: ": ";
}

.hlist dd:after,
.hlist li:after {
	content: " · ";
	font-weight: bold;
}

.hlist dd:last-child:after,
.hlist dt:last-child:after,
.hlist li:last-child:after {
	content: none;
}

/* Add parentheses around nested lists */
.hlist dd dd:first-child:before, .hlist dd dt:first-child:before, .hlist dd li:first-child:before,
.hlist dt dd:first-child:before, .hlist dt dt:first-child:before, .hlist dt li:first-child:before,
.hlist li dd:first-child:before, .hlist li dt:first-child:before, .hlist li li:first-child:before {
	content: " (";
	font-weight: normal;
}

.hlist dd dd:last-child:after, .hlist dd dt:last-child:after, .hlist dd li:last-child:after,
.hlist dt dd:last-child:after, .hlist dt dt:last-child:after, .hlist dt li:last-child:after,
.hlist li dd:last-child:after, .hlist li dt:last-child:after, .hlist li li:last-child:after {
	content: ")";
	font-weight: normal;
}

/* Put ordinals in front of ordered list items */
.hlist ol {
	counter-reset: listitem;
}

.hlist ol > li {
	counter-increment: listitem;
}

.hlist ol > li:before {
	content: " " counter(listitem) "\a0";
}

.hlist dd ol > li:first-child:before,
.hlist dt ol > li:first-child:before,
.hlist li ol > li:first-child:before {
	content: " (" counter(listitem) "\a0";
}

/* Infobox template style */
.infobox {
	border: 1px solid #a2a9b1;
	border-spacing: 3px;
	background-color: #f8f9fa;
	color: black;
	/* @noflip */
	margin: 0.5em 0 0.5em 1em;
	padding: 0.2em;
	/* @noflip */
	float: right;
	/* @noflip */
	clear: right;
	font-size: 88%;
	line-height: 1.5em;
	width: 22em;
}

.infobox-header,
.infobox-label,
.infobox-above,
.infobox-full-data,
.infobox-data,
.infobox-below,
.infobox-subheader,
.infobox-image,
.infobox-navbar,
/* Remove element selector when every .infobox thing is using the standard module/templates  */
.infobox th,
.infobox td {
	vertical-align: top;
}

.infobox-label,
.infobox-data,
/* Remove element selector when every .infobox thing is using the standard module/templates  */
.infobox th,
.infobox td {
	/* @noflip */
	text-align: left;
}

/* Remove .infobox when element selectors above are removed */
.infobox .infobox-above,
.infobox .infobox-title,
/* Remove element selector when every .infobox thing is using the standard module/templates  */
.infobox caption {
	font-size: 125%;
	font-weight: bold;
	text-align: center;
}

.infobox-title,
/* Remove element selector when every .infobox thing is using the standard module/templates  */
.infobox caption {
	padding: 0.2em;
}

/* Remove .infobox when element selectors above are removed */
.infobox .infobox-header,
.infobox .infobox-subheader,
.infobox .infobox-image,
.infobox .infobox-full-data,
.infobox .infobox-below {
	text-align: center;
}

/* Remove .infobox when element selectors above are removed */
.infobox .infobox-navbar {
	/* @noflip */
	text-align: right;
}

/* Resize images */
.imageheight32 img, img.imageheight32 { height: 32px; }
.imageheight48 img, img.imageheight48 { height: 48px; }
.imageheight64 img, img.imageheight64 { height: 64px; }
.imageheight80 img, img.imageheight80 { height: 80px; }
.imageheight96 img, img.imageheight96 { height: 96px; }
.imageheight112 img, img.imageheight112 { height: 112px; }
.imageheight128 img, img.imageheight128 { height: 128px; }
.imageheight160 img, img.imageheight160 { height: 160px; }
.imageheight192 img, img.imageheight192 { height: 192px; }
.imageheight224 img, img.imageheight224 { height: 224px; }
.imageheight256 img, img.imageheight256 { height: 256px; }
.imageheight320 img, img.imageheight320 { height: 320px; }
.imageheight384 img, img.imageheight384 { height: 384px; }
.imageheight448 img, img.imageheight448 { height: 448px; }
.imageheight512 img, img.imageheight512 { height: 512px; }
.imagewidth32 img, img.imagewidth32 { width: 32px; }
.imagewidth48 img, img.imagewidth48 { width: 48px; }
.imagewidth64 img, img.imagewidth64 { width: 64px; }
.imagewidth80 img, img.imagewidth80 { width: 80px; }
.imagewidth96 img, img.imagewidth96 { width: 96px; }
.imagewidth112 img, img.imagewidth112 { width: 112px; }
.imagewidth128 img, img.imagewidth128 { width: 128px; }
.imagewidth160 img, img.imagewidth160 { width: 160px; }
.imagewidth192 img, img.imagewidth192 { width: 192px; }
.imagewidth224 img, img.imagewidth224 { width: 224px; }
.imagewidth256 img, img.imagewidth256 { width: 256px; }
.imagewidth320 img, img.imagewidth320 { width: 320px; }
.imagewidth384 img, img.imagewidth384 { width: 384px; }
.imagewidth448 img, img.imagewidth448 { width: 448px; }
.imagewidth512 img, img.imagewidth512 { width: 512px; }

/* Revert invert for images */
.invertimage img, img.invertimage {
    filter: invert(100%);
}

/* Table cells that contain long lines */
.wordbreakall td {
	word-break: break-all;
}