MediaWiki:Common.css

From Modded Wiki
Revision as of 12:34, 4 July 2024 by Patbox (talk | contribs)
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 */

/**
 * See [[MediaWiki:Vector.css]] for desktop theme related styles.
 * See [[MediaWiki:Vector-theme-dark.css]] for desktop dark theme related styles.
 *
 * See [[MediaWiki:Minerva.css]] for mobile theme related styles.
 * See [[MediaWiki:Minerva-theme-dark.css]] for mobile dark theme related styles.
 */

/* Minecraft font
 * [[File:Minecraft.eot]] [[File:Minecraft.woff2]] [[File:Minecraft.woff]]
 * [[File:Minecraft.ttf]].
 */
@font-face {
	font-family: Minecraft;
	src: url('filepath://Minecraft.eot?#iefix') format('embedded-opentype'),
		 url('filepath://Minecraft.woff2') format('woff2'),
	     url('filepath://Minecraft.woff') format('woff'),
	     url('filepath://Minecraft.ttf') format('truetype');
}

body {
	font-family: "Liberation Sans", Arial, Helvetica, FreeSans, sans-serif;
}

/** Color variables for tweaking by different themes **/
:root {
	--navbox-background-color: #FFF;
	--navbox-border-color: #CCC;
	--navbox-header-color: #CCC;
	--navbox-secondary-header-color: #DDD;
	--navbox-tertiary-header-color: #EEE;
	--navbox-section-color: #EEE;
}

body.wgl-theme-dark {
	--navbox-background-color: #333;
	--navbox-border-color: #444;
	--navbox-header-color: #111;
	--navbox-secondary-header-color: #181818;
	--navbox-tertiary-header-color: #222;
	--navbox-section-color: #222;
}

/* Page display title */
.mw-page-title-separator {
	margin-right: 0.25em;
}

.ns-10000 .mw-page-title-namespace,
.ns-10002 .mw-page-title-namespace,
.ns-10004 .mw-page-title-namespace,
.ns-10006 .mw-page-title-namespace {
	font-style: italic;
	margin-right: 1px;
}

/** Main page stylings **/
#main-page.main-page {
	display: grid;
	grid-template-areas: "a" "k" "b" "c" "d" "e" "f" "g" "h" "i" "j";
	grid-template-columns: 1fr;
	grid-gap: 2px;
}
@media screen and (min-width:990px) {
	#main-page.main-page {
		grid-template-areas: "a a a" "k k k" "b b c" "d e f" "g h i" "j j j";
		grid-template-columns: repeat(3, 1fr);
	}
}

.fp-section {
	background-color: #FCFCFC;
	border: 1px solid #ccc;
	vertical-align: top;
	margin: 1px;
}

#fp-1 {
	grid-area: a;
}

#fp-2 {
	grid-area: b;
}

#fp-3 {
	grid-area: c;
}

#fp-4 {
	grid-area: d;
}

#fp-5 {
	grid-area: e;
}

#fp-6 {
	grid-area: f;
}

#fp-7 {
	grid-area: g;
}

#fp-8 {
	grid-area: h;
}

#fp-9 {
	grid-area: i;
}

#fp-10 {
	grid-area: j;
}

#fp-banner {
	grid-area: k;
}

.fp-banner-image {
	margin: 0 auto;
}

.fp-banner-content {
	display: flex;
	gap: 10px;
	margin: 10px 0;
	flex-wrap: wrap;
    align-items: center;
}

@media screen and (min-width: 480px) {
	.fp-banner-content {
		flex-wrap: nowrap;
	}
	
	.fp-banner-image {
		margin: 0;
	}
}

#fp-header.fp-header {
	display: grid;
	grid-template-areas: "aa" "ac" "ab";
	grid-template-columns: 1fr;
}
@media screen and (min-width: 990px) {
	#fp-header.fp-header {
		grid-template-areas: "aa ab" "ac ac";
		grid-template-columns: 335px 1fr;
	}
}
@media screen and (min-width: 1350px) {
	#fp-header.fp-header {
		grid-template-columns: 1fr 2fr;
	}
}

#fp-header-file {
	grid-area: aa;
}

#fp-header-links {
	grid-area: ab;
}

#fp-header-text {
	grid-area: ac;
}

#fp-header-file {
	margin: auto;
}
@media screen and (min-width:990px) {
	#fp-header-file {
		margin: auto 0;
	}
}

#fp-header-links {
	margin: auto 0;
}

