Skip to content

Extracts all styles which match a certain pattern. For example extract all rules that contain pixel values.

Notifications You must be signed in to change notification settings

fret2buzz/styles-extract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

styles-extract

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;
	}
}

About

Extracts all styles which match a certain pattern. For example extract all rules that contain pixel values.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages