You are here

public function SassCompactRenderer::renderComment in Sassy 7.3

Same name and namespace in other branches
  1. 7 phamlp/sass/renderers/SassCompactRenderer.php \SassCompactRenderer::renderComment()

Renders a comment. Comments preceeding a rule are on their own line. Comments within a rule are on the same line as the rule.

Parameters

SassNode the node being rendered:

Return value

string the rendered commnt

Overrides SassCompressedRenderer::renderComment

1 method overrides SassCompactRenderer::renderComment()
SassExpandedRenderer::renderComment in phpsass/renderers/SassExpandedRenderer.php
Renders a comment.

File

phpsass/renderers/SassCompactRenderer.php, line 49

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 them. @package PHamlP @subpackage …

Code

public function renderComment($node) {
  $nl = $node->parent instanceof SassRuleNode ? '' : "\n";
  return "{$nl}/* " . join("\n * ", $node->children) . " */{$nl}";
}