0.0.4 • Published 8 years ago

postcss-split v0.0.4

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

PostCSS Split

PostCSS plugin to split annotated CSS into two: a small set of important rules that will be embedded in the HTML, and a large set of rules that will be loaded asynchronously.

/* Input example */
a {
    /*!CRITICAL*/
    color:blue
}
b {
    font-weight:bold
}
@media only screen and (max-width: 500px){
    a {
        /*!CRITICAL*/
        color:black
    }
    b {
        /*!CRITICAL*/
        color:blue
    }
    c {
        color: orange
    }
}
  /* Output example */
a {
    color:blue
}
@media only screen and (max-width: 500px){
    a {
        color:black
    }
    b {
        color:blue
    }
}

Usage

postcss([ require('postcss-split') ])