From: m4tx Date: Wed, 4 Dec 2013 22:13:30 +0000 (+0100) Subject: Add an SVG version of watch icon X-Git-Tag: 1.31.0-rc.0~17092^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22suivi_revisions%22%29%20.%20%22?a=commitdiff_plain;h=dbf8345851f39b7aa6bee56960a7bf9e1bec88b9;p=lhc%2Fweb%2Fwiklou.git Add an SVG version of watch icon The watch icon isn't in the sprite now, using separate image files for each state Bug: 35335 Change-Id: Iee3765e940cfd9784c55b6a87a678e41550032a7 --- diff --git a/resources/mediawiki.less/mediawiki.mixins.less b/resources/mediawiki.less/mediawiki.mixins.less index 5d2c27189f..e21d21b2ae 100644 --- a/resources/mediawiki.less/mediawiki.mixins.less +++ b/resources/mediawiki.less/mediawiki.mixins.less @@ -50,3 +50,32 @@ -webkit-transition: @string; transition: @string; } + +@-webkit-keyframes rotate { + from { + -webkit-transform:rotate(0deg); + } + to { + -webkit-transform:rotate(360deg); + } +} + +@keyframes rotate { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + +.rotation(@time) { + -webkit-animation-name: rotate; + -webkit-animation-duration: @time; + -webkit-animation-iteration-count: infinite; + -webkit-animation-timing-function: linear; + animation-name: rotate; + animation-duration: @time; + animation-iteration-count: infinite; + animation-timing-function: linear; +} diff --git a/skins/vector/components/watchstar.less b/skins/vector/components/watchstar.less index 6f93215988..6e4a7b35c3 100644 --- a/skins/vector/components/watchstar.less +++ b/skins/vector/components/watchstar.less @@ -13,26 +13,29 @@ margin-top: -0.8em !ie; height: 0; overflow: hidden; - .background-image('images/watch-icons.png'); + background-position: 5px 60%; } #ca-unwatch.icon a { - background-position: -43px 60%; + .background-image-svg('images/unwatch-icon.svg', 'images/unwatch-icon.png'); } #ca-watch.icon a { - background-position: 5px 60%; + .background-image-svg('images/watch-icon.svg', 'images/watch-icon.png'); } #ca-unwatch.icon a:hover, #ca-unwatch.icon a:focus { - background-position: -67px 60%; + .background-image-svg('images/unwatch-icon-hl.svg', 'images/unwatch-icon-hl.png'); } #ca-watch.icon a:hover, #ca-watch.icon a:focus { - background-position: -19px 60%; + .background-image-svg('images/watch-icon-hl.svg', 'images/watch-icon-hl.png'); } #ca-unwatch.icon a.loading, #ca-watch.icon a.loading { - .background-image('images/watch-icon-loading.gif'); - background-position: 5px 60%; + .background-image-svg('images/watch-icon-loading.svg', 'images/watch-icon-loading.png'); + .rotation(700ms); + background-position: 50% 60%; + -webkit-transform-origin: 50% 57%; + transform-origin: 50% 57%; } #ca-unwatch.icon a span, #ca-watch.icon a span { diff --git a/skins/vector/images/unwatch-icon-hl.png b/skins/vector/images/unwatch-icon-hl.png new file mode 100644 index 0000000000..6b2b50279b Binary files /dev/null and b/skins/vector/images/unwatch-icon-hl.png differ diff --git a/skins/vector/images/unwatch-icon-hl.svg b/skins/vector/images/unwatch-icon-hl.svg new file mode 100644 index 0000000000..346e072d0a --- /dev/null +++ b/skins/vector/images/unwatch-icon-hl.svg @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + Mateusz "m4tx" Maćkowski + + + + + + + + + diff --git a/skins/vector/images/unwatch-icon.png b/skins/vector/images/unwatch-icon.png new file mode 100644 index 0000000000..9fd9436ad9 Binary files /dev/null and b/skins/vector/images/unwatch-icon.png differ diff --git a/skins/vector/images/unwatch-icon.svg b/skins/vector/images/unwatch-icon.svg new file mode 100644 index 0000000000..9e13769449 --- /dev/null +++ b/skins/vector/images/unwatch-icon.svg @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + Mateusz "m4tx" Maćkowski + + + + + + + + + diff --git a/skins/vector/images/watch-icon-hl.png b/skins/vector/images/watch-icon-hl.png new file mode 100644 index 0000000000..4cb87cda65 Binary files /dev/null and b/skins/vector/images/watch-icon-hl.png differ diff --git a/skins/vector/images/watch-icon-hl.svg b/skins/vector/images/watch-icon-hl.svg new file mode 100644 index 0000000000..b31e8b87a1 --- /dev/null +++ b/skins/vector/images/watch-icon-hl.svg @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + Mateusz "m4tx" Maćkowski + + + + + + + + + diff --git a/skins/vector/images/watch-icon-loading.gif b/skins/vector/images/watch-icon-loading.gif deleted file mode 100644 index 618c308e0b..0000000000 Binary files a/skins/vector/images/watch-icon-loading.gif and /dev/null differ diff --git a/skins/vector/images/watch-icon-loading.png b/skins/vector/images/watch-icon-loading.png new file mode 100644 index 0000000000..5f0c490fbd Binary files /dev/null and b/skins/vector/images/watch-icon-loading.png differ diff --git a/skins/vector/images/watch-icon-loading.svg b/skins/vector/images/watch-icon-loading.svg new file mode 100644 index 0000000000..3423979453 --- /dev/null +++ b/skins/vector/images/watch-icon-loading.svg @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + Mateusz "m4tx" Maćkowski + + + + + + + + + diff --git a/skins/vector/images/watch-icon.png b/skins/vector/images/watch-icon.png new file mode 100644 index 0000000000..39daff23e7 Binary files /dev/null and b/skins/vector/images/watch-icon.png differ diff --git a/skins/vector/images/watch-icon.svg b/skins/vector/images/watch-icon.svg new file mode 100644 index 0000000000..c7a50810e7 --- /dev/null +++ b/skins/vector/images/watch-icon.svg @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + Mateusz "m4tx" Maćkowski + + + + + + + + + diff --git a/skins/vector/images/watch-icons.png b/skins/vector/images/watch-icons.png deleted file mode 100644 index 03aa7d54c4..0000000000 Binary files a/skins/vector/images/watch-icons.png and /dev/null differ