diff --git a/lib/csslib.php b/lib/csslib.php index 6ab108a478c..2ce98c1ac09 100644 --- a/lib/csslib.php +++ b/lib/csslib.php @@ -3861,6 +3861,14 @@ class css_style_backgroundcolor extends css_style_color { public function is_special_empty_value() { return ($this->value === self::NULL_VALUE); } + + /** + * Returns true if the value for this style is valid + * @return bool + */ + public function is_valid() { + return $this->is_special_empty_value() || parent::is_valid(); + } } /** @@ -3907,6 +3915,14 @@ class css_style_backgroundimage extends css_style_generic { public function is_special_empty_value() { return ($this->value === self::NULL_VALUE); } + + /** + * Returns true if the value for this style is valid + * @return bool + */ + public function is_valid() { + return $this->is_special_empty_value() || parent::is_valid(); + } } class css_style_backgroundimage_advanced extends css_style_generic { @@ -3973,6 +3989,14 @@ class css_style_backgroundrepeat extends css_style_generic { public function is_special_empty_value() { return ($this->value === self::NULL_VALUE); } + + /** + * Returns true if the value for this style is valid + * @return bool + */ + public function is_valid() { + return $this->is_special_empty_value() || parent::is_valid(); + } } /** @@ -4016,6 +4040,14 @@ class css_style_backgroundattachment extends css_style_generic { public function is_special_empty_value() { return ($this->value === self::NULL_VALUE); } + + /** + * Returns true if the value for this style is valid + * @return bool + */ + public function is_valid() { + return $this->is_special_empty_value() || parent::is_valid(); + } } /** @@ -4059,6 +4091,14 @@ class css_style_backgroundposition extends css_style_generic { public function is_special_empty_value() { return ($this->value === self::NULL_VALUE); } + + /** + * Returns true if the value for this style is valid + * @return bool + */ + public function is_valid() { + return $this->is_special_empty_value() || parent::is_valid(); + } } /** @@ -4435,4 +4475,4 @@ class css_style_float extends css_style_generic { } return trim($value); } -} \ No newline at end of file +}