private function CSSCompression_Individuals::borderRadius in Advanced CSS/JS Aggregation 7
Same name and namespace in other branches
- 6 advagg_css_compress/css-compressor-3.x/src/lib/Individuals.inc \CSSCompression_Individuals::borderRadius()
Preps border radius for directional compression
Parameters
(string) prop: Property Declaration:
(string) val: Declaration Value:
1 call to CSSCompression_Individuals::borderRadius()
- CSSCompression_Individuals::individuals in advagg_css_compress/
css-compressor-3.x/ src/ lib/ Individuals.inc - Runs special unit/directional compressions
File
- advagg_css_compress/
css-compressor-3.x/ src/ lib/ Individuals.inc, line 123
Class
- 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;
}