• Stars
    star
    270
  • Rank 152,189 (Top 3 %)
  • Language
    CSS
  • License
    Other
  • Created over 12 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Compass port of Dan Eden's Animate.css

Compass Animate

This is the new home for the Compass port of animate.css by Dan Eden. It is splitting off from compass-animation because the majority of that plugin has moved into Compass 0.13. This plugin is for people on the Compass edge, while that plugin remains useful to people who are still using Compass 0.12.

Compass Animate requires Compass 0.13 (currently in alpha).

gem install animate --pre
# config.rb
require "animate"
// *.scss
@import "animate";

Usage

We try our best to stay up to date with the latest from Dan Eden, but we've also made a few changes and expanded on his base.

You can include any number of named animation keyframes, each one with or without it's related class name.

The most basic option is simply:

// Include all the animation keyframes:
@include animate;

But you can get much more detailed:

// Temlate:
// @include animate[-animationName]([$sub: all, $class: false]);

Let's say you want just the "flash" animation:

// Include only the flash animation keyframes
@include animate-flash;

But you also want a pre-defined class that calls that animation:

// Include only the flash animation keyframes,
// with associated class name:
@include animate-flash($class:true);

That will output:

@-moz-keyframes flash { 0% { opacity: 1; }
  25% { opacity: 0; }
  50% { opacity: 1; }
  75% { opacity: 0; }
  100% { opacity: 1; } }

@-webkit-keyframes flash { 0% { opacity: 1; }
  25% { opacity: 0; }
  50% { opacity: 1; }
  75% { opacity: 0; }
  100% { opacity: 1; } }

@-o-keyframes flash { 0% { opacity: 1; }
  25% { opacity: 0; }
  50% { opacity: 1; }
  75% { opacity: 0; }
  100% { opacity: 1; } }

@-ms-keyframes flash { 0% { opacity: 1; }
  25% { opacity: 0; }
  50% { opacity: 1; }
  75% { opacity: 0; }
  100% { opacity: 1; } }

@keyframes flash { 0% { opacity: 1; }
  25% { opacity: 0; }
  50% { opacity: 1; }
  75% { opacity: 0; }
  100% { opacity: 1; } }

.flash {
  -webkit-animation-name: flash;
     -moz-animation-name: flash;
      -ms-animation-name: flash;
       -o-animation-name: flash;
          animation-name: flash; }

Now you have the named keyframes for the "flash" animation and a class name that you can use in your HTML or extend with Sass.

You can also set $class to silent and get %flash which can be used with @extends but won't show up in the css.

There are a few shortcuts as well:

// this:
@include animate-fadeIn;
@include animate-fadeOut;
@include animate-fadeOutBig;

// is equal to this:
@include animate-fade(in-only out-only outBig);

If you want all the fadeOut animations:

@include animate-fade(out);

Animations

This plugin includes the following mixins & animations:

Attention

  • attention
  • flash, bounce, shake, tada, swing, wobble, wiggle, pulse, rubberBand

Flip (currently Webkit, Firefox, & IE10 only)

  • flip, flipX, flipY
  • flipIn, flipInX, flipInY
  • flipOut, flipOutX, flipOutY

Fade

  • fade
  • fadeIn, fadeInUp, fadeInDown, fadeInLeft, fadeInRight, fadeInUpBig, fadeInDownBig, fadeInLeftBig, fadeInRightBig
  • fadeOut, fadeOutUp, fadeOutDown, fadeOutLeft, fadeOutRight, fadeOutUpBig, fadeOutDownBig, fadeOutLeftBig, fadeOutRightBig

Bounce

  • bounce
  • bounceIn, bounceInDown, bounceInUp, bounceInLeft, bounceInRight
  • bounceOut, bounceOutDown, bounceOutUp, bounceOutLeft, bounceOutRight

Roll

  • roll
  • rollIn
  • rollOut

Rotate

  • rotate
  • rotateIn, rotateInDownLeft, rotateInDownRight, rotateInUpLeft, rotateInUpRight
  • rotateOut, rotateOutDownLeft, rotateOutDownRight, rotateOutUpLeft, rotateOutUpRight

LightSpeed

  • lightSpeed
  • lightSpeedIn
  • lightSpeedOut

Special

  • special
  • hinge

Slide

  • slide
  • slideInDown, slideInLeft, slideInRight
  • slideOutUp, slideOutLeft, slideOutRight

Zoom

  • zoom
  • zoomIn, zoomInDown, zoomInLeft, zoomInRight, zoomInUp
  • zoomOut, zoomOutDown, zoomOutLeft, zoomOutRight, zoomOutUp

More Repositories

1

compass-animation

css3 animation plugin for compass
CSS
362
star
2

compass-css-lightbox

a css-only lightbox implementation for compass
CSS
74
star
3

compass-css-slideshow

a css-only slideshow implementation for compass
Ruby
51
star
4

webfontspecimen

An adaptation of Tim Brown's Web Font Specimen for Compass
Ruby
32
star
5

mia

eleventy source for miriamsuzanne.com
Nunjucks
25
star
6

teacup

the new new teacup gorilla
Nunjucks
17
star
7

meaningful-css

Presentation for Denver HTML5 Users Group, April 2012
Ruby
14
star
8

miriamsuzanne

miriamsuzanne.com source
CSS
13
star
9

front-end-social

About pages for front-end.social mastodon
SCSS
7
star
10

web-component-template

a template for web components
HTML
5
star
11

ground-control

Use input/select or toggle buttons to control UI elements
JavaScript
4
star
12

pres

css presentation thingy
CSS
4
star
13

remedocs

an experiment in offsite documentation
SCSS
3
star
14

aaron-liechty

A tumblr theme for Aaron Liechty's illustration portfolio
Ruby
3
star
15

aliceandmia

The future online home for Alice & Mia
CSS
3
star
16

mayiuse

like caniuse, but for permission instead of data
CSS
3
star
17

business-business

For important business
SCSS
2
star
18

track-list

Enhance a list of audio tracks with playlist controls
JavaScript
2
star
19

nsa

Ask not what the NSA can do for you...
2
star
20

sidesaddle

Riding SideSaddle*
CSS
2
star
21

GreenMud-Fonts

handdrawn fonts for Into The Green Green Mud
2
star
22

post-obsolete

The Obsolete Book in a Post-Obsolete World, as Represented by a Post-Obsolete Book About Dance.
HTML
2
star
23

monkey-typr

Infinite Monkeys want to type the classics, and we're making it possible.
CSS
2
star
24

mirisuzanne.github.io

old personal site
HTML
2
star
25

monkey-write

a web component for typing any pre-defined text
HTML
1
star
26

eight-ball

A magic eight ball returns one of several options after shaking
HTML
1
star
27

sublime-oddmix-theme

Sublime Text 3 Theme — Based on Numix
1
star
28

clocks

Tools for designing and understanding clockwork
HTML
1
star
29

art-is-for-people

No One Wants Your Media Arts — Brakhage Center Lecture, 2013
CSS
1
star
30

capitalism

HTML
1
star
31

tweet-archive

JavaScript
1
star
32

buntmoney

fundraising page for buntport
CSS
1
star
33

ideao.club

idea-o club-o official* web presence
CSS
1
star
34

queer-stage

a stylesheet for https://stylestage.moderncss.dev/
CSS
1
star
35

cakeormaybepie.club

cake (or maybe pie) club
CSS
1
star
36

dirtcircledogs

the new dirtcricledogs.com
HTML
1
star
37

serialy-sassy

Yaml and Json Deserializers for sass
Ruby
1
star
38

teacupgorilla

website for Teacup Gorilla
CSS
1
star