MediaWiki:Common.css: Difference between revisions

From MB Wiki
Jump to navigation Jump to search
mNo edit summary
Tag: Reverted
mNo edit summary
Tags: Manual revert Reverted
Line 125: Line 125:
   ========================================================================== */
   ========================================================================== */
body {
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif !important;
font-family: Helvetica, Arial, sans-serif !important;
line-height: var(--line-height);
line-height: var(--line-height);
background-color: var(--theme-page-background-color) !important;
background-color: var(--theme-page-background-color) !important;

Revision as of 09:38, 25 March 2026

/**
 * MediaWiki common.css
 * Cleaned and Refactored Version
 * * TABLE OF CONTENTS
 * 1.  EXTERNAL IMPORTS
 * 2.  GLOBAL VARIABLES (:root)
 * 3.  THEME DEFINITIONS (Light & Dark)
 * 4.  BASE TYPOGRAPHY & ELEMENTS
 * 5.  LAYOUT & STRUCTURE (Sidebar, Footer, Body)
 * 6.  MAIN PAGE LAYOUT
 * 7.  TABLE SYSTEM (Wikitable, Schedule, Fish, Artisan)
 * 8.  INFOBOX SYSTEM (Portable, Weapon, Monster, Character)
 * 9.  UI COMPONENTS (Navbox, Tabs, Notifications, Gallery)
 * 10. TEMPLATE CUSTOMIZATIONS (Quotes, Chat, Race System)
 * 11. UTILITY & ACCESSIBILITY
 */

/* ==========================================================================
   1. EXTERNAL IMPORTS
   ========================================================================== */
@import url("https://mbwiki.stairwaygames.work/wiki/MediaWiki:Module:Documentation.css");
@import url("https://mbwiki.stairwaygames.work/wiki/MediaWiki:Documentation.css");
@import url("https://mbwiki.stairwaygames.work/wiki/MediaWiki:Tables.css");
@import url("https://mbwiki.stairwaygames.work/wiki/MediaWiki:MessageBox.css");
@import url("https://mbwiki.stairwaygames.work/wiki/MediaWiki:CustomTabs.css");
@import url("https://mbwiki.stairwaygames.work/wiki/MediaWiki:Navbox.css");
@import url("https://mbwiki.stairwaygames.work/wiki/MediaWiki:Icons.css");
@import url("https://mbwiki.stairwaygames.work/wiki/MediaWiki:Dialogue.css");
@import url("https://mbwiki.stairwaygames.work/wiki/MediaWiki:Cards.css");
@import url("https://mbwiki.stairwaygames.work/wiki/MediaWiki:Tabbers.css");
@import url("https://mbwiki.stairwaygames.work/wiki/MediaWiki:Mobile.css");
@import url("https://mbwiki.stairwaygames.work/wiki/MediaWiki:Recipe.css");
@import url("https://mbwiki.stairwaygames.work/wiki/MediaWiki:Modal.css");
@import url("https://mbwiki.stairwaygames.work/wiki/MediaWiki:AceEditor.css");
@import url("https://mbwiki.stairwaygames.work/wiki/MediaWiki:CodeMirror.css");

/* ==========================================================================
   2. GLOBAL VARIABLES
   ========================================================================== */
:root {
	/* Typography */
	--font-size: 16px;
	--font-size-small: 14px;
	--font-size-large: 18px;
	--font-size-h1: 32px;
	--line-height: 1.6;
	--font-weight-normal: 400;
	--font-weight-medium: 500;
	--font-weight-semibold: 600;
	--font-weight-bold: 700;

	/* Spacing */
	--spacing-xs: 4px;
	--spacing-sm: 8px;
	--spacing-md: 16px;
	--spacing-lg: 24px;
	--spacing-xl: 32px;

	/* Shadows */
	--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
	--shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
	--shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

	/* Borders */
	--border-radius-sm: 4px;
	--border-radius-md: 8px;
	--border-radius-lg: 2px;
	--border-radius-full: 9999px;

	/* Transitions */
	--transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
	--transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);

	/* Z-Index Layers */
	--z-index-dropdown: 1000;
	--z-index-modal: 1050;

	/* Color Scales (Teal) */
	--teal-050: #e6fffa;
	--teal-100: #b2f5ea;
	--teal-200: #81e6d9;
	--teal-300: #4fd1c7;
	--teal-400: #38b2ac;
	--teal-500: #319795;
	--teal-600: #2c7a7b;
	--teal-700: #285e61;
	--teal-800: #234e52;
	--teal-900: #1d4044;
}

