Skip to content

wladston/postcss-split

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published