/** */ private function generate_style_property() { if ($this->__style_property__) { // determine value to set if ($this instanceof ICE_Option_Attachment_Image) { $value = $this->get_image_url('full'); } elseif ($this instanceof ICE_Option_Static_Image) { $value = $this->get_image_url(); } else { $value = $this->get(); } // try to set the value if (null !== $value && $this->__style_property__->set_value($value, $this->style_unit)) { // get the style value $style_value = $this->__style_property__->get_value(); // add value to component styles if set if ($style_value->has_value()) { if ($this->style_section) { $rule = $this->style()->section($this->style_section)->rule($this->format_style_selector()); } else { $rule = $this->style()->rule($this->format_style_selector()); } $rule->add_declaration($this->__style_property__->get_name(), $this->__style_property__->get_value()->format()); } } } }