/* ==========================================================================
   3. THEME DEFINITIONS
   ========================================================================== */

/* Light Theme (Default) */
:root body:not(.skin-vector-dark) {
	--theme-page-text-color: #1a2a2a;
	--theme-page-background-color: #f5fdfb;
	--theme-page-background-color--secondary: #e8f5f3;
	--theme-link-color: #007d7a;
	--theme-link-color--hover: #005652;
	--theme-accent-color: #38b2ac;
	--theme-border-color: #a1e9dc;
	--card-bg-main: #ffffff;
	--table-header-bg: #e6fffa;
	--focus-ring-color: rgba(79, 209, 199, 0.6);
}

/* Dark Theme */
:root .skin-vector-dark {
	--theme-page-text-color: #e6f7f5;
	--theme-page-background-color: rgba(22, 28, 36, 0.98);
	--theme-page-background-color--secondary: #2a363d;
	--theme-link-color: #5fd9cf;
	--theme-link-color--hover: #81e6d9;
	--theme-accent-color: #5fd9cf;
	--theme-border-color: #4d6872;
	--card-bg-main: #2a363d;
	--table-header-bg: #2d4a4d;
	--focus-ring-color: rgba(79, 209, 199, 0.8);
}

/* ==========================================================================
   4. BASE TYPOGRAPHY & ELEMENTS
   ========================================================================== */
body {
	font-family: Helvetica, Arial, sans-serif !important;
	line-height: var(--line-height);
	background-color: var(--theme-page-background-color) !important;
}

h1, h2, h3, h4, .mw-headline {
	color: var(--theme-page-text-color);
	font-weight: 500;
}

a {
	color: var(--theme-link-color);
	text-decoration: none;
	transition: color var(--transition-fast) ease;
}

a:hover {
	text-decoration: underline;
}

/* Red Links (Teal variation) */
.mw-body a.new {
	color: #00a3a3 !important;
	border-bottom: 1px dashed rgba(0, 163, 163, 0.4) !important;
	background-color: rgba(0, 163, 163, 0.08) !important;
	padding: 1px 3px;
	border-radius: var(--border-radius-sm);
}

/* Code & Pre */
code, pre {
	background-color: var(--theme-page-background-color--secondary);
	color: var(--theme-page-text-color);
	border: 1px solid var(--theme-border-color);
	padding: 2px 4px;
	font-family: monospace;
	font-size: 13px;
}

/* ==========================================================================
   5. LAYOUT & STRUCTURE
   ========================================================================== */
.mw-body {
	margin-left: 11em;
	padding: 1.25em 1.5em;
	background-color: var(--theme-page-background-color) !important;
	border-left: 3px solid var(--teal-400);
}

#mw-panel {
	padding-left: 0.5em;
	width: 10em;
}

.mw-footer {
	margin-left: 11em;
	background: var(--card-bg-main);
	border-radius: var(--border-radius-md);
	padding: 1.25em;
}

/* Sidebar Section Headers */
#mw-panel .sidebar-section-title {
	background: linear-gradient(90deg, var(--teal-700), var(--teal-900));
	color: white;
	padding: 5px 10px;
	border-radius: 4px;
	font-size: 0.9em;
}

/* ==========================================================================
   6. MAIN PAGE LAYOUT
   ========================================================================== */
#mp-container {
	display: grid;
	gap: 20px;
	margin: 20px 0;
}

.game-intro-card {
	background: var(--card-bg-main);
	border: 1px solid var(--theme-border-color);
	border-radius: var(--border-radius-md);
	box-shadow: var(--shadow-md);
	overflow: hidden;
	transition: transform var(--transition-base);
}