#fp-header-links ul {
	-ms-columns: 160px;
	-moz-columns: 160px;
	-webkit-columns: 160px;
	columns: 160px;
	-ms-column-count: 3;
	-moz-column-count: 3;
	-webkit-column-count: 3;
	column-count: 3;
	margin-top: 0;
}


/** Main page stylings **/
.mcw-mainpage-icons {
	padding: 10px;
	display: flex;
	flex-wrap: wrap;
	row-gap: 20px;
	justify-content: center;
}

@media screen and (min-width:1400px) and (max-width:2400px) {
	#fp-2 .mcw-mainpage-icons {
		max-width: 750px;
		margin: auto;
	}
}

.mcw-mainpage-icon {
	flex: 0 0 auto;
	width: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.mcw-mainpage-icon-img {
	height: 60px;
	width: 60px;
	/* Make sure icon is correctly centered */
	display: flex;
	align-items: center;
	justify-content: center;
}

.mcw-mainpage-icon a {
    word-wrap: normal;
}

.mcw-mainpage-platforms {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: center;
	margin-top: 5px;
}

.mcw-mainpage-platform {
	display: flex;
	gap: 5px;
	flex-direction: column;
	padding: 5px;
}

@media screen and (max-width:989px) {
	.mcw-mainpage-platform {
	    flex: 1 1 200px;
	}

	.mcw-mainpage-platform {
	    flex-direction: row;
	    flex-wrap: wrap;
	}
}

/** Template stylings **/
/* [[Template:Navbox]] */
.navbox {
	background: var(--navbox-background-color);
	border: 1px solid var(--navbox-border-color);
	margin: 1em auto 0;
	width: 100%;
}

.navbox table {
	background: var(--navbox-background-color);
	margin-left: -4px;
	margin-right: -2px;
}

.navbox table:first-child {
	margin-top: -2px;
}

.navbox table:last-child {
	margin-bottom: -2px;
}

.navbox .navbox-top {
	white-space: nowrap;
	background-color: var(--navbox-header-color);
	padding: 0 3px;
	text-align: center;
}

.navbox tr:not(:first-child) .navbox-top,
.navbox .navbox .navbox-top {
	background-color: var(--navbox-secondary-header-color);
}

.navbox .navbox tr:not(:first-child) .navbox-top {
	background-color: var(--navbox-tertiary-header-color);
}

.navbox-navbar,
.navbox-navbar-mini {
	float: left;
	font-size: 80%;
	position: absolute;
}

.navbox-title {
	padding: 0 10px;
	font-size: 110%;
}

.navbox th {
	background-color: var(--navbox-section-color);
	padding: 0 10px;
	white-space: nowrap;
	text-align: right;
}

.navbox td {
	width: 100%;
	padding: 0 0 0 2px;
}

/* Clear before navboxes and their section */
h2:has(#Navigation):has(+ table.navbox) {
    clear: both;
}

/* [[Template:LoadBox]]*/
.load-page {
	background-color: rgba(255, 255, 255, .5);
	border: 1px solid #CCC;
	margin-bottom: 0.5em;
	padding: 0 0.5em;
}
body.wgl-theme-dark .load-page {
	background-color: #222;
	border-color: #111;
}
body.wgl-theme-dark .load-page .mw-spinner {
	filter: invert(1);
}

/* Hatnotes and disambiguation notices */
.hatnote {
	font-style: italic;
}

.hatnote i {
	font-style: normal;
}

div.hatnote {
	padding-left: 1.6em;
	margin-bottom: 0.5em;
}

div.hatnote + div.hatnote {
	margin-top: -0.5em;
}

/* [[Template:Layered blueprint]] */
@-webkit-keyframes layered-blueprint-fade-in {
	0% {
		opacity: 0;
		visibility: hidden;
	}
	100% {
		opacity: 1;
		visibility: visible;
	}
}

@keyframes layered-blueprint-fade-in {
	0% {
		opacity: 0;
		visibility: hidden;
	}
	100% {
		opacity: 1;
		visibility: visible;
	}
}

.layered-blueprint-layer {
	-webkit-animation: layered-blueprint-fade-in 200ms;
	animation: layered-blueprint-fade-in 200ms;
}

@-webkit-keyframes layered-blueprint-fade-out {
	0% {
		opacity: 1;
		visibility: visible;
	}
	100% {
		opacity: 0;
		visibility: hidden;
	}
}

@keyframes layered-blueprint-fade-out {
	0% {
		opacity: 1;
		visibility: visible;
	}
	100% {
		opacity: 0;
		visibility: hidden;
	}
}

.layered-blueprint-radio:checked + .layered-blueprint-tab + .layered-blueprint-layer ~ .layered-blueprint-layer {
	-webkit-animation: layered-blueprint-fade-out 200ms;
	animation: layered-blueprint-fade-out 200ms;
}

/* [[Template:YouTube]] */
.youtube-video {
	display: block;
}

/* Prevent page jump from the toolbar loading */
.client-js #editform {
	/* To disable margin collapsing */
	overflow: hidden;
}

