Special clip conversions

Paramètres

(string) val: property value:

1 call to CSSCompression_Individuals::clip()
CSSCompression_Individuals::individuals dans advagg_css_compress/css-compressor-3.x/src/lib/Individuals.inc
Runs special unit/directional compressions

Fichier

advagg_css_compress/css-compressor-3.x/src/lib/Individuals.inc, line 245

Classe

CSSCompression_Individuals
CSS Compressor [VERSION] [DATE] Corey Hart @ http://www.codenothing.com

Code

private function clip($val) {
    if (preg_match($this->rclip, $val, $match)) {
        $positions = array(
            1,
            3,
            5,
            7,
        );
        $clean = 'rect(';
        foreach ($positions as $pos) {
            if (!isset($match[$pos])) {
                return $val;
            }
            $clean .= $this->Numeric
                ->numeric($match[$pos]) . (isset($match[$pos + 1]) ? $match[$pos + 1] : '');
        }
        $val = $clean . ')';
    }
    return $val;
}