UNPKG

postcss-critical-split

Version:

A PostCSS plugin that takes existing CSS files and splits out the annotated critical styles into a seperate file.

60 lines (48 loc) 649 B
/* critical:start:header */ body { background-color: black; } p { color: red; } @media screen and (min-width: 400px) { p { display: inline-block; border: red thin solid; } div { float: left; } div::before { display: table; } } /* critical:end */ a { text-decoration: none; } table { width: 100%; height: 200%; } * { font-family: Arial, "Arial Black", sans-serif; } @media screen and (min-width: 500px) { p { display: inline-block; border: red thin solid; } div { /* critical:nav */ float: left; } div::before { display: table; } } span { /* critical:header */ display: inline-block; color: #333; }