function testCSSParsePropertyMultipart() { $null = null; $collection =& parse_css_property('-html2ps-html-content: "Double Quoted String" \'Single Quoted String\';', $null); $this->assertTrue($collection->contains(CSS_HTML2PS_HTML_CONTENT)); $content =& $collection->getPropertyValue(CSS_HTML2PS_HTML_CONTENT); $counters =& new CSSCounterCollection(); $this->assertEqual($content->render($counters), "Double Quoted StringSingle Quoted String"); }
function testCSSContentEmptyWithApostrophes() { $null = null; $collection =& parse_css_property('content: \'\';', $null); $this->assertTrue($collection->contains(CSS_CONTENT)); $counters =& new CSSCounterCollection(); $content =& $collection->getPropertyValue(CSS_CONTENT); $this->assertEqual($content->render($counters), ""); }
function parse_css_atpage_margin_box_declaration($css, &$at_rule, &$pipeline) { $parsed =& parse_css_property($css, $pipeline); if (!is_null($parsed)) { $properties = $parsed->getPropertiesSortedByPriority(); foreach ($properties as $property) { $at_rule->setCSSProperty($property); } } }
function parse_css_properties($raw_properties, &$pipeline) { $properties = split(";", $raw_properties); $results = array(); foreach ($properties as $property) { $results = array_merge($results, parse_css_property(trim($property), $pipeline)); } return $results; }