Preps border radius for directional compression
Paramètres
(string) prop: Property Declaration:
(string) val: Declaration Value:
1 call to CSSCompression_Individuals::borderRadius()
- 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 123
Classe
- CSSCompression_Individuals
- CSS Compressor [VERSION] [DATE] Corey Hart @ http://www.codenothing.com
Code
private function borderRadius($prop, $val) {
if (preg_match($this->rslash, $val)) {
$parts = preg_split($this->rslash, $val, 2);
// We have to redo numeric compression because the slash may hav intruded
foreach ($parts as &$row) {
$p = preg_split($this->rspace, $row);
foreach ($p as &$v) {
if (!$v || $v == '') {
continue;
}
// Remove uneeded decimals/units
if ($this->options['format-units']) {
$v = $this->Numeric
->numeric($v);
}
}
$row = implode(' ', $p);
if ($this->options['directional-compress']) {
$row = $this->directionals(strtolower($row));
}
}
$val = implode('/', $parts);
}
else {
if ($this->options['directional-compress'] && preg_match($this->rradiusfull, $prop)) {
$val = $this->directionals(strtolower($val));
}
}
return $val;
}