mediawiki-skins-Vector/resources/skins.vector.styles/CSSCustomProperties.less
Moh'd Khier Abualruz b3ab84f9e5 Vector - Rename the skin night mode classes to more readable classes
The classes:
- skin-night-mode-clientpref-0
- skin-night-mode-clientpref-1
- skin-night-mode-clientpref-2
is being replaced with
- skin-theme-clientpref-day
- skin-theme-clientpref-night
- skin-theme-clientpref-os

Other Changes:
- Change vector-night-mode preference to vector-theme
- Add skin-theme-os-label and other messages to skins.vector.clientPreferences
- Remove skin-night-mode-* messages from skins.vector.clientPreferences

Bug: T359983
Change-Id: I31eb086e623a97df9fbd004425559e05b0cae170
2024-03-20 23:54:47 +00:00

45 lines
1.3 KiB
Plaintext

/**
* Vector CSS Custom properties
* ----------------------------
* Please be aware that these properties are accessible via *any* client-side code.
* These variables should mirror Codex design token names and values:
* https://doc.wikimedia.org/codex/latest/design-tokens
* Only include properties that are required for client-side modification.
*
* @private - Currently, these variables are only intended for use by Vector 2022,
* however, they are designed to mimic the naming convention in Codex tokens
* in order to facilitate an eventual migration to a centralized source.
* @experimental
* @since October 2023 (MediaWiki 1.42)
*/
:root {
--font-size-medium: unit( @font-size-small, rem );
--line-height-medium: @line-height-small;
--background-color-base: @background-color-base;
}
.night-mode-palette() {
--background-color-base: #101418;
}
.vector-feature-custom-font-size-clientpref-1 {
--font-size-medium: unit( @font-size-medium, rem );
--line-height-medium: 1.6;
}
.vector-feature-custom-font-size-clientpref-2 {
--font-size-medium: unit( @font-size-x-large, rem );
--line-height-medium: 1.5;
}
html.skin-theme-clientpref-night {
.night-mode-palette();
}
@media ( prefers-color-scheme: dark ) {
html.skin-theme-clientpref-os {
.night-mode-palette();
}
}