Break out rotation mixin into its own file
authorMatthew Flaschen <mflaschen@wikimedia.org>
Thu, 20 Feb 2014 03:24:48 +0000 (22:24 -0500)
committerBartosz Dziewoński <matma.rex@gmail.com>
Thu, 20 Feb 2014 12:02:20 +0000 (12:02 +0000)
Before, including mediawiki.mixins always caused keyframes to appear
in the output, regardless of whether .rotation was used.

Change-Id: Ibdd092ccc6dafd444407a6756c33830396f56b50

resources/mediawiki.less/mediawiki.mixins.less
resources/mediawiki.less/mediawiki.mixins.rotation.less [new file with mode: 0644]
skins/vector/components/watchstar.less

index d116008..80b68cc 100644 (file)
        -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/resources/mediawiki.less/mediawiki.mixins.rotation.less b/resources/mediawiki.less/mediawiki.mixins.rotation.less
new file mode 100644 (file)
index 0000000..82de5de
--- /dev/null
@@ -0,0 +1,31 @@
+// This is a separate file because importing the mixin causes
+// the keyframes blocks to be included in the output, regardless
+// of whether .rotation is used.
+@-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;
+}
index 6e4a7b3..b76a825 100644 (file)
@@ -1,3 +1,5 @@
+@import "mediawiki.mixins.rotation"
+
 /* Watch/Unwatch Icon Styling */
 #ca-unwatch.icon a,
 #ca-watch.icon a {