You are here

public function SassCompactRenderer::renderRule in Sassy 7

Same name and namespace in other branches
  1. 7.3 phpsass/renderers/SassCompactRenderer.php \SassCompactRenderer::renderRule()

* Renders a rule. *

Parameters

SassNode the node being rendered: * @param array rule properties * @param string rendered rules * @return string the rendered rule

Overrides SassCompressedRenderer::renderRule

File

phamlp/sass/renderers/SassCompactRenderer.php, line 91

Class

SassCompactRenderer
SassCompactRenderer class. Each CSS rule takes up only one line, with every property defined on that line. Nested rules are placed next to each other with no newline, while groups of rules have newlines between…

Code

public function renderRule($node, $properties, $rules) {
  return $this
    ->renderDebug($node) . parent::renderRule($node, $properties, str_replace("\n\n", "\n", $rules)) . "\n";
}