Use codex link mixin inside Minerva

VISUAL CHANGE:
1 change relating to link color inside ambox

Bug: T367892
Change-Id: Iefa1fee9c6ac0326bc43844205dd3f5dc53fc903
This commit is contained in:
Jon Robson 2024-09-17 11:03:37 -07:00 committed by Jdlrobson
parent 5633960a38
commit e23c1ae9b6
6 changed files with 20 additions and 48 deletions

View file

@ -27,17 +27,3 @@
// Arial on Windows, Roboto on Android.
// FIXME: Use WikimediaUI Base's OS specific default sans-serif fonts.
@font-family-sans: @font-family-sans--fallback;
/**
* == Non-standard variable names ==
* These variables don't correspond to Codex variables.
* TODO: Determine whether any of these are actually used in practice.
**/
@color-link: @color-progressive;
@color-link--visited: @color-visited;
@color-link--active: @color-progressive--active;
@color-link-new: @color-link-red;
@color-link-new--visited: @color-link-red--visited;
@color-link-external: @color-progressive;
@color-link-external--visited: @color-visited;
@color-link-external--active: @color-progressive--active;

View file

@ -19,11 +19,8 @@
text-decoration: none;
}
&.new a,
&.new a:visited,
&.new a:hover,
&.new a:active {
color: @color-link-new;
&.new a {
.cdx-mixin-link-red();
}
&:last-child {

View file

@ -9,50 +9,40 @@
* attributes.
* This can be removed when Minerva uses ResourceLoaderSkinModule `elements` feature.
*/
a.mw-selflink,
a:not( [ href ] ) {
color: @color-base;
font-weight: bold;
text-decoration: inherit;
/* The anchor is functionally a link so show a hand cursor. */
cursor: pointer;
}
/* stylelint-disable-next-line no-descending-specificity */
a {
/* `a` element code block can be removed
* when Minerva uses ResourceLoaderSkinModule `elements` feature. */
color: @color-link;
text-decoration: none;
background: none;
/* This not does apply to links with role button per discussion on T373989 */
a:not( [ role='button' ] ) {
.cdx-mixin-link-base();
}
/* :visited code block can be removed
* when Minerva uses ResourceLoaderSkinModule `elements` feature. */
&:visited {
color: @color-visited;
}
/* :active code block can be removed
* when Minerva uses ResourceLoaderSkinModule `elements` feature. */
&:active {
color: @color-progressive--active;
}
/* :hover code block can be removed
* when Minerva uses ResourceLoaderSkinModule `elements` feature. */
&:hover {
text-decoration: underline;
}
a.new {
.cdx-mixin-link-red();
}
// External links
// Use of `a` element selector due to its widespread usage and for limiting generic class scope.
// `a.external` is for footer's “Creative Commons” license link only.
a.external,
.mw-parser-output a.external {
a.external {
// background-image is specified by ResourceLoader via skin.json.
background-position: center right;
background-repeat: no-repeat;
// Force the image size to be 10px.
background-size: 10px;
padding-right: 13px;
/* Plainlinks - this can be used to switch
* off special external link styling - copied from content-links SkinModule feature. */
.plainlinks & {
background: none !important;
padding: 0 !important;
}
}
// Generic class name needed

View file

@ -111,7 +111,7 @@ table.ambox {
}
.ambox-learn-more {
color: @color-link;
.cdx-mixin-link-base();
position: absolute;
right: @amboxPadding;
bottom: @amboxPadding;

View file

@ -21,7 +21,7 @@
// links should be separated by same color
.hlist {
li::after {
color: @color-link;
color: @color-progressive;
}
}

View file

@ -331,7 +331,6 @@
"i18n-ordered-lists",
"content-body",
"content-tables",
"content-links",
"interface-core"
],
"styles": [