2024-06-30 05:04:30 +00:00
|
|
|
/**
|
|
|
|
* TODO: Deprecate duplicating non-Codex CSS variables into Codex equivalent
|
|
|
|
*/
|
|
|
|
:root {
|
|
|
|
/**
|
|
|
|
* Citizen Design Tokens
|
|
|
|
* TODO: Refactor cssvariables.less into this and features.less
|
|
|
|
*/
|
2024-07-01 04:16:05 +00:00
|
|
|
--color-primary__h: @color-primary__h;
|
|
|
|
--color-primary__s: @color-primary__s;
|
|
|
|
--color-primary__l: @color-primary__l;
|
|
|
|
--color-inverted-primary: #fff;
|
|
|
|
/* Surface color */
|
|
|
|
--color-surface-0__s: 30%;
|
|
|
|
--color-surface-0__l: 96%;
|
|
|
|
--color-surface-1__s: 40%;
|
|
|
|
--color-surface-1__l: 94%;
|
|
|
|
--color-surface-2__s: 30%;
|
|
|
|
--color-surface-2__l: 92%;
|
|
|
|
--color-surface-3__s: 20%;
|
|
|
|
--color-surface-3__l: 90%;
|
|
|
|
--color-surface-4__s: 10%;
|
|
|
|
--color-surface-4__l: 88%;
|
|
|
|
--color-surface-0: ~'hsl( var( --color-primary__h ), var( --color-surface-0__s ), var( --color-surface-0__l ) )';
|
|
|
|
--color-surface-1: ~'hsl( var( --color-primary__h ), var( --color-surface-1__s ), var( --color-surface-1__l ) )';
|
|
|
|
--color-surface-2: ~'hsl( var( --color-primary__h ), var( --color-surface-2__s ), var( --color-surface-2__l ) )';
|
|
|
|
--color-surface-2--hover: ~'hsl( var( --color-primary__h ), var( --color-surface-2__s ), calc( var( --color-surface-2__l ) + var( --delta-lightness-hover-state ) ) )';
|
|
|
|
--color-surface-2--active: ~'hsl( var( --color-primary__h ), var( --color-surface-2__s ), calc( var( --color-surface-2__l ) - var( --delta-lightness-hover-state ) ) )';
|
|
|
|
--color-surface-3: ~'hsl( var( --color-primary__h ), var( --color-surface-3__s ), var( --color-surface-3__l ) )';
|
|
|
|
--color-surface-4: ~'hsl( var( --color-primary__h ), var( --color-surface-4__s ), var( --color-surface-4__l ) )';
|
2024-07-01 00:41:31 +00:00
|
|
|
--background-color-icon: ~'rgba( 0, 0, 0, var( --opacity-icon-base ) )';
|
|
|
|
--background-color-icon--hover: ~'rgba( 0, 0, 0, var( --opacity-icon-base--hover ) )';
|
|
|
|
--background-color-icon--active: ~'rgba( 0, 0, 0, var( --opacity-icon-base--active ) )';
|
2024-07-01 03:50:21 +00:00
|
|
|
// Hover and active states are calculated by a modifier of the lightness value in HSL (e.g. hover: +2%, active: -2%)
|
|
|
|
--delta-lightness-hover-state: 4%;
|
|
|
|
// Used to calculate box shadow
|
2024-07-01 00:41:31 +00:00
|
|
|
--shadow-strength: 0.02;
|
|
|
|
--surface-shadow: var( --color-primary__h ), 10%, 20%;
|
2024-06-30 05:04:30 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Codex Design Tokens v1.8.0
|
|
|
|
* Design System for Wikimedia
|
|
|
|
* See https://doc.wikimedia.org/codex/latest/design-tokens/overview.html
|
|
|
|
*
|
|
|
|
* @see https://github.com/wikimedia/mediawiki/blob/master/resources/lib/codex-design-tokens/theme-wikimedia-ui-root.css
|
|
|
|
*/
|
|
|
|
--color-base: ~'hsl( var( --color-primary__h ), 30%, 20% )';
|
|
|
|
--color-base--hover: var( --color-subtle );
|
|
|
|
--color-emphasized: ~'hsl( var( --color-primary__h ), 85%, 5% )';
|
|
|
|
--color-subtle: ~'hsl( var( --color-primary__h ), 30%, 35% )';
|
|
|
|
--color-placeholder: var( --color-subtle );
|
|
|
|
--color-disabled: var( --color-subtle );
|
|
|
|
--color-inverted: #fff;
|
|
|
|
--color-inverted-fixed: #fff;
|
|
|
|
--color-progressive: ~'hsl( var( --color-primary__h ), var( --color-primary__s ), var( --color-primary__l ) )';
|
2024-07-01 03:50:21 +00:00
|
|
|
--color-progressive--hover: ~'hsl( var( --color-primary__h ), var( --color-primary__s ), calc( var( --color-primary__l ) + var( --delta-lightness-hover-state ) ) )';
|
|
|
|
--color-progressive--active: ~'hsl( var( --color-primary__h ), var( --color-primary__s ), calc( var( --color-primary__l ) - var( --delta-lightness-hover-state ) ) )';
|
2024-06-30 05:04:30 +00:00
|
|
|
--color-progressive--focus: var( --color-progressive );
|
2024-07-01 03:50:21 +00:00
|
|
|
--color-destructive: #d60021;
|
|
|
|
--color-destructive--hover: #ef4444;
|
|
|
|
--color-destructive--active: #9c0015;
|
2024-06-30 05:04:30 +00:00
|
|
|
--color-destructive--focus: var( --color-progressive );
|
|
|
|
--color-visited: var( --color-link );
|
|
|
|
--color-destructive--visited: var( --color-destructive );
|
|
|
|
--color-error: var( --color-destructive );
|
2024-07-01 03:50:21 +00:00
|
|
|
--color-warning: #c77f00;
|
|
|
|
--color-success: #009768;
|
2024-06-30 05:04:30 +00:00
|
|
|
--color-notice: var( --color-base );
|
2024-07-01 03:50:21 +00:00
|
|
|
--color-content-added: var( --color-success );
|
|
|
|
--color-content-removed: var( --color-destructive );
|
2024-06-30 05:04:30 +00:00
|
|
|
--filter-invert-icon: 0;
|
|
|
|
--filter-invert-primary-button-icon: 1;
|
2024-07-01 00:41:31 +00:00
|
|
|
--box-shadow-color-base: ~'hsla( var( --surface-shadow ), var( --shadow-strength ) )';
|
2024-06-30 05:04:30 +00:00
|
|
|
--box-shadow-color-progressive--active: var( --color-progressive--active );
|
|
|
|
--box-shadow-color-progressive--focus: var( --color-progressive );
|
|
|
|
--box-shadow-color-progressive-selected: var( --color-progressive );
|
|
|
|
--box-shadow-color-progressive-selected--hover: var( --color-progressive--hover );
|
|
|
|
--box-shadow-color-progressive-selected--active: var( --color-progressive--active );
|
|
|
|
--box-shadow-color-destructive--focus: var( --color-progressive );
|
|
|
|
--box-shadow-color-inverted: #fff;
|
|
|
|
--box-shadow-color-transparent: transparent;
|
2024-07-01 04:16:05 +00:00
|
|
|
--background-color-interactive: var( --color-surface-2 );
|
|
|
|
--background-color-interactive-subtle: var( --color-surface-1 );
|
|
|
|
--background-color-disabled: var( --color-surface-3 );
|
|
|
|
--background-color-disabled-subtle: var( --color-surface-1 );
|
2024-06-30 05:04:30 +00:00
|
|
|
--background-color-progressive: var( --color-progressive );
|
|
|
|
--background-color-progressive--hover: var( --color-progressive--hover );
|
|
|
|
--background-color-progressive--active: var( --color-progressive--active );
|
|
|
|
--background-color-progressive--focus: var( --color-progressive );
|
2024-07-01 00:41:31 +00:00
|
|
|
--background-color-progressive-subtle: ~'hsl( var( --color-primary__h ), var( --color-primary__s ), 95% )';
|
2024-07-01 03:50:21 +00:00
|
|
|
--background-color-destructive: var( --color-destructive );
|
|
|
|
--background-color-destructive--hover: var( --color-destructive--hover );
|
|
|
|
--background-color-destructive--active: var( --color-destructive--active );
|
2024-06-30 05:04:30 +00:00
|
|
|
--background-color-destructive--focus: var( --color-progressive );
|
2024-07-01 03:50:21 +00:00
|
|
|
--background-color-destructive-subtle: #fee2e2;
|
|
|
|
--background-color-error: var( --color-destructive );
|
|
|
|
--background-color-error--hover: var( --color-destructive--hover );
|
|
|
|
--background-color-error--active: var( --color-destructive--active );
|
|
|
|
--background-color-error-subtle: var( --background-color-destructive-subtle );
|
|
|
|
--background-color-warning-subtle: #fef3c7;
|
|
|
|
--background-color-success-subtle: #d1fae5;
|
2024-07-01 04:16:05 +00:00
|
|
|
--background-color-notice-subtle: var( --color-surface-2 );
|
2024-07-01 03:50:21 +00:00
|
|
|
--background-color-content-added: var( --background-color-success-subtle );
|
|
|
|
--background-color-content-removed: var( --background-color-destructive-subtle );
|
2024-07-01 00:41:31 +00:00
|
|
|
--background-color-backdrop-light: ~'hsla( var( --color-primary__h ), var( --color-surface-0__s ), var( --color-surface-0__l ), 0.65 )';
|
|
|
|
--background-color-backdrop-dark: rgba( 0, 0, 0, 0.65 );
|
2024-07-01 04:16:05 +00:00
|
|
|
--background-color-base: var( --color-surface-0 );
|
2024-07-01 00:41:31 +00:00
|
|
|
/*
|
2024-06-30 05:04:30 +00:00
|
|
|
--background-color-base-fixed: #fff;
|
2024-07-01 00:41:31 +00:00
|
|
|
*/
|
2024-07-01 04:16:05 +00:00
|
|
|
--background-color-neutral: var( --color-surface-2 );
|
|
|
|
--background-color-neutral-subtle: var( --color-surface-1 );
|
2024-06-30 05:04:30 +00:00
|
|
|
--background-color-transparent: transparent;
|
2024-07-01 00:41:31 +00:00
|
|
|
/*
|
2024-06-30 05:04:30 +00:00
|
|
|
--background-color-inverted: #101418;
|
|
|
|
*/
|
2024-07-01 00:41:31 +00:00
|
|
|
--background-color-button-quiet--hover: rgba( 0, 0, 0, 0.07 );
|
|
|
|
--background-color-button-quiet--active: rgba( 0, 0, 0, 0.09 );
|
2024-06-30 05:04:30 +00:00
|
|
|
--background-color-input-binary--checked: var( --color-progressive );
|
|
|
|
/*
|
|
|
|
--background-color-tab-list-item-framed--hover: rgba(255, 255, 255, 0.3);
|
|
|
|
--background-color-tab-list-item-framed--active: rgba(255, 255, 255, 0.65);
|
|
|
|
*/
|
|
|
|
--opacity-icon-base: 0.6;
|
|
|
|
--opacity-icon-base--hover: 0.8;
|
|
|
|
--opacity-icon-base--selected: 1;
|
|
|
|
--opacity-icon-base--disabled: 0.3;
|
|
|
|
--opacity-icon-placeholder: 0.4;
|
|
|
|
--opacity-icon-subtle: 0.5;
|
|
|
|
--border-color-base: rgba( 0, 0, 0, 0.08 );
|
|
|
|
--border-color-interactive: rgba( 0, 0, 0, 0.11 );
|
|
|
|
--border-color-disabled: var( --border-color-subtle );
|
|
|
|
--border-color-subtle: rgba( 0, 0, 0, 0.05 );
|
2024-07-01 00:41:31 +00:00
|
|
|
--border-color-muted: var( --border-color-subtle );
|
2024-06-30 05:04:30 +00:00
|
|
|
--border-color-inverted: #fff;
|
|
|
|
--border-color-progressive: var( --color-progressive );
|
|
|
|
--border-color-progressive--hover: var( --color-progressive--hover );
|
|
|
|
--border-color-progressive--active: var( --color-progressive--active );
|
|
|
|
--border-color-progressive--focus: var( --color-progressive );
|
2024-07-01 00:41:31 +00:00
|
|
|
--border-color-destructive: var( --color-destructive );
|
|
|
|
--border-color-destructive--hover: var( --color-destructive--hover );
|
|
|
|
--border-color-destructive--active: var( --color-destructive--active );
|
2024-06-30 05:04:30 +00:00
|
|
|
--border-color-destructive--focus: var( --color-progressive );
|
2024-07-01 00:41:31 +00:00
|
|
|
--border-color-error: var( --border-color-base );
|
|
|
|
--border-color-error--hover: var( --border-color-base );
|
|
|
|
--border-color-warning: var( --border-color-base );
|
|
|
|
--border-color-success: var( --border-color-base );
|
|
|
|
--border-color-notice: var( --border-color-base );
|
|
|
|
--border-color-content-added: var( --border-color-base );
|
|
|
|
--border-color-content-removed: var( --border-color-base );
|
2024-06-30 05:04:30 +00:00
|
|
|
--border-color-transparent: transparent;
|
2024-07-01 00:41:31 +00:00
|
|
|
--border-color-divider: var( --border-color-base );
|
2024-06-30 05:04:30 +00:00
|
|
|
--outline-color-progressive--focus: var( --color-progressive );
|
2024-07-01 00:41:31 +00:00
|
|
|
--color-link-red: var( --color-destructive );
|
|
|
|
--color-link-red--hover: var( --color-destructive--hover );
|
|
|
|
--color-link-red--active: var( --color-destructive--active );
|
|
|
|
--color-link-red--focus: var( --color-destructive--focus );
|
|
|
|
--color-link-red--visited: var( --color-destructive--visited );
|
2024-06-30 05:04:30 +00:00
|
|
|
--border-color-input--hover: var( --border-color-interactive );
|
|
|
|
--border-color-input-binary: var( --border-color-interactive );
|
|
|
|
--border-color-input-binary--hover: var( --border-color-progressive--hover );
|
|
|
|
--border-color-input-binary--active: var( --border-color-progressive--active );
|
|
|
|
--border-color-input-binary--focus: var( --border-color-progressive--focus );
|
|
|
|
--border-color-input-binary--checked: var( --border-color-progressive );
|
|
|
|
|
|
|
|
/* DEPRECATED TOKENS */
|
2024-07-01 00:41:31 +00:00
|
|
|
--background-color-primary--hover: var( --background-color-progressive-subtle );
|
|
|
|
--background-color-primary--active: var( --background-color-progressive-subtle );
|
|
|
|
--background-color-overlay: var( --background-color-backdrop-light );
|
|
|
|
--background-color-overlay--lighter: var( --background-color-backdrop-light );
|
|
|
|
--background-color-quiet--hover: var( --background-color-button-quiet--hover );
|
|
|
|
--background-color-quiet--active: var( --background-color-button-quiet--active );
|
2024-06-30 05:04:30 +00:00
|
|
|
--color-base--emphasized: var( --color-emphasized );
|
|
|
|
--color-base--subtle: var( --color-subtle );
|
|
|
|
--color-primary: var( --color-progressive );
|
|
|
|
--color-primary--hover: var( --color-progressive--hover );
|
|
|
|
--color-primary--active: var( --color-progressive--active );
|
2024-07-01 03:50:21 +00:00
|
|
|
--color-text-error: var( --color-destructive );
|
|
|
|
--color-text-warning: var( --color-base );
|
|
|
|
--color-text-success: var( --color-success );
|
2024-06-30 05:04:30 +00:00
|
|
|
--opacity-icon-base--active: var( --opacity-icon-base--selected );
|
|
|
|
}
|