Organizes the code in CSSCustomProperties.less into
3 separate groups:
- Forced night-mode,
- auto night-mode
- night-mode helpers.
Also applies `color: var(--color-base)` to both .skin-invert
and .notheme to address situations where color is
defined by inheritance.
Change-Id: I9edc6fd81416f0f40eca975381f61023ac047e47
The current white text on a green background is not an accessible level
of color contrast. We were instead recommended to use
@background-color-progressive, so let's do that
In addition, remove the previous definition of
@background-color-last-modified-bar-active as it's no longer being used
Visual change for pages on mobile that have been updated recently
Bug: T358736
Change-Id: If5b97b785e95df75645be62847cef396f6be68b6
This patch promotes a consistent design decision across projects in
MediaWiki core, extensions, and skins. The darker red color meets the
W3C Web Content Accessibility Guidelines (WCAG) at Level AA that text
or images of text must have a contrast ratio of at least 4.5:1 (or 3:1
for large text).
Bug: T343239
Change-Id: I5c3f0731c76b689d0c985faa21036b8c2fddac20
Use CSS to target parsed content where a background color is defined
inline without an accompanying text color. Additionally, add an ADR
documenting this decision to the repo
Visual change in night mode only, as the text color will now be correct
Bug: T358797
Change-Id: If375c4c9691462d314e91a74da0fc8365137cd8c
Based on list on [[mw:Recommendations_for_mobile_friendly_articles_on_Wikimedia_wikis]]
and running color contrast checker on every project.
Bug: T358164
Change-Id: I1ecbc1bac060eae4b9d99f461284d15b5da3d576
Adds a rule that makes elements using the .notheme class
inherit black text unless specified otherwise.
This addresses situations where elements relying on
inheritance for color.
Bug: T358528
Change-Id: Ie59c31b5e25684ff5ecad507a273fbe71af4bca0
During the Codex experimental build integration, some non-standard
variable color names were not replaced with standardized ones.
This patch replaced:
--color-link--active -> --color-progressive--active
--color-link--visited -> --color-visited
Bug: T356928
Change-Id: I48925009300565adbd7af815138d150219c7e88a
This (partially)
reverts commit 9f541aafcc.
Reason for revert: Applying in light mode as well as night
mode where it was intending. The [bgcolor] rule is safe in both
modes so can stay.
Bug: T358164
Change-Id: I68c4d81209199d0257b7ba2590d19c258d9152e6
- in main page
- in sideboxes - these only contain over div elements so
use div instead of * selector
Bug: T357722
Change-Id: If0e9eeb9471f3990afd5254b51af8dbe9cb538e0
Target a number of common infobox formats and strip the custom colors of
text and backgrounds, as well as borders. This is explicitly a first
pass, so not overly broad but will hopefully encompass a large portion
of the infoboxes we're concerned with
Visual change in night mode only
Bug: T357453
Change-Id: If57f1b1ef6b86a9e45ca655e2317fc31330d207e
Use the Codex experimental design token build to
providing CSS custom property version of design tokens
for night mode.
The build also provides Less variables which are
references to the CSS custom properties. These are
pulled into the mediawiki.skin.variables.less file
and propagated across core and extensions.
Bug: T358059
Change-Id: I78558f6cc1de91d62fb9f8cbf571f73b51eae8ca
The color-scheme property allows certain elements
to change their appearance based on the system
light/dark mode settings.
Therefore, this property should only be applied if "auto"
night mode is enabled.
Bug: T358814
Change-Id: Ic2b836d9696706ab2c628e78cc2592716963e9a5
Note: You need to enable wgMinervaApplyKnownTemplateHack in LocalSettings.php
for these styles to work.
Editors can opt out of these rules by using the already popularized
"notheme" class.
Bug: T357722
Change-Id: I32f3968b74bded987bb60e85a902e551727db545
This patch promotes a consistent design decision across projects in
MediaWiki core, extensions, and skins. The darker red color meets the
W3C Web Content Accessibility Guidelines (WCAG) at Level AA that text
or images of text must have a contrast ratio of at least 4.5:1 (or 3:1
for large text).
Bug: T343239
Change-Id: I771fec3f567ea7ce5a25f8c63d88c956a27121ef
When content is inverted via CSS filter, this sometimes inverts
CSS variables which have already been themselves inverted. Allowing
markup to explicitly mark itself as invertable would be helpful.
For now, usage is intended only for extensions integrating with
the skin. Since we're not sure this can be considered a stable
interface by editors we intentionally use the `skin-` prefix rather
than `mw-` interface given the note about confusion about what is
stable in [[mw:Stable_interface_policy/Frontend#Writing_code]]
Bug: T356425
Change-Id: I0cd0e36a6abe0bba9e98d1b319e636bef2952301
Add an @import for Codex variables, i.e.
@import 'mediawiki.skin.codex-design-tokens/theme-wikimedia-ui.less';
that adds overrides to the variables from
'mediawiki.skin.defaults.less' to CSSCustomProperties.less.
Bug: T356427
Change-Id: I7c2c3a07899b4de735f7e7fd24e003ab69d449bb
Additional changes:
* Separate CSSCustomProperties.less from skin.less so that
we can obtain the unmodified original values for the colors
Depends-On: I363a97d33d85a9033da753f2a8fe730d80206639
Depends-On: I148eaca747352ffdc9d1423f20d34bd5a1d0e447
Bug: T356427
Change-Id: I916450c276cabb0c7c871525c50f95fb87f498ad
This fixes the regression introduced in I6331d88e5b73.
Also un-nesting selector to necessary level.
Bug: T357849
Change-Id: I58ed32e63ad4c37aefd79edac5f1376ce4313ee3
In 1.42.0-wmf.17 these had margin 0 in Minerva.
I incorrectly assumed we had defined an explicit margin in content
and for talk pages but apparently none exists, so I have restored
this rule to the list.less file.
Follow up to I6331d88e5b7301fd13249414350a539738cfae53
Bug: T357742
Change-Id: Ib3062bfbffe35415f479bae46ecf02e8a094958b
Right now visited links in night mode are showing the day mode style for
@color-visited, because --color-link--visited is defined, but never set
to a corresponding night mode style. This defines the night mode
variant in the stylesheet, and sets it to the same value as
--color-visited
Visual change only in night mode, which is behind a feature flag
I also added /coverage/ to the eslintignore, as I was getting failures
on the pre-commit hook due to us linting the coverage report 🙃
Bug: T356825
Change-Id: I96695fe4c094b79385e36aef9e29b8d392c06302
Required for proper presentation of page issues overlay
and multimedia viewer.
The div rules were unnecessary.
Bug: T205341
Change-Id: I6fea0f2013a11e5248b71619b795d794c8ed18ad