.client-js .mw-editform > #wpTextbox1 {
    margin-top: 73px;
}

.wikiEditor-ui-toolbar .tabs span.tab a:before {
	filter: invert(1);
}

/* Alternating cell background */
.alternatecells:nth-child(odd) {
	background-color: #F9F9F9;
}
body.wgl-theme-dark .alternatecells:nth-child(odd) {
	background-color: #222;
}

/* Alternating table rows, primarily used with [[Template:Infobox row]] */
.alternaterows tr:nth-child(even),
.infobox-rows tr:nth-child(even) {
	background-color: #F9F9F9;
}
body.wgl-theme-dark .alternaterows tr:nth-child(even),
body.wgl-theme-dark .infobox-rows tr:nth-child(even) {
	background-color: #222;
}

/* Scale file page image to the width of the page */
.dynamic-image img,
#file img {
	max-width: 100%;
	height: auto;
}

/* Highlight clicked reference in blue to help navigation */
ol.references li:target,
sup.reference:target,
span.citation:target { 
	background-color: #C1DAF2;
}

/* Allow parts of toc to be hidden */
/* Section levels */
.toc-hidelevel2 .toclevel-1 ul,
.toc-hidelevel3 .toclevel-2 ul,
.toc-hidelevel4 .toclevel-3 ul,
/* Numbers */
.toc-nonumbers .tocnumber {
	display: none;
}

/* Adjust styles for small screens */
@media (max-width: 500px) {
	#content div.thumb {
		float: none;
	}
}

/* Simulate link styling for JS only links */
.jslink {
	color: #0645AD;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.jslink:hover {
	text-decoration: underline;
	cursor: pointer;
}

.jslink:active {
	color: #FAA700;
}

/* Try to use nearest neighbour scaling for pixelated images */
.mcwiki-header-grass,
.ns-special .gallerybox img,
.ns-14 .gallerybox img,
.filehistory a img,
.pixel-image,
.invslot-item-image,
.sprite {
	image-rendering: optimizeSpeed;
	image-rendering: -webkit-optimize-contrast;
	image-rendering: optimize-contrast;
	image-rendering: -moz-crisp-edges;
	image-rendering: -o-crisp-edges;
	image-rendering: crisp-edges;
	image-rendering: pixelated;
	-ms-interpolation-mode: nearest-neighbor;
}

/* Make external links the same colour as internal links, the icon is enough to differentiate them */
.mw-body a.external {
	color: #0645ad;
}

.mw-body a.external:visited {
	color: #0b0080;
}

.mw-body a.external:active {
	color: #faa700;
}

/* Make tabs the correct size */
body {
	-moz-tab-size: 4;
	-o-tab-size: 4;
	tab-size: 4;
}

/* Classes corresponding to Minecraft formatting codes */
.format-0 {
	color: #000;
	text-shadow: 0.125em 0.125em 0 #000;
}

.format-1 {
	color: #00A;
	text-shadow: 0.125em 0.125em 0 #00002A;
}

.format-2 {
	color: #0A0;
	text-shadow: 0.125em 0.125em 0 #002A00;
}

.format-3 {
	color: #0AA;
	text-shadow: 0.125em 0.125em 0 #002A2A;
}

.format-4 {
	color: #A00;
	text-shadow: 0.125em 0.125em 0 #2A0000;
}

.format-5 {
	color: #A0A;
	text-shadow: 0.125em 0.125em 0 #2A002A;
}

.format-6 {
	color: #FA0;
	text-shadow: 0.125em 0.125em 0 #2A2A00;
}

.format-7 {
	color: #AAA;
	text-shadow: 0.125em 0.125em 0 #2A2A2A;
}

.format-8 {
	color: #555;
	text-shadow: 0.125em 0.125em 0 #151515;
}

.format-9 {
	color: #55F;
	text-shadow: 0.125em 0.125em 0 #15153F;
}

.format-a {
	color: #5F5;
	text-shadow: 0.125em 0.125em 0 #153F15;
}

.format-b {
	color: #5FF;
	text-shadow: 0.125em 0.125em 0 #153F3F;
}

.format-c {
	color: #F55;
	text-shadow: 0.125em 0.125em 0 #3F1515;
}

