User:Admin/vector.css: Difference between revisions

From RuneSaga Wiki
Jump to navigation Jump to search
No edit summary
(Replaced content with " #bodyContent { background-color: yellow; }")
Tags: Replaced Reverted
Line 1: Line 1:
/* ------------------------------------------------------------------------------
   #bodyContent { background-color: yellow; }
  This is the root LESS file that is parsed to produce [[MediaWiki:Vector-darkmode.css]].
 
  Previously compiled via subpages at [[Special:PrefixIndex/MediaWiki:Vector-darkmode.less/]],
  now adjusted via CSS Variables.
 
  To update [[MediaWiki:Vector-darkmode.css]] from here, users with the appropriate
  permissions can click the "Update CSS" button found to the left of the edit button.
  ------------------------------------------------------------------------------ */
 
/* --------------------
          COLORS
  -------------------- */
@dark-body:          @black-pearl;
@dark-page:          @big-stone;    // page bg color
@dark-links:        @portage;      // link color
@red-links:          lighten( @flamingo, 10% );
@dark-links-escape : escape("@{dark-links}"); // For use in SVGs
@dark-text:          lighten( @portage, 15% );
@dark-text-escape:   escape("@{dark-text}"); // For use in SVGs
 
@dark-wikitable-header:            @cloud-burst;
@dark-wikitable-background:        @pickled-bluewood;
@dark-wikitable-background-lighter: lighten(@dark-wikitable-background, 4%); // Used on hover effect
@dark-wikitable-background-darker:  darken(@dark-wikitable-background, 20%);
@dark-wikitable-border:            @big-stone;
 
@dark-button: #617ebc;
 
@dir: 'MediaWiki:Vector-darkmode.less';
@common: 'MediaWiki:Common.less';
 
// Variables: Colours, shadows, etc.
@import '@{common}/variables.less';
// Mixins
@import '@{common}/mixins.less';
 
// style browser default forms; :has() is relatively new - shouldnt pose a problem
// targetting html otherwise page scrollbar wouldnt be affected
html:has(body.wgl-theme-dark) {
color-scheme: dark;
}
 
