MediaWiki:Common.less: Difference between revisions

From Brighter Shores Wiki
Jump to navigation Jump to search
Content added Content deleted
(update body-background-color)
(change some background vars)
Line 29: Line 29:
--sidebar: #cfc08d;
--sidebar: #cfc08d;


--background-text-color: #444;
--background-text-color: #e2dbc8;
--background-link-color: #52351e;
--background-link-color: #e2bd8a;


--search-box: #efeee6;
--search-box: #efeee6;

Revision as of 02:53, 22 March 2024

/* =============================================================================
 * This is the root Less file that is parsed to produce [[MediaWiki:Common.css]].
 * 
 * These styles will be applied to all skins (desktop and mobile).
 * -----------------------------------------------------------------------------
 * Less documentation:    <http://lesscss.org/features/>
 * Gadget:                <https://meta.weirdgloop.org/w/MediaWiki:Gadget-Less.js>
 * Core Less JS:          <https://meta.weirdgloop.org/w/MediaWiki:Gadget-Less-core.js>
 * Non-standard mixins:   <https://meta.weirdgloop.org/w/MediaWiki:Gadget-LessMixins.less>
 * Online Less tester:    <https://lesscss.org/less-preview/>
 * ============================================================================= */

// ===== CSS Variables =====
@common: 'MediaWiki:Common.less';
:root {
	--body-main: #e2dbc8;
	--body-light: #d8ccb4;
	--body-mid: #d0bd97;
	--body-dark: #b8a282;
	--body-border: #94866d;
	--body-background-color: #513e36;

	--button-background: #605443;
	--button-color: @white;
	--button-border: #3c352a;
	--button-dark: #18140c;
	--button-light: #3a301d;

	--sidebar: #cfc08d;

	--background-text-color: #e2dbc8;
	--background-link-color: #e2bd8a;

	--search-box: #efeee6;

	--link-color: #936039;
	--redlink-color: #ba0000;
	--text-color: @black;
	--byline-color: @tundora;
	--subtle-color: @boulder;

	--admin-blue: #332e75;
	--bearcat-green: #13592e;
	--awb-purple: #933b96;

	--rsw-blue: #438ab6;
	--osrsw-brown: #605443;

	// used for gallery & thumbs
	--thumb-bg: var(--body-light);
	--thumb-caption-bg: var(--body-mid);

	// for sourceeditor - CodeMirror and WikiEditor's that are only available on
	// desktop are also here to not fragment the vars across many files
	--sourceeditor-input-background: @white;
	--sourceeditor-background: var(--body-light);
	--sourceeditor-background-secondary: var(--body-light); // used on .editOptions
	--sourceeditor-border: var(--body-mid);
	--codemirror-gutter-background: var(--body-mid);
}

// ===== Imports =====
// include fonts first
@import '@{common}/mixins.less';
@import '@{common}/fonts.less';             // Font definitions and font stack definitions
@import '@{common}/variables.less';         // Less variables
@import '@{common}/elements.less';          // HTML elements
@import '@{common}/links.less';             // Link colours

// Interface
@import '@{common}/interface.less';         // MW common elements
@import '@{common}/wikitables.less';        // .wikitable class and etc
@import '@{common}/diff.less';              // Revision differences
@import '@{common}/notifications.less';     
@import '@{common}/pagepreviews.less';      // Page preview popups
@import '@{common}/smw.less';               // Semantic MediaWiki
@import '@{common}/tabber.less';            // <tabber>
@import '@{common}/ooui.less';              // OOUI Customisations
@import '@{common}/visualeditor.less';      // VisualEditor

// Templates
@import '@{common}/templates.less';         // Various templates
@import '@{common}/infobox.less';           // Infobox vars
@import '@{common}/references.less';        // <references>

// Page specific
@import '@{common}/prefs.less';             // Wiki preferences theming 
@import '@{common}/specials.less';          // Special pages

// ===== Miscellaneous =====
// hide certain links in sidebar tools
#t-print,
#t-permalink {
	display: none;
}

#filetoc {
	border-radius: @border-radius;
	background: @BODY_MID;
	border-color: transparent;
	margin: 0.5em auto;
	text-align: center;
	box-shadow: @box-shadow;
}

// Galleries
li.gallerybox div.thumb {
	border: none;
	background-color: var(--thumb-bg);
}

.smwfact {
	display: none;
}

// applies to mobile talk pages, and smw??
.list-header {
	background-color: var(--body-mid);
	color: inherit;
}

// Source editor w/o syntaxhighlight; also applies to mobile in case JS is
// turned off
.editOptions {
	color: var(--text-color);
	background-color: var(--sourceeditor-background-secondary);
	border-color: var(--sourceeditor-border);
}

// .json pages
.mw-json {
	th,
	td {
		border-color: var(--wikitable-border);
	}

	// instead of selecting `tr`, do this to avoid dealing with mw-json-* classes
	td {
		background: var(--wikitable-bg);
	}

	th {
		background: var(--wikitable-header-bg);
	}
}