mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-27 15:40:15 +00:00
Minerva uses centralized link styling colors
Making Minerva use the `elements` feature is not practical at the current time. In lieu of that, we update the link colors to use the core definition. The red links and external link colors can come from the "content-links" module. This also adds support for the underlining user link preference and better plain link support. Bug: T274717 Change-Id: I600257e6f4430f166331c4ea4f3a72d87aa377d8
This commit is contained in:
parent
dd99903c41
commit
8c1afd97a3
|
@ -91,8 +91,6 @@
|
|||
@chromeColor: @grayLightest;
|
||||
@semiTransparent: rgba( 0, 0, 0, 0.8 );
|
||||
|
||||
@color-link: @colorProgressive;
|
||||
@color-link--new: @colorError;
|
||||
@lastModifiedBarActiveBackgroundColor: #00af89;
|
||||
@toastNotificationColor: @colorGray2;
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* This file is a LESS @import match for 'mediawiki.skin.variables.less'
|
||||
* when MinervaNeue is the active skin.
|
||||
*/
|
||||
|
||||
@import 'mediawiki.skin.defaults.less';
|
||||
|
||||
// Body content uses the user setting in browser / the system default sans-serif font:
|
||||
|
@ -12,3 +11,7 @@
|
|||
|
||||
// Matches WikimediaUI Base and OOUI/WikimediaUI theme.
|
||||
@border-radius-base: 2px;
|
||||
|
||||
@color-link: #36c;
|
||||
@color-link--visited: #6b4ba1;
|
||||
@color-link--active: #faa700;
|
||||
|
|
|
@ -7,41 +7,40 @@
|
|||
* It is particularly important on wikis for example inside navbox's that these
|
||||
* links can be differentiated from other links. Thus we only apply the linkColor to links with href
|
||||
* attributes.
|
||||
* This can be removed when Minerva uses ResourceLoaderSkinModule `elements` feature.
|
||||
*/
|
||||
a:not( [ href ] ) {
|
||||
color: @colorGray2;
|
||||
|
||||
/* 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;
|
||||
|
||||
/* :visited code block can be removed
|
||||
* when Minerva uses ResourceLoaderSkinModule `elements` feature. */
|
||||
&:visited {
|
||||
color: #6b4ba1;
|
||||
color: @color-link--visited;
|
||||
}
|
||||
|
||||
/* :active code block can be removed
|
||||
* when Minerva uses ResourceLoaderSkinModule `elements` feature. */
|
||||
&:active {
|
||||
color: #faa700;
|
||||
color: @color-link--active;
|
||||
}
|
||||
|
||||
/* :hover code block can be removed
|
||||
* when Minerva uses ResourceLoaderSkinModule `elements` feature. */
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
&.new,
|
||||
&.new:visited,
|
||||
&.new:hover {
|
||||
color: @color-link--new;
|
||||
// Take care of headings in page lists.
|
||||
> * {
|
||||
color: @color-link--new;
|
||||
}
|
||||
}
|
||||
|
||||
&.external {
|
||||
// background-image is specified by ResourceLoader.
|
||||
// Force the image size to be 10px.
|
||||
|
@ -58,10 +57,3 @@ a {
|
|||
font-size: @font-size-minerva-small;
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
|
||||
/* Plainlinks - this can be used to switch
|
||||
* off special external link styling */
|
||||
.plainlinks a {
|
||||
background: none !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
|
|
@ -257,7 +257,7 @@
|
|||
"ResourceModules": {
|
||||
"skins.minerva.base.styles": {
|
||||
"class": "MediaWiki\\Minerva\\ResourceLoaderSkinModule",
|
||||
"features": [ "i18n-ordered-lists", "content-body" ],
|
||||
"features": [ "i18n-ordered-lists", "content-body", "content-links" ],
|
||||
"targets": [
|
||||
"mobile",
|
||||
"desktop"
|
||||
|
|
Loading…
Reference in a new issue