MediaWiki:Common.css

Revision as of 17:00, 20 June 2026 by Oros (talk | contribs)

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)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* General Infobox Styling */
.infoboxTable {
    width: 300px; /* Adjust width */
    background: #f7efe3; /* Soft parchment color */
    border: 2px solid #a67c52; /* A warm brown border */
    padding: 10px;
    margin: 0 10px 10px 0;
    border-radius: 10px; /* Soft rounded corners */
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2); /* Subtle shadow */
}

/* Table styling inside the infobox */
.infoboxTable th {
    background: #a67c52; /* Brownish header */
    color: white; /* White text */
    text-align: left;
    padding: 8px;
    font-weight: bold;
    border-bottom: 2px solid #8c6239;
}

/* Table cells (data) */
.infoboxTable td {
    padding: 8px;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

/* Hide empty figcaption below the image */
.infoboxTable figure figcaption {
    display: none;
}

/* Center images inside the infobox */
.infoboxTable figure {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Make images fit neatly */
.infoboxTable img {
    width: 100%;
    max-width: 250px;
    border-radius: 5px;
    border: 1px solid #8c6239;
}

/* Hide the infobox title row */
.infoboxTable .infoboxTitle {
    display: none;
}

@import url('https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@main/dist/en/v7.0.0/legacy/ol.css');

#adaris-continent-map {
    width: 100%;
    height: 80vh;
    min-height: 650px;
    background: #111;
    border: 1px solid #5b4a32;
}

#adaris-continent-map,
#adaris-continent-map .ol-viewport {
    background: #f2e4c9;
}

.pixel-area-tool {
  max-width: 420px;
  padding: 1em;
  border: 1px solid #c8b89e;
  border-radius: 6px;
  background: #f7efe3;
}

.pixel-area-tool h3 {
  margin-top: 0;
}

.pixel-area-tool label {
  display: block;
  margin-bottom: 0.75em;
}

.pixel-area-tool input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.25em;
  padding: 0.35em;
}

.pixel-area-tool button {
  margin-top: 0.5em;
  padding: 0.4em 0.8em;
  cursor: pointer;
}

#pixel-area-result {
  margin-top: 1em;
  font-size: 1.1em;
}

.adaris-tool-box {
  max-width: 400px;
  padding: 1em;
  margin: 1em 0;
  border: 1px solid #aaa;
  background: #f9f5ec;
}

.adaris-tool-box input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.4em;
  padding: 0.35em;
}
.spoiler-box {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;

  border: 1px solid #8b1e1e;
  background: #f8f1df;
  padding: 0.25em 0.6em;
  margin: 1em 0;
  border-radius: 4px;
}

/* Once expanded, stop acting like a bordered box */
.spoiler-box.mw-made-collapsible:not(.mw-collapsed) {
  display: block;
  width: auto;
  border: none;
  background: transparent;
  padding: 0;
}

/* Keep the expand/collapse link close to the label */
.spoiler-box .mw-collapsible-toggle {
  float: none;
  margin-left: 0.5em;
}

.spoiler-label {
  color: #8b1e1e;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.spoiler-box .mw-collapsible-content {
  margin-top: 0.6em;
}
.spoiler-small {
  border: 1px solid #8b1e1e;
  padding: 0.15em 0.3em;
  margin: 0.15em 0;
  border-radius: 2px;
  font-size: 85%;
  line-height: 1.15;
}

.spoiler-small-label {
  color: #a83232; /* red */
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.spoiler-small .mw-collapsible-content {
  margin-top: 0.25em;
}

importScript("https://adaris.wiki/MediaWiki:Familytree.js");

/* ============================================================
   Interactive deep-zoom map — styles
   Paste this block at the bottom of  MediaWiki:Common.css
   ============================================================ */

.interactive-map {
	position: relative;
	width: 100%;
	height: 600px;          /* override per page with | height = 700 */
	max-height: 85vh;
	background: #11131a;    /* shows briefly while the first tiles load */
	border-radius: 8px;
	overflow: hidden;
}

/* ---- Pins (an <a> when they link to an article) ---- */
.imap-pin {
	--pin-color: #2f6fed;
	position: absolute;
	display: block;
	width: 22px;
	height: 31px;
	color: var( --pin-color );
	cursor: pointer;
	transform-origin: bottom center;
	transition: transform 0.12s ease, opacity 0.3s ease;
	filter: drop-shadow( 0 1px 2px rgba( 0, 0, 0, 0.5 ) );
	z-index: 2;
}

.imap-pin:hover,
.imap-pin:focus {
	transform: scale( 1.18 );
	outline: none;
	z-index: 5;
}

.imap-pin svg {
	display: block;
	width: 100%;
	height: 100%;
}

.imap-pin svg path { fill: var(--pin-color); }

/* Name shown on hover / keyboard focus. */
.imap-pin-label {
	position: absolute;
	left: 50%;
	bottom: calc( 100% + 4px );
	transform: translateX( -50% );
	white-space: nowrap;
	padding: 3px 8px;
	border-radius: 5px;
	background: rgba( 17, 19, 26, 0.95 );
	color: #fff;
	font-family: sans-serif;
	font-size: 12px;
	line-height: 1.3;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.12s ease;
}

.imap-pin:hover .imap-pin-label,
.imap-pin:focus .imap-pin-label {
	opacity: 1;
}

/* ---- Text labels (region / area names) ---- */
.imap-label {
	position: absolute;
	white-space: nowrap;
	color: #fff;
	font-family: sans-serif;
	font-weight: 600;
	font-size: 15px;
	letter-spacing: 0.04em;
	text-decoration: none;
	text-shadow: 0 1px 2px rgba( 0, 0, 0, 0.9 ), 0 0 4px rgba( 0, 0, 0, 0.7 );
	cursor: default;
	transition: opacity 0.3s ease;
	z-index: 1;
}

a.imap-label { cursor: pointer; }
a.imap-label:hover { text-decoration: underline; }

/* ---- Shared: fade out when outside a marker's zoom range ---- */
.imap-hidden {
	opacity: 0 !important;
	pointer-events: none !important;
}

/* ---- Coordinate / zoom helper box ---- */
.imap-coords {
	position: absolute;
	left: 10px;
	bottom: 10px;
	z-index: 6;
	max-width: 90%;
	padding: 6px 9px;
	border-radius: 5px;
	background: rgba( 17, 19, 26, 0.9 );
	color: #cfefff;
	font-family: monospace;
	font-size: 12px;
	pointer-events: none;
}

.imap-coords div { white-space: nowrap; }
.imap-coords div + div { margin-top: 3px; }

@media ( prefers-reduced-motion: reduce ) {
	.imap-pin,
	.imap-pin-label,
	.imap-label { transition: none; }
}