1/* Mixin for transition css */
2@mixin transition($for: all, $time-in: 250ms, $type: ease-in-out, $time-out: 0s) {
3 transition: $for $time-in $type $time-out;
4 -moz-transition: $for $time-in $type $time-out;
5 -webkit-transition: $for $time-in $type $time-out;
6 -o-transition: $for $time-in $type $time-out;
7}
8
9/* IE10 (the first stable version of IE to support transition)
10does not require the -ms- prefix. */
1div {
2 transition: all 0.5s ease;
3 background: red;
4 padding: 10px;
5}
6div:hover {
7 background: green;
8 padding: 20px;
9}
1@mixin transform($property) {
2 -webkit-transform: $property;
3 -ms-transform: $property;
4 transform: $property;
5}
6.box { @include transform(rotate(30deg)); }
7