Move legacy link styles to other skin features

content-parser-output receives styles for classes solely provided
by the parser, elements the rest.

One class was left untouched: a.new. This affect certain skins that
depend on the override order of legacy > elements. elements defines
a.new as #d33, which matches the Wikimedia Design Style Guide, but
legacy has #ba0000. Most skins override a.new with their preferred
colour, but some skins, such as Vector do not.

Bug: T278575
Change-Id: Ib60459eb6d15ea1345d6dcf7f46b239ada512cc8
This commit is contained in:
mainframe98 2021-03-26 21:05:18 +01:00
parent ca380d956d
commit b24bff67ed
3 changed files with 28 additions and 26 deletions

View file

@ -1,3 +1,5 @@
/* stylelint-disable selector-class-pattern */
/**
* This feature provides various styles associated with the parser.
* Styles contained here should make use of classes that are generated by the Parser.
@ -16,4 +18,15 @@
*/
.mw-parser-output {
.mixin-clearfix();
a.external.free {
word-wrap: break-word;
}
}
/* External URLs should always be treated as LTR (T6330) */
/* @noflip */ .rtl .mw-parser-output a.external.free,
.rtl .mw-parser-output a.external.autonumber {
direction: ltr;
unicode-bidi: embed;
}

View file

@ -89,8 +89,21 @@ a.new:visited,
color: #b63;
}
.mw-parser-output a.external.free {
word-wrap: break-word;
/* Underline preference */
.mw-underline-always a {
text-decoration: underline;
}
.mw-underline-never a {
text-decoration: none;
}
/* Plainlinks - this can be used to switch
* off special external link styling */
.plainlinks a.external {
background: none !important; /* stylelint-disable-line declaration-no-important */
padding: 0 !important; /* stylelint-disable-line declaration-no-important */
}
/* Inline Elements */

View file

@ -109,16 +109,6 @@ span.comment {
height: 22px;
}
/* Underline preference */
.mw-underline-always a {
text-decoration: underline;
}
.mw-underline-never a {
text-decoration: none;
}
/**
* rev_deleted stuff
*/
@ -223,20 +213,6 @@ a.new {
color: #ba0000;
}
/* Plainlinks - this can be used to switch
* off special external link styling */
.plainlinks a.external {
background: none !important; /* stylelint-disable-line declaration-no-important */
padding: 0 !important; /* stylelint-disable-line declaration-no-important */
}
/* External URLs should always be treated as LTR (T6330) */
/* @noflip */ .rtl a.external.free,
.rtl a.external.autonumber {
direction: ltr;
unicode-bidi: embed;
}
@import 'content.tables.less';
/* Error, warning, success and neutral messages */