37 $string = trim($string);
38 $is_important =
false;
40 if (strlen($string) >= 9 && substr($string, -9) ===
'important') {
41 $temp = rtrim(substr($string, 0, -9));
43 if (strlen($temp) >= 1 && substr($temp, -1) ===
'!') {
44 $string = rtrim(substr($temp, 0, -1));
49 if ($this->allow && $is_important) {
50 $string .=
' !important';
Base class for all validating attribute definitions.
validate($string, $config, $context)
Intercepts and removes !important if necessary.
Decorator which enables !important to be used in CSS values.
__construct($def, $allow=false)