Source for file ImportantDecorator.php
Documentation is available at ImportantDecorator.php
* Decorator which enables !important to be used in CSS values.
* @param $def Definition to wrap
* @param $allow Whether or not to allow !important
* Intercepts and removes !important if necessary
public function validate($string, $config, $context) {
// test for ! and important tokens
// :TODO: optimization: test directly for !important and ! important
if (strlen($string) >=
9 &&
substr($string, -
9) ===
'important') {
// use a temp, because we might want to restore important
$string =
$this->def->validate($string, $config, $context);
if ($this->allow &&
$is_important) $string .=
' !important';
Documentation generated on Thu, 19 Jun 2008 18:49:37 -0400 by phpDocumentor 1.4.2