diff --git a/resources/skins.vector.styles/images/unwatch-icon-hl.png b/resources/skins.vector.styles/images/unwatch-icon-hl.png deleted file mode 100644 index b7397c7..0000000 Binary files a/resources/skins.vector.styles/images/unwatch-icon-hl.png and /dev/null differ diff --git a/resources/skins.vector.styles/images/unwatch-icon.png b/resources/skins.vector.styles/images/unwatch-icon.png deleted file mode 100644 index b4d3d9a..0000000 Binary files a/resources/skins.vector.styles/images/unwatch-icon.png and /dev/null differ diff --git a/resources/skins.vector.styles/images/watch-icon-hl.png b/resources/skins.vector.styles/images/watch-icon-hl.png deleted file mode 100644 index 21de7cb..0000000 Binary files a/resources/skins.vector.styles/images/watch-icon-hl.png and /dev/null differ diff --git a/resources/skins.vector.styles/images/watch-icon.png b/resources/skins.vector.styles/images/watch-icon.png deleted file mode 100644 index c0396fb..0000000 Binary files a/resources/skins.vector.styles/images/watch-icon.png and /dev/null differ diff --git a/resources/skins.vector.styles/index.less b/resources/skins.vector.styles/index.less index 87a5164..11ca945 100644 --- a/resources/skins.vector.styles/index.less +++ b/resources/skins.vector.styles/index.less @@ -15,5 +15,6 @@ @import 'externalLinks.less'; } +@import 'watchstar-ie8.less'; @import 'hd.less'; @import 'print.less'; diff --git a/resources/skins.vector.styles/legacy.less b/resources/skins.vector.styles/legacy.less index d3e09bf..8687e54 100644 --- a/resources/skins.vector.styles/legacy.less +++ b/resources/skins.vector.styles/legacy.less @@ -14,5 +14,6 @@ @import 'externalLinks.less'; } +@import 'watchstar-ie8.less'; @import 'hd.less'; @import 'print.less'; diff --git a/resources/skins.vector.styles/watchstar-ie8.less b/resources/skins.vector.styles/watchstar-ie8.less new file mode 100644 index 0000000..b756572 --- /dev/null +++ b/resources/skins.vector.styles/watchstar-ie8.less @@ -0,0 +1,32 @@ +/*! + * Convert watchstar to text label in IE 8. + * + * Hide the SVG icon and show the text label instead. + * This is in a separate file because it uses a + * @media query, which can't be nested, so we need to include + * this outside the overall '@media screen'. + */ + +// stylelint-disable no-duplicate-selectors + +// Support IE 8: Show label instead (Grade C). +// See https://stackoverflow.com/a/17699986/1696030 +// https://keithclark.co.uk/articles/moving-ie-specific-css-into-media-blocks/media-tests/ +@ie8-media-start: ~'@media \0screen {'; +@ie8-media-end: ~'} after'; +@{ie8-media-start} +.vectorTabs .mw-watchlink.icon a { + width: auto; + height: auto; + // Copied from 'VectorTabs.less'. + padding: 1.25em 8px 0 8px; +} + +// LESS nesting doesn't work in this hack. +.vectorTabs .mw-watchlink.icon a:before { + display: none; +} +// Bogus extra rule for LESS compiler to render `@media` ending bracket. +@{ie8-media-end} { + /* This comment makes the block non-empty. */ +} diff --git a/resources/skins.vector.styles/watchstar.less b/resources/skins.vector.styles/watchstar.less index 1afbfa6..f8dfb01 100644 --- a/resources/skins.vector.styles/watchstar.less +++ b/resources/skins.vector.styles/watchstar.less @@ -33,27 +33,27 @@ } #ca-unwatch.icon a:before { - .background-image-svg( 'images/unwatch-icon.svg', 'images/unwatch-icon.png' ); + background-image: linear-gradient( transparent, transparent ), url( images/unwatch-icon.svg ); } #ca-watch.icon a:before { - .background-image-svg( 'images/watch-icon.svg', 'images/watch-icon.png' ); + background-image: linear-gradient( transparent, transparent ), url( images/watch-icon.svg ); } #ca-unwatch.icon a:hover:before, #ca-unwatch.icon a:focus:before { - .background-image-svg( 'images/unwatch-icon-hl.svg', 'images/unwatch-icon-hl.png' ); + background-image: linear-gradient( transparent, transparent ), url( images/unwatch-icon-hl.svg ); } #ca-watch.icon a:hover:before, #ca-watch.icon a:focus:before { - .background-image-svg( 'images/watch-icon-hl.svg', 'images/watch-icon-hl.png' ); + background-image: linear-gradient( transparent, transparent ), url( images/watch-icon-hl.svg ); } // Loading watchstar link class. #ca-unwatch.icon .loading:before, #ca-watch.icon .loading:before { - background-image: url( images/watch-icon-loading.svg ); + background-image: linear-gradient( transparent, transparent ), url( images/watch-icon-loading.svg ); .rotation( 700ms ); /* Suppress the hilarious rotating focus outline on Firefox */ outline: 0;