postcss-mq-keyframes

0.3.0 • Public • Published

PostCSS postcss-mq-keyframes

Build Status Dependency Status devDependency Status npm version

This plugin will move any keyframe animations from inside media queries to the bottom of the CSS file.

See known issues on the caniuse.com page for CSS animation: 'IE10 and IE11 do not support CSS animations inside media queries.'

Input:

@media only screen and (min-width: 415px) {
 
    .pace {
        animation: pace-anim 5s;
    }
 
    @keyframes pace-anim {
        100% {
            opacity: 0;
        }
    }
 
}

Output:

@media only screen and (min-width: 415px) {
 
    .pace {
        animation: pace-anim 5s;
    }
}
 
@keyframes pace-anim {
    100% {
        opacity: 0;
    }
}

Install

$ npm install postcss-mq-keyframes --save-dev

Usage

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

See PostCSS docs for examples for your environment.

Package Sidebar

Install

npm i postcss-mq-keyframes

Weekly Downloads

20

Version

0.3.0

License

MIT

Last publish

Collaborators

  • tcotton