postcss-critical-split
Version:
A PostCSS plugin that takes existing CSS files and splits out the annotated critical styles into a seperate file.
50 lines (42 loc) • 647 B
CSS
/*! critical:start */
strong {
font-weight: bold;
}
p{
color: #333;
}
/*! critical:end */
@media screen and (min-width: 300px) {
strong {
color: #f00;
/*! critical */
}
}
@media screen and (min-width: 500px) {
p {
/*! critical:start:header */
float: left;
/* critical:end */
text-decoration: underline;
}
}
@media screen and (min-width: 300px) {
li {
display: block;
float: left;
text-align: center;
padding: 0;
/*! critical */
margin: 0;
position: relative;
border: 1px solid red;
}
}
table {
background-color: green;
/*! critical */
border-top: 1px solid blue;
}
h1 {
text-decoration: underline;
}