.format-d {
	color: #F5F;
	text-shadow: 0.125em 0.125em 0 #3F153F;
}

.format-e {
	color: #FF5;
	text-shadow: 0.125em 0.125em 0 #3F3F15;
}

.format-f,
#minetip-tooltip {
	color: #FFF;
	text-shadow: 0.125em 0.125em 0 #3F3F3F;
}

.format-l {
	font-weight: bold;
	letter-spacing: 0.125em;
}

.format-m {
	text-decoration: line-through;
}

.format-n {
	text-decoration: underline;
}

.format-o {
	font-style: italic;
}

/* Styling for minecraft style tooltip */
#minetip-tooltip {
	position: fixed;
	top: 0;
	left: 0;
	background-color: #100010;
	background-color: rgba(16, 0, 16, 0.94);
	padding: 0.375em;
	font-family: Minecraft, sans-serif;
	font-size: 16px;
	word-spacing: 4px;
	white-space: nowrap;
	line-height: 1.25em;
	margin: 0.125em 0.25em;
	pointer-events: none;
	z-index: 9999;
}

#minetip-tooltip::before {
	content: "";
	position: absolute;
	top: 0.125em;
	right: -0.125em;
	bottom: 0.125em;
	left: -0.125em;
	border: 0.15em solid #100010;
	border-style: none solid;
	border-color: rgba(16, 0, 16, 0.94);
}

#minetip-tooltip::after {
	content: "";
	position: absolute;
	top: 0.125em;
	right: 0;
	bottom: 0.125em;
	left: 0;
	border: 0.125em solid #2D0A63;
	border-image: -webkit-linear-gradient(rgba(80, 0, 255, 0.31), rgba(40, 0, 127, 0.31)) 1;
	border-image: linear-gradient(rgba(80, 0, 255, 0.31), rgba(40, 0, 127, 0.31)) 1;
}

#minetip-tooltip > .description,
#minetip-tooltip > .minetip-description {
	display: block;
	margin-top: 0.25em;
}

/* prevent sitenotice show/hide toggle from moving page contents down after pageload */
.globalNotice .globalNoticeDismiss {
	float: right;
}

/* Prevent code from overflowing */
code {
    overflow-wrap: break-word;
}

/* Style code, pre and similar elements/classes with one common styling */
@media screen {
	pre, code, .mw-code {
		background-color: #F8F9FA;
		color: #000;
		border: 1px solid #BBC2C6;
	}
}

kbd, .kbd-color {
	text-shadow: 0 1px 0 #FFF;
	background-color: #F8F9FA;
	color: #222;
	box-shadow: 0 1px rgba(0,0,0,0.2), 0 0 0 2px #FFF inset;
	border-color: #BBC2C6;
	font-size: smaller;
}

/* Fixes for small screens */
@media screen and (max-width: 720px) {
	#mw-head {
		top: 13px;
	}
	
	div#mw-navigation div#mw-panel {
		position: static !important; /* position: relative may be added to inline styles by built-in JS after page load; it needs an !important to override */
	}
}

@media screen and (max-width: 500px) {
	/* TOC fix */
	#mw-content-text > .mw-parser-output > div[style*="float"] {
		float: none !important;
		margin: 0 !important;
	}
}

/* presumable Discord link on comportal */
.CPDiscord {
	float: right;
	margin-left: 1em;
	clear: right;
}

/* Styling for tooltip */
.explain {
	border-bottom: 0;
	text-decoration: underline dotted;
	cursor: help;
}

/* Show help cursor when an abbr element has a title attribute */
abbr[title] {
	cursor: help;
}

/* [[Template:History]] */
.historytable-experiment {
	border-top: 1px solid;
	border-color: inherit;
	margin-top: 0.5em;
	padding: 0 1em;
	font-size: smaller;
	line-height: 1;
	background-color: inherit;
}
.historytable-experiment > div {
	margin: -0.5em auto 0;
	padding: 0 0.5em;
	width: min-content;
	background-color: inherit;
}
.historytable-experiment + span {
	font-size: small;
	line-height: 1.3;
}

/* Machine-readable extra template information */
.history-json, .chest-json, .chestcontents-json, .sound-json, .spawntable-json, .advancements-json, .achievements-json {
	display: none;
}

.mw-references-columns {
	overflow-wrap: break-word;
}

#mw-imagepage-section-filehistory {
	overflow: auto;
}

/* Enhance contrast for search highlight since we use a blue background */
.mw-prefs-search-highlight {
    background: #c9dffd !important; /* default style contains !important */
    outline: 3px solid #c9dffd !important;
}