MediaWiki:Common.css

From Project Dione
Revision as of 08:34, 16 July 2026 by Amraleth (talk | contribs)
(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)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* ==========================================================================
   Landing portal. Used by [[Main Page]] and [[Template:Portal card]].
   Scoped to .portal so nothing here leaks into article content.
   ========================================================================== */

.mw-parser-output .portal {
	--portal-ink: #12161c;
	--portal-ink-soft: #5a6472;
	--portal-line: #d8dee7;
	--portal-surface: #ffffff;
	--portal-surface-alt: #f2f4f8;
	--portal-accent: #1f4b6e;

	max-width: 62rem;
	margin: 0 auto;
	color: var(--portal-ink);
	font-size: 0.95rem;
	line-height: 1.55;
}

/* Main Page only: the skin heading duplicates the hero. */
body.page-Main_Page.action-view h1.firstHeading,
body.page-Main_Page.action-view #siteSub,
body.page-Main_Page.action-view #contentSub {
	display: none;
}

/* --- Hero ---------------------------------------------------------------- */

.mw-parser-output .portal-hero {
	padding: 2.25rem 0 2rem;
	border-bottom: 1px solid var(--portal-line);
	margin-bottom: 2rem;
}

.mw-parser-output .portal-eyebrow {
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--portal-ink-soft);
	margin-bottom: 0.6rem;
}

.mw-parser-output .portal-title {
	font-size: clamp(1.9rem, 4.5vw, 2.9rem);
	line-height: 1.1;
	font-weight: 650;
	margin: 0 0 0.6rem;
	border: 0;
	padding: 0;
}

.mw-parser-output .portal-lede {
	max-width: 42rem;
	font-size: 1.05rem;
	color: var(--portal-ink-soft);
	margin: 0 0 1.4rem;
}

.mw-parser-output .portal-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.mw-parser-output .portal-actions a {
	display: inline-block;
	padding: 0.45rem 0.9rem;
	border: 1px solid var(--portal-line);
	border-radius: 2px;
	background: var(--portal-surface-alt);
	color: var(--portal-accent);
	font-weight: 600;
	text-decoration: none;
}

.mw-parser-output .portal-actions a:hover,
.mw-parser-output .portal-actions a:focus {
	border-color: var(--portal-accent);
	text-decoration: none;
}

/* --- Section heads ------------------------------------------------------- */

.mw-parser-output .portal-section {
	margin-bottom: 2.25rem;
}

.mw-parser-output .portal-section > h2 {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--portal-ink-soft);
	border: 0;
	margin: 0 0 1rem;
	padding: 0;
}

/* --- Card grid ----------------------------------------------------------- */

.mw-parser-output .portal-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	gap: 1px;
	background: var(--portal-line);
	border: 1px solid var(--portal-line);
}

.mw-parser-output .portal-card {
	background: var(--portal-surface);
	padding: 1.15rem 1.2rem 1.25rem;
}

.mw-parser-output .portal-card:hover {
	background: var(--portal-surface-alt);
}

.mw-parser-output .portal-card-title {
	font-size: 1.05rem;
	font-weight: 650;
	margin: 0 0 0.35rem;
}

.mw-parser-output .portal-card-title a {
	color: var(--portal-ink);
	text-decoration: none;
}

.mw-parser-output .portal-card-title a:hover {
	color: var(--portal-accent);
}

.mw-parser-output .portal-card-desc {
	color: var(--portal-ink-soft);
	font-size: 0.88rem;
	margin: 0 0 0.7rem;
}

.mw-parser-output .portal-card-links {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.86rem;
}

.mw-parser-output .portal-card-links li {
	margin: 0 0 0.2rem;
	padding-left: 0.85rem;
	text-indent: -0.85rem;
}

.mw-parser-output .portal-card-links li::before {
	content: "\203A";
	color: var(--portal-ink-soft);
	margin-right: 0.4rem;
}

/* --- Activity strip ------------------------------------------------------ */

.mw-parser-output .portal-strip {
	display: flex;
	flex-wrap: wrap;
	gap: 0 2rem;
	padding: 1rem 1.2rem;
	background: var(--portal-surface-alt);
	border: 1px solid var(--portal-line);
	font-size: 0.86rem;
}

.mw-parser-output .portal-strip > * {
	flex: 1 1 12rem;
}

.mw-parser-output .portal-strip dt {
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--portal-ink-soft);
	margin-bottom: 0.3rem;
}

.mw-parser-output .portal-strip dd {
	margin: 0;
}

/* --- Foot ---------------------------------------------------------------- */

.mw-parser-output .portal-foot {
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid var(--portal-line);
	font-size: 0.82rem;
	color: var(--portal-ink-soft);
}

/* --- Small screens ------------------------------------------------------- */

@media screen and (max-width: 640px) {
	.mw-parser-output .portal-hero {
		padding-top: 1.25rem;
	}

	.mw-parser-output .portal-grid {
		grid-template-columns: 1fr;
	}
}

/* --- Dark mode (Vector 2022 / MediaWiki 1.43+) --------------------------- */

@media screen {
	html.skin-theme-clientpref-night .mw-parser-output .portal {
		--portal-ink: #eaecf0;
		--portal-ink-soft: #a2a9b1;
		--portal-line: #3a4048;
		--portal-surface: #1b1f24;
		--portal-surface-alt: #23282e;
		--portal-accent: #88b8dd;
	}
}

@media screen and (prefers-color-scheme: dark) {
	html.skin-theme-clientpref-os .mw-parser-output .portal {
		--portal-ink: #eaecf0;
		--portal-ink-soft: #a2a9b1;
		--portal-line: #3a4048;
		--portal-surface: #1b1f24;
		--portal-surface-alt: #23282e;
		--portal-accent: #88b8dd;
	}
}