Skip to content

Latest commit

 

History

History
14 lines (13 loc) · 729 Bytes

README.md

File metadata and controls

14 lines (13 loc) · 729 Bytes

CssOptimizer

Optimizes CSS (combines duplicate selectors, extracts duplicate css properties and values, minifies the css).

Render minified CSS:

$optimizer = new Jelle_S\CssOptimizer\CssOptimizer($css);
file_put_contents('style.min.css', $optimizer->renderMinifiedCSS());

Render SCSS from your css:

$optimizer = new Jelle_S\CssOptimizer\CssOptimizer($css);
file_put_contents('style.scss', $optimizer->renderSCSS());

This code is open source (GPL-3.0), however, if you like this class and you would like to sponsor the developer (me), feel free to paypal.