Skip to content

Commit

Permalink
fix .transition mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan You committed Nov 26, 2012
1 parent d584a65 commit dc16714
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 51 deletions.
42 changes: 1 addition & 41 deletions css/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 9 additions & 10 deletions css/style.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
}

// due to limitations of less, extra vars need an escaped comma in front of it: ~","
// also no extra value needs a dummy parameter ~""
.transition (@vars, @extra) {
.transition (@vars, @extra:~"") {
-webkit-transition: -webkit-transform @vars @extra;
-moz-transition: -moz-transform @vars @extra;
-ms-transition: -ms-transform @vars @extra;
Expand Down Expand Up @@ -41,7 +40,7 @@
}

.ease-out {
.transition(.3s cubic-bezier(0,.5,.5,1) ~"!important", ~"");
.transition(.3s cubic-bezier(0,.5,.5,1) ~"!important");
}

html, body {
Expand Down Expand Up @@ -96,7 +95,7 @@ html, body {

&.instant {
.item {
.transition(0s linear, ~"");
.transition(0s linear);
}
}

Expand All @@ -113,7 +112,7 @@ html, body {
width: 30px;
height: 30px;
vertical-align: middle;
.transition(.18s ease-in-out, ~"");
.transition(.18s ease-in-out);

&.down {
.transform(rotate(180deg));
Expand Down Expand Up @@ -243,7 +242,7 @@ html, body {
}

&.sorting {
.transition(0s linear ~"!important", ~"");
.transition(0s linear ~"!important");
.slider {
box-shadow: 0 2px 16px rgba(0,0,0,.25);
.transform(scale(1.05) ~"!important");
Expand All @@ -252,9 +251,9 @@ html, body {

&.sorting-trans {
z-index: 999 !important;
.transition(.12s ease-out, ~"");
.transition(.12s ease-out);
.slider {
.transition(.12s ease-out, ~"");
.transition(.12s ease-out);
}
}

Expand Down Expand Up @@ -338,15 +337,15 @@ html, body {
.perspective-origin(bottom center);
top: -@itemHeight;
.slider {
.transition(0s linear, ~"");
.transition(0s linear);
.trans-origin(bottom center);
}
}

&.bottom {
.perspective-origin(top center);
.slider {
.transition(.3s @ease, ~"");
.transition(.3s @ease);
.trans-origin(top center);
.transform(rotateX(-91deg)); // see createItemAtBottom() in collection.js
}
Expand Down

0 comments on commit dc16714

Please sign in to comment.