0.3.0 • Published 8 years ago

postcss-mq-keyframes v0.3.0

Weekly downloads
63
License
MIT
Repository
github
Last release
8 years ago

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.