/* The following imports are nested inside body.wgl-theme-dark for good reason.
* Please do not change this. It is needed for "hot loading" darkmode when the
* user tries to switch to it. */
body.wgl-theme-dark {
// fallback as the above wont work on firefox
color-scheme: dark;
 
// == CSS Variables ==
--body-background-image: url('filepath://Old_School_RuneScape_Wiki_background_darkmode.jpg');
--body-background-color: @dark-body;
--body-main: @dark-page;
--body-light: @pickled-bluewood;
--body-mid: @cloud-burst;
--body-dark: @cloud-burst;
--body-border: @waikawa-grey;
--link-color: @dark-links;
--background-link-color: var(--link-color);
--redlink-color: @red-links;
--text-color: @dark-text;
--background-text-color: @dark-text;
--byline-color: desaturate( darken(@dark-text, 22%), 47% );
--subtle-color: var(--byline-color);
--search-box: var(--body-light);
// /highlight.less
--admin-blue: #0087ff;
--bearcat-green: #00ff55;
--awb-purple: #f319ff;
--sidebar: @waikawa-grey;
--button-background: @dark-button;
--button-dark: @dark-button;
--button-border: @dark-button;
--button-light: @dark-button;
// /wikitables.less
--wikitable-header-bg: @dark-wikitable-header;
--wikitable-border: @dark-wikitable-border;
--wikitable-bg: @dark-wikitable-background;
--wikitable-bg-lighter: @dark-wikitable-background-lighter;
--wikitable-color: var(--text-color);
--wikitable-alternating-bg: saturate( darken( @dark-wikitable-background, 3% ), 3% );
--table-na-background: fade( @black, 20 );
--table-na-color: var(--subtle-color);
--table-yes-background: @san-felix;
--table-yes-color: @caper;
--table-no-background: @mocaccino;
--table-no-color: @apricot-peach;
--table-maybe-background: @cinnamon;
--table-maybe-color: @golden;
--droptable-text-color: @white;
--droptable-text-color: @white;
--droptable-always-background: @venice-blue;
--droptable-common-background: @la-palma;
--droptable-uncommon-background: @olive;
--droptable-rare-background: @korma;
--droptable-veryrare-background: @old-brick;
--droptable-random-background: @cannon-pink;
// /ooui.less
--ooui-text: @dark-text;
@ooui-interface: @cloud-burst;
--ooui-interface: @ooui-interface;
--ooui-interface-border: lighten( @ooui-interface, 8% );
--ooui-window-background: rgba(25,25,25,0.6);
@ooui-input: lighten( @pickled-bluewood, 4% );
--ooui-input: @ooui-input;
@ooui-input-border: lighten( @ooui-input, 8% );
--ooui-input-border: @ooui-input-border;
--ooui-input-border--hover: lighten( @ooui-input-border, 8% );
@ooui-normal: @pickled-bluewood;
--ooui-normal: @ooui-normal;
--ooui-normal--hover: lighten( @ooui-normal, 4% );
--ooui-normal-border: lighten( @ooui-normal, 8% );
@ooui-progressive: @dark-button;
--ooui-progressive: @ooui-progressive;
--ooui-progressive--hover: lighten(@ooui-progressive, 10%);
--ooui-accent: var(--link-color);
--ooui-disabled: desaturate( lighten( @ooui-normal, 32% ), 16%);
--ooui-disabled-border: desaturate( lighten( @ooui-normal, 32% ), 16%);
--ooui-disabled-text: var(--ooui-text);
--ooui-pending-background-image: repeating-linear-gradient(-45deg, var(--search-box), var(--search-box) 20px, var(--body-main) 20px, var(--body-main) 30px);
--tile-border-color: var(--body-border);
--tile-background-color: var(--body-light);
--tile-link-button-color: var(--body-mid);
--tile-link-button-highlight-color: #2a3956;
--tile-dark-color: @white;
--tile-dark-bg: #5d6773;
--tile-dark-link-color: #ccc;
--tile-dark-byline-color: rgba(255, 255, 255, 0.7);
--tile-dark-header-color: @white;
--documentation-background: var(--body-light);
--documentation-border: var(--sidebar);
--documentation-link-color: var(--link-color);
--documentation-headers-color: var(--text-color);
--documentation-header-background: var(--body-dark);
--documentation-subheader-background: darken( @dark-wikitable-header, 2% );
--base-text-color: var(--text-color);
--base-heading-color: var(--text-color);
--base-heading-border: var(--sidebar);
--mainpage-recent-updates-description-color: var(--text-color);
// switch mid/light
--thumb-bg: var(--body-mid);
--thumb-caption-bg: var(--body-light);
--diff-context-border-color: var(--body-mid);
--diff-context-background: var(--body-mid);
--diff-addedline-background: #438ab5;
--diff-addedline-border-color: #438ab5;
--diff-addedline-color: @white;
--diff-deletedline-background: #379541;
--diff-deletedline-border-color: #379541;
--diff-deletedline-color: @white;
--errorbox-bg: @mocaccino;
--errorbox-border: @old-brick;
--warningbox-bg: var(--errorbox-bg);
--warningbox-border: var(--errorbox-border);
--successbox-bg: @san-felix;
--successbox-border: @la-palma;
.mboxvar(obsolete, #464646, #333, #ddd, #bbb);
.mboxvar(info, var(--messagebox-obsolete-background), var(--messagebox-obsolete-border),  var(--messagebox-obsolete-color), var(--messagebox-obsolete-link-color));
.mboxvar(action, #45697d, #2d5266, var(--text-color), #b8d5e5);
.mboxvar(warn, #95271b, #6b130a, #f8ebe9, #e8b8b3);
.mboxvar(safe, #1b8408, #126802, #e9f6e7, #c1e0bb);
.mboxvar(disambig, var(--messagebox-obsolete-background), var(--messagebox-obsolete-border), var(--messagebox-obsolete-color), var(--messagebox-obsolete-link-color));
--mw-code-background-color: @cloud-burst;
// common /tabber.less
--tabber-tab-bg: var(--body-light);
--tabber-tab-border-color: var(--body-border);
--tabber-active-tab-bg: var(--body-light);
--tabber-active-tab-color: var(--text-color);
--tabber-active-tab-hover-bg: var(--body-light);
--tabber-active-tab-hover-border-color: var(--body-border);
--tabber-active-tab-hover-color: var(--text-color);
--tabber-active-tab-border-hider-color: var(--body-light);
--tabber-inactive-tab-bg: var(--body-mid);
--tabber-inactive-tab-border-color: var(--body-border);
--tabber-inactive-tab-color: var(--text-color);
--tabber-inactive-tab-hover-bg: var(--body-light);
--tabber-inactive-tab-hover-border-color: var(--body-border);
--scribuntoconsole-input: @curious-blue;
--scibuntoconsole-print: @supernova;
--scribuntoconsole-error: @flamingo;
--scribuntoconsole-message: @lima;
--scribuntoconsole-tabcomplete: @medium-purple;
--scribuntoconsole-clear: @flamingo;
// common /templates.less
--blockquote-color: var(--text-color);
--coins-color: @lima;
--coins-pos-color: @curious-blue;
--coins-neg-color: @flamingo;
--questdetails-header-background: var(--body-dark);
--questdetails-header-background-alt: var(--body-dark);
--fact-text-color: @curious-blue;
--production-selected-background: @la-palma;
--production-selected-color: @white;
--wikipedia-border: var(--body-border);
--wikipedia-background: var(--body-light);
--keypress-background: var(--body-light);
--keypress-border: var(--body-border);
--keypress-color: var(--text-color);
// common /poll.less
--ajaxpoll-background: var(--body-light);
--ajaxpoll-text-color: var(--base-text-color);
--ajaxpoll-answerbar-background: var(--body-mid);
--ajaxpoll-answerbar-border: var(--body-border);
// common /specials.less
--rc-negative-color: @flamingo;
--rc-positive-color: @lima;
--filter-black-to-link: invert(63%) sepia(67%) saturate(242%) hue-rotate(182deg) brightness(93%) contrast(94%);
// common /transcripts.less
--transcript-border-color: @waikawa-grey;
--transcript-border-hover-color: lighten( @waikawa-grey, 15% );
--transcript-strikethrough-color: @white;
// vector /navbox.less
--navbox-background: var(--body-light);
--navbox-border: var(--body-main);
--navbox-title-background: var(--body-dark);
--navbox-footer-background: var(--navbox-title-background);
--navbox-group-title-background: var(--navbox-title-background);
// vector /infobox.less
--infobox-bg: var(--body-light);
--infobox-border: var(--body-border);
--infobox-header: var(--body-dark);
--infobox-subheader: var(--body-mid);
--infobox-text-color: var(--text-color);
--infobox-room-poh-color: @river-bed;
// vector /sourceeditor.less
--sourceeditor-input-background: var(--body-mid);
--sourceeditor-background: var(--body-light);
--sourceeditor-background-secondary: var(--body-mid);
--sourceeditor-border: var(--body-main);
--codemirror-gutter-background: var(--body-light);
// vector /toc.less
--toc-bg: var(--body-light);
--toc-title-bg: var(--body-dark);
--toc-border-color: var(--body-border);
--toc-list-border-color: var(--body-border);
// vector /vectortabs.less
--vector-tab-background: @cloud-burst;
--vector-tab-background--hover: lighten( @cloud-burst, 4% );
--vector-tab-link-color: var(--background-link-color);
// gadget-highlighttable.css
--lighttable-bg-hover: @la-palma;
--lighttable-bg-active: @san-felix;
--lighttable-link-color: @caper;
--personal-links-bg: rgba(7, 16, 34, 0.75);
// trailblazer region highlight
--tbz-unlocked-background: repeating-linear-gradient(-45deg, #315d30 0 20px, #13421e 20px 30px);
--tbz-unlocked-border-color: #00e417;
--tbz-locked-background-color: #8a2525;
--tbz-locked-border-color: #b32828;
--tbz-partial-unlock-background: #5a5a5a;
--tbz-partial-unlock-border-color: #13421e;
// SVG clutter
--echo-icon-moon-bg-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg height='21' viewBox='0 0 21 21' width='21' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m8.85464918.37900488c-1.91149353 1.51069427-3.13816124 3.84973402-3.13816124 6.47527736 0 4.55564936 3.69308349 8.24873286 8.24873286 8.24873286 2.5815709 0 4.8861545-1.1859235 6.3986798-3.0426994-.8206378 4.7389755-4.9523867 8.343122-9.9259291 8.343122-5.56375572 0-10.07407088-4.5103151-10.07407088-10.0740709 0-5.02506013 3.67919933-9.19079725 8.49074856-9.95036192z' fill='@{dark-text-escape}' fill-rule='evenodd'/%3E%3C/svg%3E");
--echo-icon-person-bg-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='13.836' viewBox='0 0 12 13.836'%3E%3Cpath fill='@{dark-text-escape}' d='M1.938,6.656c-1.32,1.485-1.47,3.15-0.97,4.25c0.323,0.707,0.78,1.127,1.313,1.375 c0.496,0.229,1.074,0.273,1.658,0.282c0.023,0,0.04,0.03,0.062,0.03h4.187c0.61,0,1.225-0.125,1.75-0.405 c0.527-0.28,0.961-0.718,1.188-1.376c0.335-0.964,0.175-2.529-1.094-4.03C9.094,7.954,7.68,8.719,6.065,8.719 c-1.677,0-3.182-0.812-4.125-2.063H1.938z'/%3E%3Cpath fill='@{dark-text-escape}' d='M6.063,0c-1.89,0-3.595,1.674-3.594,3.563C2.467,5.45,4.173,7.155,6.06,7.155 c1.89,0,3.564-1.705,3.563-3.593C9.625,1.673,7.95,0,6.063,0L6.063,0z'/%3E%3C/svg%3E");
--echo-icon-bell-bg-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Ctitle%3E bell %3C/title%3E%3Cpath fill='@{dark-text-escape}' d='M16 7a5.38 5.38 0 0 0-4.46-4.85C11.6 1.46 11.53 0 10 0S8.4 1.46 8.46 2.15A5.38 5.38 0 0 0 4 7v6l-2 2v1h16v-1l-2-2zm-6 13a3 3 0 0 0 3-3H7a3 3 0 0 0 3 3z'/%3E%3C/svg%3E");
--echo-icon-tray-bg-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Ctitle%3E tray %3C/title%3E%3Cpath fill='@{dark-text-escape}' d='M17 1H3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2zm0 12h-4l-1 2H8l-1-2H3V3h14z'/%3E%3C/svg%3E");
--echo-icon-cog-bg-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='20' height='20' viewBox='0 0 20 20'%3E%3Ctitle%3E settings %3C/title%3E%3Cg transform='translate(10 10)'%3E%3Cpath fill='@{dark-text-escape}' id='a' d='M1.5-10h-3l-1 6.5h5m0 7h-5l1 6.5h3'/%3E%3Cuse xlink:href='%23a' transform='rotate(45)'/%3E%3Cuse xlink:href='%23a' transform='rotate(90)'/%3E%3Cuse xlink:href='%23a' transform='rotate(135)'/%3E%3C/g%3E%3Cpath fill='@{dark-text-escape}' d='M10 2.5a7.5 7.5 0 0 0 0 15 7.5 7.5 0 0 0 0-15v4a3.5 3.5 0 0 1 0 7 3.5 3.5 0 0 1 0-7'/%3E%3C/svg%3E%0A");
--echo-icon-fullscreen-bg-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Ctitle%3E fullscreen %3C/title%3E%3Cg fill='@{dark-text-escape}'%3E%3Cpath d='M1 1v6h2V3h4V1zm2 12H1v6h6v-2H3zm14 4h-4v2h6v-6h-2zm0-16h-4v2h4v4h2V1z'/%3E%3C/g%3E%3Cscript xmlns=''/%3E%3C/svg%3E");
--echo-icon-exitFullscreen-bg-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Ctitle%3E exit fullscreen %3C/title%3E%3Cg fill='@{dark-text-escape}'%3E%3Cpath d='M7 7V1H5v4H1v2zM5 19h2v-6H1v2h4zm10-4h4v-2h-6v6h2zm0-8h4V5h-4V1h-2v6z'/%3E%3C/g%3E%3Cscript xmlns=''/%3E%3C/svg%3E");
--searchbutton-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='13'%3E%3Cg fill='none' stroke='@{dark-links-escape}' stroke-width='2'%3E%3Cpath d='M11.29 11.71l-4-4'/%3E%3Ccircle cx='5' cy='5' r='4'/%3E%3C/g%3E%3C/svg%3E");
--arrow-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M11.05 3.996l-.965-1.053-4.035 3.86-3.947-3.86L1.05 3.996l5 5 5-5' fill='@{dark-text-escape}'/%3E%3C/svg%3E");
--watch-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath fill='transparent' stroke='@{dark-links-escape}' stroke-width='.8' d='m8.1 1.1 2.2 4.5 4.8.7-3.5 3.4.9 4.8L8 12.2l-4.3 2.3.8-4.8L1 6.3l4.8-.7z'/%3E%3C/svg%3E%0A");
--unwatch-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath fill='@{dark-links-escape}' stroke='@{dark-links-escape}' stroke-width='.8' d='m8.1 1.1 2.2 4.5 4.8.7-3.5 3.4.9 4.8L8 12.2l-4.3 2.3.8-4.8L1 6.3l4.8-.7z'/%3E%3C/svg%3E%0A");
--external-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='@{dark-links-escape}' d='M6 1h5v5L8.86 3.85 4.7 8 4 7.3l4.15-4.16L6 1Z M2 3h2v1H2v6h6V8h1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z'/%3E%3C/svg%3E");
--ul-list-style-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg xmlns='http://www.w3.org/2000/svg' width='5' height='13'%3E%3Ccircle cx='2.5' cy='9' r='2.5' fill='@{dark-text-escape}'/%3E%3C/svg%3E");
// prob need to be removed: because of the specificity added by nesting, it can override and add background etc when
// not expected. a good example is `.vector-search-box-input` where it adds border both to input and search icon
// maybe worth relying on `color-scheme` instead but without the `:has()` in its selector
//input,
select,
textarea {
background: var(--body-light);
border: 1px solid var(--body-border);
color: var(--text-color);
}
// == Syntax highlighter imports ==
// Editors
@codehighlight-background: var(--mw-code-background-color);
@import '@{dir}/codehighlight.less';    // Code highlight
@code-bg: @cloud-burst;
@gutter-bg: @pickled-bluewood;
@gutter-text: @dark-text;
@import '@{dir}/aceeditor.less';        // ace editor (for css, js, lua, etc.)
@codemirror-background: @cloud-burst;
@codemirror-text-color: @dark-text;
@codemirror-selection-color: @portage;
@codemirror-bracket-matcher-background: @dark-wikitable-background;
@import '@{dir}/darksyntax.less';      // CodeMirror aka source editor syntax
// ==== Misc ====
// mainly stuff that may need to be changed via vars instead
.oo-ui-iconElement-icon:not(.oo-ui-image-destructive):not(.oo-ui-image-warning):not(.oo-ui-image-progressive):not(.oo-ui-checkboxInputWidget-checkIcon):not(.oo-ui-icon-page-existing),
.oo-ui-indicatorElement-indicator,
.mwe-math-element img,
.mw-ui-icon:before,
.soft-redirect > div:nth-child(1) img {
filter: invert(1) hue-rotate(180deg); // hue-rotate to preserve color if possible; not very accurate tho
}
 
.client-js & .sortable:not(.jquery-tablesorter) > * > tr:first-child > th:not(.unsortable),
.jquery-tablesorter th.headerSort {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='21' height='9' viewBox='0 0 21 9'%3E%3Cg fill='@{dark-text-escape}'%3E%3Cpath d='M14.5 5l-4 4-4-4zM14.5 4l-4-4-4 4z'/%3E%3C/g%3E%3C/svg%3E");
}
 
.jquery-tablesorter {
th.headerSortUp {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='21' height='4' viewBox='0 0 21 4'%3E%3Cg fill='@{dark-text-escape}'%3E%3Cpath d='M6.5 4l4-4 4 4z'/%3E%3C/g%3E%3C/svg%3E");
}
 
th.headerSortDown {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='21' height='4' viewBox='0 0 21 4'%3E%3Cg fill='@{dark-text-escape}'%3E%3Cpath d='M14.5 0l-4 4-4-4z'/%3E%3C/g%3E%3C/svg%3E");
}
}
}

Revision as of 04:02, 17 February 2024

  #bodyContent { background-color: yellow; }