.game-intro-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-lg);
}

.game-header {
	background: linear-gradient(90deg, var(--teal-700), var(--teal-900));
	padding: var(--spacing-md);
	color: white;
}

/* Social Links Bar */
.social {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 15px;
	background: var(--theme-page-background-color--secondary);
	padding: 15px;
	border-radius: 12px;
	border: 1px solid var(--theme-border-color);
}

/* ==========================================================================
   7. TABLE SYSTEM
   ========================================================================== */
.wikitable, .scheduletable, .fishtable {
	width: 100%;
	margin: 1.5em 0;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--theme-border-color);
	background-color: var(--card-bg-main);
	border-radius: var(--border-radius-md);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
}

.wikitable th, .scheduletable th {
	background: linear-gradient(135deg, var(--teal-600), var(--teal-700)) !important;
	color: white !important;
	padding: 12px !important;
	text-align: center;
}

.wikitable td, .scheduletable td {
	padding: 10px !important;
	border-bottom: 1px solid var(--theme-border-color);
}

.wikitable tr:nth-child(even) {
	background-color: rgba(56, 178, 172, 0.03);
}

/* Schedule Specifics */
.scheduletable td:first-child {
	background-color: rgba(56, 178, 172, 0.08);
	font-weight: 600;
	width: 150px;
	border-right: 2px solid var(--teal-300);
}

/* ==========================================================================
   8. INFOBOX SYSTEM
   ========================================================================== */
.portable-infobox {
	float: right;
	width: 300px;
	margin: 0 0 15px 15px;
	border: 1px solid var(--theme-border-color);
	border-radius: 8px;
	background-color: var(--card-bg-main);
	font-size: 14px;
}

.pi-title {
	background: var(--teal-600);
	color: white;
	padding: 10px;
	text-align: center;
	font-weight: bold;
	border-top-left-radius: 7px;
	border-top-right-radius: 7px;
}

.pi-item {
	display: flex;
	justify-content: space-between;
	padding: 8px;
	border-bottom: 1px dotted var(--theme-border-color);
}

.pi-data-label {
	font-weight: 500;
	color: var(--theme-page-text-color);
	opacity: 0.8;
}

/* Weapon & Monster Infobox Variations */
.weapon-infobox { border-color: #1a6a7a; }
.weapon-header { background: #1a6a7a; color: white; }

.monster-infobox { border-color: #7a1a1a; }
.monster-header { background: #7a1a1a; color: white; }

/* ==========================================================================
   9. UI COMPONENTS
   ========================================================================== */

/* Navbox Styling */
.navbox {
	border: 1px solid var(--theme-border-color);
	background: var(--card-bg-main);
	border-radius: 8px;
	padding: 5px;
}

.navbox-title {
	background: var(--teal-100) !important;
	padding: 10px;
	font-weight: bold;
}

/* Notifications */
.mw-notification {
	background: var(--card-bg-main) !important;
	border: 1px solid var(--theme-border-color) !important;
	color: var(--theme-page-text-color) !important;
}

/* ==========================================================================
   10. TEMPLATE CUSTOMIZATIONS
   ========================================================================== */

/* Quotes Box */
.quotes-box {
	border-left: 8px solid #eab759 !important;
	background: rgba(255, 255, 255, 0.05);
	padding: 15px;
	margin: 1em auto;
	font-style: italic;
	max-width: 500px;
}

/* Race System Tooltips */
.race-tooltip {
	background-color: #2c3e50;
	color: #ecf0f1;
	padding: 12px;
	border-radius: 8px;
	box-shadow: var(--shadow-lg);
	font-size: 0.9em;
}

/* ==========================================================================
   11. UTILITY & ACCESSIBILITY
   ========================================================================== */
.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.text-truncate {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
	* {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

/* Mobile Fixes */
@media screen and (max-width: 768px) {
	.mw-body { margin-left: 0; padding: 10px; }
	#mw-panel { display: none; }
	.portable-infobox { float: none; width: 100%; margin-left: 0; }
	.wikitable { display: block; overflow-x: auto; }
}