GithubHelp home page GithubHelp logo

postcss-magic-animations's Introduction

PostCSS Magic Animations Build Status

PostCSS plugin that adds @keyframes from Magic Animations

Screen

Input

.animation {
  animation-name: magic;
}

Output

.animation {
  animation-name: magic;
}
@keyframes magic {
  0% {
    opacity: 1;
    transform-origin: 100% 200%;
    transform: scale(1, 1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform-origin: 200% 500%;
    transform: scale(0, 0) rotate(270deg);
  }
}

Install

npm install postcss-magic-animations --save-dev

Usage

postcss([ require('postcss-magic-animations') ])

See PostCSS docs for examples for your environment.

Options

Call plugin function to set options:

postcss([ require('postcss-magic-animations({atRoot: true})') ])

atRoot

Defines atRoot: true to prevent the @keyframes can be nested in a ​media queries

Input

@media only screen and (min-width: 600px) {
  .animation {
    animation-name: magic;
  }
}

Output

@media only screen and (min-width: 600px) {
  .animation {
    animation-name: magic;
  }
}
@keyframes magic {
  0% {
    opacity: 1;
    transform-origin: 100% 200%;
    transform: scale(1, 1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform-origin: 200% 500%;
    transform: scale(0, 0) rotate(270deg);
  }
}

Thanks

postcss-magic-animations's People

Contributors

nucliweb avatar pborreli avatar

Stargazers

 avatar ʟᴊᴜɴɢᴍ•ʀᴋ avatar Sergey Sokolov avatar Jhonny Pimiento avatar AngeelRdz avatar Brendan Sparrow avatar Jordi López avatar Paco Segovia avatar Cesar Alvarez Marin avatar Alexey A. Zabaykalsky avatar Manuel avatar Muhammad Usman avatar Patrick El-Hage avatar Paweł Lesiecki avatar Ivan Demidov avatar Charbel avatar Hisco avatar Max avatar Chris Watson avatar Preco Kim avatar Oleg avatar Jake Jarrett avatar Kamil Mugutdinov avatar Carlos Gonzalez avatar Joan Claret avatar Sebastian Werner avatar Wendy avatar CFCanovas avatar Charles Kihe avatar  avatar Christian avatar David Garcia avatar Toru KOKUBUN avatar Juan Barranco avatar Adonis Karavokyros avatar Paul Le Cam avatar Naiara Abaroa avatar Michał Świtoń avatar Md Mazedul Islam Khan avatar Andrew M. avatar Juani Brex avatar

Watchers

James Cloos avatar Muhammad Usman avatar Wendy avatar Manas Musthafa avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.