postcss-split

0.0.4 • Public • Published

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
    }
    {
        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') ])

Package Sidebar

Install

npm i postcss-split

Weekly Downloads

117

Version

0.0.4

License

MIT

Last publish

Collaborators

  • wladston