MediaWiki:Gadget-newInfobox.css

From The Blockheads Wiki
Revision as of 05:03, 28 June 2024 by wp>Harristic (to avoid conflicts with hydra theme)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.
/* Infobox design
- based on [[User:Supeika]]'s infobox design used on Fandom
- adapted to Vector by [[User:u.ayaao.p]]
- finalized and tweaked to match the new skin by [[User:Spongecake89]]
*/
.notaninfobox {
	--infobox-header-background-color: var(--infobox-title-background-color);
	border: 1px solid var(--infobox-border-color, var(--infobox-title-background-color)) !important;
}

.notaninfobox .infobox-title {
	text-align: center;
	font-weight: bold;
	font-size: 140%;
	text-shadow: 2px 2px 0 var(--infobox-title-bottom-border-color);
	margin: 1px 2px 0;
	background-color: var(--infobox-title-background-color);
	border-inline: 3px solid var(--infobox-title-border-inline-color) !important;
	border-top: 3px solid var(--infobox-title-top-border-color) !important;
	border-bottom: 3px solid var(--infobox-title-bottom-border-color) !important;
}

/* Makes the infobox title white only on light mode (dark mode infobox title remains gray) */
body.wgl-theme-light .notaninfobox .infobox-title {
	color: #fff;
}

/* Removes infobox title text shadow for code blocks (ie: command infoboxes) */
.notaninfobox .infobox-title > code {
	text-shadow: none;
}

/* Better aligns sprite image to top of infobox title text */
.notaninfobox .infobox-title .sprite-file {
	--vertical-align: middle;
}

/* Collapse infobox rows (essential for row boarders) */
 .notaninfobox .infobox-rows {
	border-collapse: collapse !important
} 

/* Extra row padding (improves readability) */
 .notaninfobox .infobox-rows td {
	padding-block: 6px;
} 

/* Light mode row borders */
 .infobox-rows tr:not(:last-child) {
	border-bottom: 1px solid;
	border-color: #ccc;
} 

/* Dark mode row borders */
body.wgl-theme-dark .infobox-rows tr:not(:last-child) {
	border-color: #444;
}

/* Makes infobox title text smaller on mobile */
body.skin-minerva .notaninfobox .infobox-title {
	font-size: 120%;
}

/* Fixes the infobox tab nav being too bright on dark mode */
body.wgl-theme-dark ul.tabbernav {
	border-color: #444;
}

/* Minecraft Light */
:root {
	--infobox-title-background-color: #6ea21e;
	--infobox-title-top-border-color: #a8c778;
	--infobox-title-border-inline-color: #618f1a;
	--infobox-title-bottom-border-color: #537a17;
}

/* MCD Light */
body.rootpage-Minecraft_Dungeons,
body.rootpage-Talk_Minecraft_Dungeons,
body.ns-10000,
body.ns-10001 {
	--infobox-title-background-color: #c26533;
	--infobox-title-top-border-color: #daa385;
	--infobox-title-border-inline-color: #b86030;
	--infobox-title-bottom-border-color: #a5562b;
}

/* MCL Light */
body.rootpage-Minecraft_Legends,
body.rootpage-Talk_Minecraft_Legends,
body.ns-10006,
body.ns-10007 {
	--infobox-title-background-color: #00bcaa;
	--infobox-title-top-border-color: #6ed9cf;
	--infobox-title-border-inline-color: #00b3a2;
	--infobox-title-bottom-border-color: #00a091;
}

/* MCE Light */
body.rootpage-Minecraft_Earth,
body.rootpage-Talk_Minecraft_Earth,
body.ns-10002,
body.ns-10003 {
	--infobox-title-background-color: #2eb06d;
    --infobox-title-top-border-color: #82d0a7;
    --infobox-title-border-inline-color: #2ca768;
    --infobox-title-bottom-border-color: #27965d;
}

/* MCSM Light */
body.rootpage-Minecraft_Story_Mode,
body.rootpage-Talk_Minecraft_Story_Mode,
body.rootpage-Minecraft_Story_Mode_-_Season_Two,
body.rootpage-Talk_Minecraft_Story_Mode_-_Season_Two,
body.ns-10004,
body.ns-10005 {
	--infobox-title-background-color: #aa8a34;
    --infobox-title-top-border-color: #c8b37b;
    --infobox-title-border-inline-color: #a28331;
    --infobox-title-bottom-border-color: #886e2a;
}

/* Minecraft Dark */
body.wgl-theme-dark {
	--infobox-title-background-color: #0e6a3b;
	--infobox-title-top-border-color: #328058;
	--infobox-title-border-inline-color: #075032;
	--infobox-title-bottom-border-color: #084023;
}

/* MCD Dark */
body.wgl-theme-dark.rootpage-Minecraft_Dungeons,
body.wgl-theme-dark.rootpage-Talk_Minecraft_Dungeons,
body.wgl-theme-dark.ns-10000,
body.wgl-theme-dark.ns-10001 {
    --infobox-title-background-color: #833f20;
    --infobox-title-top-border-color: #a14e27;
    --infobox-title-border-inline-color: #6e351b;
    --infobox-title-bottom-border-color: #5b2b16;
}

/* MCL Dark */
body.wgl-theme-dark.rootpage-Minecraft_Legends,
body.wgl-theme-dark.rootpage-Talk_Minecraft_Legends,
body.wgl-theme-dark.ns-10006,
body.wgl-theme-dark.ns-10007 {
	--infobox-title-background-color: #236964;
    --infobox-title-top-border-color: #44807b;
    --infobox-title-border-inline-color: #1e5955;
    --infobox-title-bottom-border-color: #194a46;
}

/* MCE Dark */
body.wgl-theme-dark.rootpage-Minecraft_Earth,
body.wgl-theme-dark.rootpage-Talk_Minecraft_Earth,
body.wgl-theme-dark.ns-10002,
body.wgl-theme-dark.ns-10003 {
	--infobox-title-background-color: #0a783f;
    --infobox-title-top-border-color: #0d8b4a;
    --infobox-title-border-inline-color: #076635;
    --infobox-title-bottom-border-color: #05542a;
}

/* MCSM Dark */
body.wgl-theme-dark.rootpage-Minecraft_Story_Mode,
body.wgl-theme-dark.rootpage-Talk_Minecraft_Story_Mode,
body.wgl-theme-dark.rootpage-Minecraft_Story_Mode_-_Season_Two,
body.wgl-theme-dark.rootpage-Talk_Minecraft_Story_Mode_-_Season_Two,
body.wgl-theme-dark.ns-10004,
body.wgl-theme-dark.ns-10005 {
	--infobox-title-background-color: #977c43;
    --infobox-title-top-border-color: #a7905f;
    --infobox-title-border-inline-color: #856d3b;
    --infobox-title-bottom-border-color: #6a572f;
}