0.1.2 • Published 8 years ago

postcss-invert-keyframes v0.1.2

Weekly downloads
1
License
ISC
Repository
github
Last release
8 years ago

Build Status npm version

#PostCSS plugin invert-keyframes PostCSS plugin that copies as set of keyframes, copies them and then adds an inverted version so that the animation can be reversed.

#Installation

npm i postcss-invert-keyframes --save-dev

#Example

/* Input example */
@-invert-keyframes test {
  0%, 10%{
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(190px, 0, 0);
  }
  100%{
    transform: translate3d(150px, 0, 0);
  }
}
/* Output example */
@keyframes test {
  0%, 10%{
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(190px, 0, 0);
  }
  100%{
    transform: translate3d(150px, 0, 0);
  }
}

@keyframes test-inverted {
  0%{
    transform: translate3d(150px, 0, 0);
  }
  50% {
    transform: translate3d(190px, 0, 0);
  }
  100%, 90%{
    transform: translate3d(0, 0, 0);
  }
}

Usage

postcss([ require('postcss-invert-keyframes') ])

See PostCSS docs for examples for your environment.

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago