PHPackages                             ianbogda/cssqueeze - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ianbogda/cssqueeze

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ianbogda/cssqueeze
==================

Efficient CSS minification in PHP

1.3.0(12y ago)12361[1 issues](https://github.com/ianbogda/CSSqueeze/issues)(Apache-2.0 or GPL-2.0)PHPPHP &gt;=5.3

Since Jan 23Pushed 11y ago4 watchersCompare

[ Source](https://github.com/ianbogda/CSSqueeze)[ Packagist](https://packagist.org/packages/ianbogda/cssqueeze)[ Docs](https://github.com/ianbogda/CSSqueeze)[ RSS](/packages/ianbogda-cssqueeze/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)DependenciesVersions (13)Used By (0)

CSSqueeze: Efficient CSS minification in PHP
============================================

[](#cssqueeze-efficient-css-minification-in-php)

[![License](https://camo.githubusercontent.com/c026ab8a2fb041d1496088d30ecb3bcf5b8975517e896885ee2f340f82619f39/68747470733a2f2f706f7365722e707567782e6f72672f69616e626f6764612f637373717565657a652f6c6963656e73652e706e67)](https://packagist.org/packages/ianbogda/cssqueeze)

[![Build Status](https://camo.githubusercontent.com/489a6120a641cf45bf02bd6bff7e70c3c62f18bca331710df64b7600fafbf5ad/68747470733a2f2f7472617669732d63692e6f72672f69616e626f6764612f435353717565657a652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/ianbogda/CSSqueeze) [![Code Coverage](https://camo.githubusercontent.com/1ef048d0ec2ca95823a12605ca0577d4b8cc54b196eaf3278cc22409a61aacf1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f69616e626f6764612f435353717565657a652f6261646765732f636f7665726167652e706e673f733d64616331393936663332646530343036353732303363343538626439366165613739623339306337)](https://scrutinizer-ci.com/g/ianbogda/CSSqueeze/) [![Scrutinizer Quality Score](https://camo.githubusercontent.com/d72f6474af3e70f2ad25e4223738a6543f30aeecee078f72b8a70ffe6087bcc3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f69616e626f6764612f435353717565657a652f6261646765732f7175616c6974792d73636f72652e706e673f733d34383431333066356164616239636138636531646661623532326135323430366330623333366532)](https://scrutinizer-ci.com/g/ianbogda/CSSqueeze/)

[![Latest Stable Version](https://camo.githubusercontent.com/47d8c6912ec4f2b1e75779d01762099b405a788b385e8fd69deacb6f9382b921/68747470733a2f2f706f7365722e707567782e6f72672f69616e626f6764612f637373717565657a652f762f737461626c652e706e67)](https://packagist.org/packages/ianbogda/cssqueeze) [![Latest Unstable Version](https://camo.githubusercontent.com/e925ee94e2985a72bb6ddeb2ab64e9dcb6054eb2011a47a3ce170f0515ae155d/68747470733a2f2f706f7365722e707567782e6f72672f69616e626f6764612f637373717565657a652f762f756e737461626c652e706e67)](https://packagist.org/packages/ianbogda/cssqueeze)

[![SensioLabsInsight](https://camo.githubusercontent.com/fe9f044c2026752239a4403a501602c515e0c24a5d89635a2fbc9f29124e1358/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f37336131633439632d326232332d343761642d626466382d3039643165646137343834632f6d696e692e706e67)](https://insight.sensiolabs.com/projects/73a1c49c-2b23-47ad-bdf8-09d1eda7484c)

CSSqueeze …

It's a single PHP class licensed under Apache 2 and GPLv2.

PHP
---

[](#php)

- PHP 5.3
- PHP 5.4
- PHP 5.5
- PHP 5.6

Features
--------

[](#features)

- Remove white space and extra characters
- whitespace
- Last semicolon in a statement
- Measurement units for the values (eg margin: 0px -&gt; margin: 0)
- Comments (preserving `/*! important comments */`)
- Empty statements (eg p {})
- Use shorthand properties
    - margin
    - padding
    - border
    - outline
    - list-style
    - background (eg instead of background-color)
- Compress colors
    - Use short notations of hexadecimal colors (Ex: color: # ff6600 becomes color: # f60;). Use colors supported in CSS 2 whose name is shorter than the hexadecimal.
- Sorting CSS properties
- Merge properties
- merge rules if required
- @import CSS only if file exists
- @media queries CSS

Compare few minifiers
---------------------

[](#compare-few-minifiers)

ranking is by *after compression and gzipped*, *after compression*

file compressed : [002/002.css from csszengarden.com](http://csszengarden.com/002/002.css)

    origin after compression saved compression ratio after compression and gzipped compression and gzip ratio    CSSqueeze 5547 2862 2685 48,40% 919 83,43%   csscompressor 5547 2863 2684 48,39% 920 83,41%   YUI 5547 2902 2645 47,68% 920 83,41%   excssive.com 5547 2861 2686 48,42% 924 83,34%   cssminifier.com 5547 2875 2672 48,17% 925 83,32%   cssdrive.com 5547 2964 2583 46,57% 934 83,16%   minifycss.com 5547 2894 2653 47,83% 936 83,13% Todo
----

[](#todo)

- embed image and/or sprites background-image
- Add vendor prefix
- More shorthands
- rgba(
- change hack throught html class

Vendors Prefix
--------------

[](#vendors-prefix)

- -o- Opera
- -moz- Gecko (Mozilla)
- -webkit- Webkit (Chrome, Safari, Android...)
- -ms-/mso- (Internet Explorer)
- -khtml- KHTML (Konqueror)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 99.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~37 days

Recently: every ~0 days

Total

11

Last Release

4489d ago

Major Versions

v0.3 → 1.0.02014-01-20

PHP version history (2 changes)v0.1PHP &gt;=5.1.4

v0.3PHP &gt;=5.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d24ddc86670628fc4c59b16bbfe68f6b1f05e86069d6f8ff9601bcda190473b?d=identicon)[ianbogda](/maintainers/ianbogda)

---

Top Contributors

[![ianbogda](https://avatars.githubusercontent.com/u/248129?v=4)](https://github.com/ianbogda "ianbogda (159 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

---

Tags

csscompressionminification

### Embed Badge

![Health badge](/badges/ianbogda-cssqueeze/health.svg)

```
[![Health](https://phpackages.com/badges/ianbogda-cssqueeze/health.svg)](https://phpackages.com/packages/ianbogda-cssqueeze)
```

###  Alternatives

[kriswallsmith/assetic

Asset Management for PHP

3.7k48.9M161](/packages/kriswallsmith-assetic)[assetic/framework

Asset Management for PHP

1001.4M20](/packages/assetic-framework)[mmanos/laravel-casset

An asset management package for Laravel 4.

102.6k](/packages/mmanos-laravel-casset)[toopay/assetic-minifier

Assetic Filter for pure PHP JS and CSS minification

1356.8k3](/packages/toopay-assetic-minifier)[konstantin-kuklin/assetic-static-gzip-bundle

Provide static gzip compression for css,js files via AsseticBundle

149.2k1](/packages/konstantin-kuklin-assetic-static-gzip-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
