Skip to content

pmarsceill/_animate.scss

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

#_animate.scss Just-add-water CSS animation powered by silent SCSS extends

This is a fork of Dan Eden's wonderful Animate.css repo. I have modified it to use silent SCSS extends so that all animations are always available, but only those that are used will be printed in a projects compiled css file.

_animate.scss is a bunch of cool, fun, and cross-browser animations for you to use in your projects. Great for emphasis, home pages, sliders, and general just-add-water-awesomeness.

##Usage To use _animate.scss in your website, simply drop the _animate.scss file into your project's scss partials directory, import it to your screen.scss file, silently the extend %animated class to an element, along with any of the animation names. That's it! You've got a CSS animated element. Super!

//screen.scss
  @import 'partials/_animate.scss'
//_some-partial.scss
.some-element {
  //
  // element styles
  // ...
  @extend %animated;
  @extend %fadeIn;
}

You can also detect when an animation ends:

$('#yourElement').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', doSomething);

Note: jQuery#one is used when you want to execute the event handler at most once. More information here.

You can change the duration of your animations, add a delay or change the number of times that it plays:

.some-element {
  -vendor-animation-duration: 3s;
  -vendor-animation-delay: 2s;
  -vendor-animation-iteration-count: infinite;
}

Note: be sure to replace "vendor" in the CSS with the applicable vendor prefixes (webkit, moz, etc)

License

_animate.scss is licensed under the MIT license. (http://opensource.org/licenses/MIT)

About

Silent sass extends of Dan Eden's animate.css.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • CSS 100.0%