Пример #1
0
 public function render(\Sabberworm\CSS\OutputFormat $oOutputFormat)
 {
     if (count($this->aSelectors) === 0) {
         // If all the selectors have been removed, this declaration block becomes invalid
         throw new OutputException("Attempt to print declaration block with missing selector");
     }
     $sResult = $oOutputFormat->implode($oOutputFormat->spaceBeforeSelectorSeparator() . ',' . $oOutputFormat->spaceAfterSelectorSeparator(), $this->aSelectors) . $oOutputFormat->spaceBeforeOpeningBrace() . '{';
     $sResult .= parent::render($oOutputFormat);
     $sResult .= '}';
     return $sResult;
 }
Пример #2
0
 public function render(\Sabberworm\CSS\OutputFormat $oOutputFormat)
 {
     return $oOutputFormat->implode($oOutputFormat->spaceBeforeListArgumentSeparator($this->sSeparator) . $this->sSeparator . $oOutputFormat->spaceAfterListArgumentSeparator($this->sSeparator), $this->aComponents);
 }