Special handling for links without href attribute
The link change overrides link colors in last modified, talk button and main menu. This approach was obviously flawed. Rather than enter a specificity war let's instead limit the styles to links which do not have an href. Volker you were right... * Revert "Last modified links should not be progressive blue" This reverts commitbc045b78a2
. * Revert "Do not style links without href attribute" This reverts commitdaa6ad5145
. * Apply a not selector for links 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 be visually distinguished from normal links. The not selector has support from IE9 onwards and given our browser matrix and the low impact of if this fallback fails this is a perfectly acceptable usecase. Bug: T181472 Change-Id: I61b05e3c223f2ba5314aecdf26b8a0ee8caa6524
This commit is contained in:
parent
121958bea1
commit
8dad1703af
@ -28,7 +28,7 @@
|
||||
}
|
||||
|
||||
.last-modified-bar,
|
||||
.last-modified-bar a[href] {
|
||||
.last-modified-bar a {
|
||||
font-weight: bold !important;
|
||||
color: #000 !important;
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ body {
|
||||
color: @colorGray5;
|
||||
transition: background-color 0.2s ease, color 0.2s ease;
|
||||
|
||||
a[href],
|
||||
a,
|
||||
a:visited {
|
||||
color: @colorGray5;
|
||||
// If browser supports
|
||||
|
@ -8,12 +8,14 @@
|
||||
* links can be differentiated from other links. Thus we only apply the linkColor to links with href
|
||||
* attributes.
|
||||
*/
|
||||
a[href] {
|
||||
color: @linkColor;
|
||||
/* stylelint-disable no-descending-specificity */
|
||||
a:not( [href] ) {
|
||||
color: @colorGray2;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: @linkColor;
|
||||
|
||||
&:visited {
|
||||
color: #5a3696;
|
||||
|
Loading…
Reference in New Issue
Block a user