Skip to content

Commit c68012b

Browse files
committed
Incrementing to version 1.3.2
Added some docs
1 parent 79b4607 commit c68012b

File tree

6 files changed

+29
-4
lines changed

6 files changed

+29
-4
lines changed

CssCrush/CssCrush.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* CSS Crush
55
*
6-
* @version 1.3.1
6+
* @version 1.3.2
77
* @license http://www.opensource.org/licenses/mit-license.php (MIT)
88
* @copyright Copyright 2010-2011 Pete Boere
99
*

CssCrush/lib/Color.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
<?php
2+
/**
3+
*
4+
* Colour parsing and conversion
5+
*
6+
*/
27

38
class CssCrush_Color {
49

CssCrush/lib/Core.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
<?php
2+
/**
3+
*
4+
* Main script. Includes core public API
5+
*
6+
*/
27

38
class CssCrush {
49

@@ -54,7 +59,7 @@ class CssCrush {
5459
([^a-z0-9_-])
5560
var\(\s*([a-z0-9_-]+)\s*\)
5661
|
57-
\{?\$([a-z0-9_-]+)\}? # Dollar syntax, optional curly braces
62+
\$\(\s*([a-z0-9_-]+)\s*\) # Dollar syntax
5863
)!ix',
5964
'custom' => '!(^|[^a-z0-9_-])(<functions>)?(___p\d+___)!i',
6065
'match' => '!(^|[^a-z0-9_-])([a-z_-]+)(___p\d+___)!i',
@@ -691,9 +696,9 @@ protected static function validateCache ( $hostfile ) {
691696

692697
protected static function minify ( $str ) {
693698
$replacements = array(
694-
'!\n+| (\{)!' => '$1', // Trim whitespace
699+
'!\n+| (\{)!' => '$1', // Trim whitespace
695700
'!(^|[: \(,])0(\.\d+)!' => '$1$2', // Strip leading zeros on floats
696-
'!(^|[: \(,])\.?0[a-zA-Z%]{1,5}!i' => '${1}0', // Strip unnecessary units on zero values
701+
'!(^|[: \(,])\.?0[a-zA-Z]{1,5}!i' => '${1}0', // Strip unnecessary units on zero values
697702
'!(^|\:) *(0 0 0|0 0 0 0) *(;|\})!' => '${1}0${3}', // Collapse zero lists
698703
'!(padding|margin) ?\: *0 0 *(;|\})!' => '${1}:0${2}', // Collapse zero lists continued
699704
'!\s*([>~+=])\s*!' => '$1', // Clean-up around combinators

CssCrush/lib/Function.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
<?php
2+
/**
3+
*
4+
* Custom CSS functions
5+
*
6+
*/
27

38
class CssCrush_Function {
49

CssCrush/lib/Importer.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
<?php
2+
/**
3+
*
4+
* Recursive file importing
5+
*
6+
*/
27

38
class CssCrush_Importer {
49

CssCrush/lib/Rule.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
<?php
2+
/**
3+
*
4+
* CSS rule API
5+
*
6+
*/
27

38
class CssCrush_Rule implements IteratorAggregate {
49

0 commit comments

Comments
 (0)