Extracts all rules which match a certain pattern. For example extract all rules that contain pixel values.
#Overview
Configuration is in the head of the script
#Getting started PHP is required. Installation and Configuration
Once it has been installed simply run this in your command line
php styles-extract.php
#Expected result For example we want to grab all rules that have pixels values in the declarations
Source: main.css
.test {
font-size: 12px;
color: red;
}
@media (max-width: 980px) {
.test2 {
background: blue;
width: 500px;
}
}
Generated file: main-only.css
.test {
font-size: 12px;
}
@media (max-width: 980px) {
.test2 {
width: 500px;
}
}