private function CSSCompression_Selectors::strictid in Advanced CSS/JS Aggregation 6
Same name and namespace in other branches
- 7 advagg_css_compress/css-compressor-3.x/src/lib/Selectors.inc \CSSCompression_Selectors::strictid()
Promotes nested id's to the front of the selector
Parameters
(string) selector: CSS Selector:
1 call to CSSCompression_Selectors::strictid()
- CSSCompression_Selectors::selectors in advagg_css_compress/
css-compressor-3.x/ src/ lib/ Selectors.inc - Selector specific optimizations
File
- advagg_css_compress/
css-compressor-3.x/ src/ lib/ Selectors.inc, line 190
Class
- CSSCompression_Selectors
- CSS Compressor [VERSION] [DATE] Corey Hart @ http://www.codenothing.com
Code
private function strictid($selector) {
$parts = preg_split($this->rcomma, $selector);
foreach ($parts as &$s) {
if (preg_match($this->rid, $s)) {
$p = preg_split($this->rid, $s);
$s = '#' . array_pop($p);
}
}
return implode(',', $parts);
}