| 1 |
@import 'mediawiki.mixins.rotation.less'; |
| 2 |
|
| 3 |
/* Watch/Unwatch Icon Styling */ |
| 4 |
/* Only use icon if the menu item is not collapsed into the "More" dropdown |
| 5 |
* (in which case it is inside `.vector-menu-dropdown` instead of `.vector-menu-tabs`). */ |
| 6 |
.vector-menu-tabs { |
| 7 |
// `#ca-unwatch` & `#ca-watch` both carry `.mw-watchlink` as well. |
| 8 |
@width-watchlink: unit( 28 / @font-size-tabs / @font-size-browser, em ); |
| 9 |
@height-watchlink: unit( 40 / @font-size-tabs / @font-size-browser, em ); |
| 10 |
@size-watchlink-icon: unit( 16 / @font-size-tabs / @font-size-browser, em ); |
| 11 |
|
| 12 |
.mw-watchlink.icon a { |
| 13 |
width: @width-watchlink; |
| 14 |
/* This hides the text but shows the background image */ |
| 15 |
/* Must not exceed parent's height, otherwise the background disappears on Chrome (T196610) */ |
| 16 |
height: 0; |
| 17 |
padding: @height-watchlink 0 0 0; |
| 18 |
overflow: hidden; |
| 19 |
|
| 20 |
&::before { |
| 21 |
background-repeat: no-repeat; |
| 22 |
background-position: 50% 50%; |
| 23 |
content: ''; |
| 24 |
display: block; |
| 25 |
position: absolute; |
| 26 |
top: unit( 14 / @font-size-tabs / @font-size-browser, em ); |
| 27 |
left: unit( 5 / @font-size-tabs / @font-size-browser, em ); |
| 28 |
width: @size-watchlink-icon; |
| 29 |
height: @size-watchlink-icon; |
| 30 |
} |
| 31 |
} |
| 32 |
|
| 33 |
#ca-unwatch.icon a::before { |
| 34 |
background-image: url( ./images/unwatch-icon.svg ); |
| 35 |
} |
| 36 |
|
| 37 |
#ca-unwatch.mw-watchlink-temp.icon a::before { |
| 38 |
background-image: url( ./images/unwatch-temp-icon.svg ); |
| 39 |
} |
| 40 |
|
| 41 |
#ca-watch.icon a::before { |
| 42 |
background-image: url( ./images/watch-icon.svg ); |
| 43 |
} |
| 44 |
|
| 45 |
#ca-unwatch.icon a:hover::before, |
| 46 |
#ca-unwatch.icon a:focus::before { |
| 47 |
background-image: url( ./images/unwatch-icon-hl.svg ); |
| 48 |
} |
| 49 |
|
| 50 |
#ca-unwatch.mw-watchlink-temp.icon a:hover::before, |
| 51 |
#ca-unwatch.mw-watchlink-temp.icon a:focus::before { |
| 52 |
background-image: url( ./images/unwatch-temp-icon-hl.svg ); |
| 53 |
} |
| 54 |
|
| 55 |
#ca-watch.icon a:hover::before, |
| 56 |
#ca-watch.icon a:focus::before { |
| 57 |
background-image: url( ./images/watch-icon-hl.svg ); |
| 58 |
} |
| 59 |
|
| 60 |
// Loading watchstar link class. |
| 61 |
#ca-unwatch.icon .loading::before, |
| 62 |
#ca-watch.icon .loading::before { |
| 63 |
.rotation( 700ms ); |
| 64 |
/* Suppress the hilarious rotating focus outline on Firefox */ |
| 65 |
outline: 0; |
| 66 |
cursor: default; |
| 67 |
pointer-events: none; |
| 68 |
transform-origin: 50% 50%; |
| 69 |
} |
| 70 |
} |