function parse($value, &$pipeline) { $style = new ListStyleValue(); $style->image = CSSListStyleImage::parse($value, $pipeline); $style->position = CSSListStylePosition::parse($value); $style->type = CSSListStyleType::parse($value); return $style; }
function parse($value, &$pipeline) { global $g_config; if (!$g_config['renderimages']) { return CSSListStyleImage::default_value(); } if (preg_match('/url\\(([^)]+)\\)/', $value, $matches)) { $url = $matches[1]; $full_url = $pipeline->guess_url(css_remove_value_quotes($url)); return new ListStyleImage($full_url, Image::get($full_url, $pipeline)); } return CSSListStyleImage::default_value(); }
function parse($value, &$pipeline) { if ($value === 'inherit') { return CSS_PROPERTY_INHERIT; } global $g_config; if (!$g_config['renderimages']) { return CSSListStyleImage::default_value(); } if (preg_match('/url\\(([^)]+)\\)/', $value, $matches)) { $url = $matches[1]; $full_url = $pipeline->guess_url(css_remove_value_quotes($url)); return new ListStyleImage($full_url, ImageFactory::get($full_url, $pipeline)); } /** * 'none' value and all unrecognized values */ return CSSListStyleImage::default_value(); }