From daa6ad5145d2415bfdaa9db792fc14729b916e20 Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Mon, 26 Mar 2018 10:41:36 -0700 Subject: [PATCH] Do not style links without href attribute Certain links (including links inside navboxes) render links to themselves - for example the navbox on the San Francisco article (provided it is not removed by wgMFRemovableClasses) These links should not look like links as they are not clickable so should be visually distinguished. Support for attribute selectors goes way back to IE7 and in the case of IE6, links will still render correctly falling back to the browser default stylesheet Bug: T181472 Change-Id: I9f842ae09751d299716d752328f747269597fbdb --- resources/skins.minerva.content.styles/links.less | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/resources/skins.minerva.content.styles/links.less b/resources/skins.minerva.content.styles/links.less index db3860c00..53636b381 100644 --- a/resources/skins.minerva.content.styles/links.less +++ b/resources/skins.minerva.content.styles/links.less @@ -2,9 +2,18 @@ @import 'minerva.variables.less'; @import 'minerva.mixins.less'; +/** + * Note that certain links may not have an href selector if they point to the page + * you are on. 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. +*/ +a[href] { + color: @linkColor; +} + a { text-decoration: none; - color: @linkColor; &:visited { color: #5a3696;