diff --git a/src/less/animation.less b/src/less/animation.less new file mode 100644 index 000000000..cea8874f9 --- /dev/null +++ b/src/less/animation.less @@ -0,0 +1,41 @@ +.keyframes(@name, @frames) { + @-webkit-keyframes @name { + @frames(); + } + @-moz-keyframes @name { + @frames(); + } + @-ms-keyframes @name { + @frames(); + } + @-o-keyframes @name { + @frames(); + } + @keyframes @name { + @frames(); + } +} + +.animation(@attr) { + -webkit-animation: @attr; + -moz-animation: @attr; + -ms-animation: @attr; + -o-animation: @attr; + animation: @attr; +} + +.animation-delay(@attr) { + -webkit-animation-delay: @attr; + -moz-animation-delay: @attr; + -ms-animation-delay: @attr; + -o-animation-delay: @attr; + animation-delay: @attr; +} + +.transform(@attr) { + -webkit-transform: @attr; + -moz-transform: @attr; + -o-transform: @attr; + -ms-transform: @attr; + transform: @attr; +} \ No newline at end of file diff --git a/src/less/base/pane.less b/src/less/base/pane.less index d63e32577..1e2246c58 100644 --- a/src/less/base/pane.less +++ b/src/less/base/pane.less @@ -8,45 +8,21 @@ &>div { .background-color(@background-color-highlight, 90%); .border-radius(2.5px); - -webkit-animation: loading-widget 0.8s infinite linear; - -moz-animation: loading-widget 0.8s infinite linear; - animation: loading-widget 0.8s infinite linear; + .animation(loading-widget 0.8s infinite linear); } & .rect2 { - -webkit-animation-delay: -0.2s; - -moz-animation-delay: -0.2s; - animation-delay: -0.2s; + .animation-delay(-0.2s); } & .rect3 { - -webkit-animation-delay: -0.4s; - -moz-animation-delay: -0.4s; - animation-delay: -0.4s; + .animation-delay(-0.4s); } - @-webkit-keyframes loading-widget { + .keyframes (loading-widget, { 0%, 100% { - -webkit-transform: scaleY(0.3); + .transform (scaleY(0.3)); } 50% { - -webkit-transform: scaleY(1); + .transform (scaleY(1)); } - } - @-moz-keyframes loading-widget { - 0%, - 100% { - -moz-transform: scaleY(0.3); - } - 50% { - -moz-transform: scaleY(1); - } - } - @keyframes loading-widget { - 0%, - 100% { - transform: scaleY(0.3); - } - 50% { - transform: scaleY(1); - } - } + }); } \ No newline at end of file