styles: Update Vector 2022 link colors to conform to WCAG requirements

Follow Web Content Accessibility Guidelines and
use Wikimedia Design Style Guide colors with
at least 3:1 contrast with surrounding body text.

Also unify external and normal links as the color difference is
basically opaque to understand beyond a small group of power users.

Bug: T213778
Bug: T315321
Change-Id: I8a309eedd70b9a82fcca91c2cf9a30beea602b6b
This commit is contained in:
Volker E 2022-07-21 13:07:15 -07:00 committed by Jdlrobson
parent 8c3a4792e9
commit f7f78023e9
2 changed files with 30 additions and 5 deletions

View File

@ -1,11 +1,11 @@
/**
* This file is a LESS import match for "mediawiki.skin.variables.less"
* when Vector is the active skin.
* when legacy Vector is the active skin.
*/
@import 'mediawiki.skin.defaults.less';
@import '../mediawiki.less/mediawiki.skin.variables.less';
// Restore pre July 2022 colors for links (T213778)
// Set pre July 2022 colors for links (T213778).
@color-link: #0645ad;
@color-link--visited: #0b0080;

View File

@ -1,14 +1,39 @@
/**
* This file is a LESS import match for "mediawiki.skin.variables.less"
* when Vector is the active skin.
* ###IMPORTANT:##
* If editing this file, please also edit the respective file in the MinervaNeue skin.
* ####
*
* This file is a LESS @import match for "mediawiki.skin.variables.less"
* when Vector 2022 is the active skin.
* Please note, that legacy Vector is handled by
* "mediwiki.less.legacy/mediawiki.skin.variables.less".
*
* Please also note, that both current Wikimedia Design Style Guide based skins,
* Vector 2022 and Minerva Neue are using the same variable values respectively in their
* repositories.
*/
@import 'mediawiki.skin.defaults.less';
// == Colors ==
@color-link: #36c;
@color-link--visited: #795cb2;
@color-link--active: #faa700;
// Link colors for new or missing articles, also known as “Red links”.
// https://www.wikidata.org/wiki/Q13417974#sitelinks-wikipedia
@color-link-new: #d33;
@color-link-new--visited: #a55858;
// Link colors for a power user feature to highlight links to other projects.
// In Vector 2022 we unify these colors by default for simpler orientation by average users.
// It's still possible to overwrite the styles per user.
@color-link-external: #36c;
@color-link-external--visited: #795cb2;
@color-link-external--active: #faa700;
// Body content uses the user setting in browser / the system default sans-serif font:
// Arial on Windows, Roboto on Android.
// FIXME: Use WikimediaUI Base's OS specific default sans-serif fonts.
@font-family-sans: sans-serif;
// Matches wikimedia-ui-base and OOUI/wikimedia
// Matches WikimediaUI Base and Codex, OOUI/wikimedia
@border-radius-base: 2px;