Last edited 4 days ago
by WikiSysop

MediaWiki:Common.css: Difference between revisions

WikiSysop (talk | contribs)
 
(No difference)

Latest revision as of 16:03, 19 November 2026

/* CSS placed here will be applied to all skins */
/* ==========================================================================
   Galaxy Helpdesk · 404 ("Out of orbit")
   Used by MediaWiki:Noarticletext and MediaWiki:Noarticletext-nopermission
   Colours follow the Galaxy helpdesk design (navy #3E5389, panel #F1F3F9).
   ========================================================================== */

.g404 {
	font-family: Lato, sans-serif;
	color: #3B4256;
	background: #F1F3F9;
	border-radius: 22px;
	overflow: hidden;
	margin: 8px 0 24px;
}
.g404 p { margin: 0; }

/* Main area with a faint star field */
.g404-body {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	padding: 48px 32px 52px;
	text-align: center;
	background-color: #F1F3F9;
	background-image:
		radial-gradient(2px 2px at 8% 14%, #C9D5F7 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 22% 62%, #C9D5F7 50%, transparent 51%),
		radial-gradient(3px 3px at 37% 22%, #C9D5F7 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 51% 88%, #C9D5F7 50%, transparent 51%),
		radial-gradient(2px 2px at 66% 9%, #C9D5F7 50%, transparent 51%),
		radial-gradient(3px 3px at 91% 72%, #C9D5F7 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 4% 91%, #C9D5F7 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 82% 34%, #C9D5F7 50%, transparent 51%);
	background-size: 520px 360px;
}

.g404-eyebrow {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .14em;
	color: #3E5389;
}

/* "4 (planet) 4" */
.g404-number {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 140px;
	font-weight: 900;
	line-height: 1;
	color: #3E5389;
}
.g404-planet {
	position: relative;
	display: inline-block;
	flex: none;
	width: 170px;
	height: 170px;
	border-radius: 50%;
	background: #DFE6FB;
}
.g404-core {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 92px;
	height: 92px;
	margin: -46px 0 0 -46px;
	border-radius: 50%;
	background:
		radial-gradient(circle at 32% 34%, rgba(62, 83, 137, .15) 0 9px, transparent 10px),
		radial-gradient(circle at 66% 64%, rgba(62, 83, 137, .15) 0 12px, transparent 13px),
		radial-gradient(circle at 63% 26%, rgba(62, 83, 137, .15) 0 4px, transparent 5px),
		#C9D5F7;
}
.g404-ring {
	position: absolute;
	left: 3px;
	top: 50%;
	width: 164px;
	height: 42px;
	margin-top: -21px;
	box-sizing: border-box;
	border: 5px solid #3E5389;
	border-radius: 50%;
	transform: rotate(-18deg);
}
.g404-ring-back { opacity: .35; }
.g404-ring-front { border-top-color: transparent; }
.g404-moon {
	position: absolute;
	right: 12px;
	top: 22px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #3E5389;
}

.g404-title {
	font-size: 34px;
	font-weight: 700;
	line-height: 1.2;
	color: #3E5389;
}
.g404-text {
	max-width: 580px;
	font-size: 17px;
	line-height: 1.6;
}
.g404-text b { color: #1F2433; }

/* Search (Extension:InputBox) */
.g404-search { width: 100%; max-width: 600px; margin-top: 8px; }
.g404-search .mw-inputbox-centered,
.g404-search form { margin: 0; }
.g404-search form {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}
.g404-search br { display: none; }
.g404 .g404-search input[name="search"] {
	flex: 1 1 280px;
	width: auto;
	max-width: none;
	min-height: 50px;
	box-sizing: border-box;
	padding: 0 22px;
	border: 1px solid #D6DBE8;
	border-radius: 999px;
	background: #FFFFFF;
	color: #1F2433;
	font: inherit;
	font-size: 17px;
}
.g404 .g404-search input[name="search"]::placeholder { color: #5A6378; }
.g404 .g404-search input[name="search"]:focus {
	border-color: #3E5389;
	box-shadow: 0 0 0 3px rgba(62, 83, 137, .18);
	outline: none;
}

/* Search suggestions dropdown.
   MediaWiki attaches it to <body>, not to the search box, so it is scoped
   with :has() to pages that show the 404 panel. */
body:has(.g404) .suggestions {
	margin-top: 8px;
	font-family: Lato, sans-serif;
}
body:has(.g404) .suggestions .suggestions-results,
body:has(.g404) .suggestions .suggestions-special {
	box-sizing: border-box;
	padding: 6px;
	border: 1px solid #D6DBE8;
	background: #FFFFFF;
}
body:has(.g404) .suggestions .suggestions-results {
	border-radius: 16px;
	box-shadow: 0 10px 28px rgba(31, 36, 51, .12);
}
body:has(.g404) .suggestions .suggestions-results:has(+ .suggestions-special:not([style*="none"])) {
	border-radius: 16px 16px 0 0;
	border-bottom: 0;
}
body:has(.g404) .suggestions .suggestions-special {
	border-radius: 0 0 16px 16px;
	border-top: 1px solid #E8ECF6;
	color: #5A6378;
}
body:has(.g404) .suggestions a.mw-searchSuggest-link,
body:has(.g404) .suggestions a.mw-searchSuggest-link:hover {
	color: inherit;
	text-decoration: none;
}
body:has(.g404) .suggestions .suggestions-result,
body:has(.g404) .suggestions .special-label,
body:has(.g404) .suggestions .special-query {
	padding: 10px 16px;
	border-radius: 10px;
	font-size: 16px;
	line-height: 1.4;
	color: #3B4256;
	white-space: normal;
	overflow-wrap: anywhere;
	cursor: pointer;
}
body:has(.g404) .suggestions .suggestions-result .highlight {
	font-weight: 700;
	color: #1F2433;
}
body:has(.g404) .suggestions .suggestions-result-current,
body:has(.g404) .suggestions .suggestions-special .special-hover {
	background: #E8ECF6;
	color: #1F2433;
}
.g404 .g404-search input[type="submit"] {
	min-height: 50px;
	padding: 0 30px;
	border: 0;
	border-radius: 999px;
	background: #3E5389;
	color: #FFFFFF;
	font: inherit;
	font-size: 17px;
	font-weight: 700;
	cursor: pointer;
}
.g404 .g404-search input[type="submit"]:hover { background: #2A3A66; }

/* Links and buttons */
.g404 a {
	color: #3E5FC7;
	font-weight: 700;
	text-decoration: none;
}
.g404 a:hover { color: #2C4699; text-decoration: underline; }
.g404 a.external { background-image: none; padding-right: 0; }
.g404 a.external::after { content: none; }
.g404 a:focus-visible,
.g404 input[type="submit"]:focus-visible {
	outline: 3px solid #3E5FC7;
	outline-offset: 2px;
}

.g404-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 12px 24px;
	margin-top: 6px;
	font-size: 16px;
}
.g404 .g404-btn a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	box-sizing: border-box;
	padding: 0 22px;
	border: 2px solid #3E5389;
	border-radius: 999px;
	color: #3E5389;
}
.g404 .g404-btn a:hover {
	background: #3E5389;
	color: #FFFFFF;
	text-decoration: none;
}

/* Legacy helpdesk strip */
.g404-legacy {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	padding: 16px 40px;
	border-top: 1px solid #DDE2EE;
	background: #E8ECF6;
	font-size: 16px;
}
.g404-legacy-icon {
	flex: none;
	width: 22px;
	height: 22px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233E5389' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 3-6.7L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E") no-repeat center / 22px;
}
.g404-legacy-text { flex: 1; min-width: 260px; }
.g404-legacy b { color: #1F2433; }

/* Small screens */
@media (max-width: 640px) {
	.g404-body { padding: 36px 20px 40px; }
	.g404-number { font-size: 84px; }
	.g404-planet { transform: scale(.6); margin: -34px; }
	.g404-title { font-size: 26px; }
	.g404-legacy { padding: 16px 20px; }
}