You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-7Lines changed: 38 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ Animate.less
3
3
4
4
*CSS animation pack for Less.*
5
5
6
-
`animate.less` is a collection of cross-browser CSS animations that you can plug right into your Less pre-processor for use in your projects. Thanks to the power of [Less](http://lesscss.org/), you can now create seriously complex animations, even without using any JavaScript or jQuery magic.
6
+
`animate.less` is a collection of cross-browser CSS animations that you can plug right into your Less pre-processor for use in your projects. Thanks to the power of [Less](http://lesscss.org/), you can now create seriously complex animations, even without using any JavaScript or jQuery magic. More on this later.
7
7
8
8
##What is Less?
9
9
Less is a CSS pre-processor, meaning that it extends the CSS language, adding features that allow variables, mixins, functions and many other techniques that allow you to make CSS that is more maintainable, themable and extendable.
@@ -51,6 +45,43 @@ You can change the duration of your animations, add a delay or change the number
51
45
52
46
*Note: be sure to replace "vendor" in the CSS with the applicable vendor prefixes (webkit, moz, etc)*
53
47
48
+
##Script-less Animations
49
+
One of the advantages of using Less is that you can create functions, which are basically [Mixins](http://lesscss.org/features/#features-overview-feature-mixins) containing nested rules and other function calls. Animate.less contains a set of mixins that make manipulating your animations easier. For example, the above jQuery example can be written as:
50
+
51
+
```less
52
+
#yourElement {
53
+
.animated();
54
+
.bounceOutLeft();
55
+
}
56
+
```
57
+
58
+
Which will output:
59
+
60
+
```css
61
+
#yourElement {
62
+
-webkit-animation-duration: 1s;
63
+
-moz-animation-duration: 1s;
64
+
-ms-animation-duration: 1s;
65
+
-o-animation-duration: 1s;
66
+
animation-duration: 1s;
67
+
-webkit-animation-fill-mode: both;
68
+
-moz-animation-fill-mode: both;
69
+
-ms-animation-fill-mode: both;
70
+
-o-animation-fill-mode: both;
71
+
animation-fill-mode: both;
72
+
-webkit-animation-name: bounceOutLeft;
73
+
-moz-animation-name: bounceOutLeft;
74
+
-ms-animation-name: bounceOutLeft;
75
+
-o-animation-name: bounceOutLeft;
76
+
animation-name: bounceOutLeft;
77
+
}
78
+
```
79
+
80
+
And there you have it! The animation has been achieved without using any jQuery. Of course, this is only tiny fraction of what can be achieved with Animate.less. Please head on over to [AnimateForLess.com](http://animateforless.com) for a full demo and to join the duscussion.
81
+
82
+
##Documentation
83
+
Coming soon. I promise!
84
+
54
85
## License
55
86
Animate.less is licensed under the MIT license. (http://opensource.org/licenses/MIT)
0 commit comments