public function SassCompactRenderer::renderComment in Sassy 7
Same name and namespace in other branches
- 7.3 phpsass/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 string the rendered commnt
Overrides SassCompressedRenderer::renderComment
1 method overrides SassCompactRenderer::renderComment()
- SassExpandedRenderer::renderComment in phamlp/
sass/ renderers/ SassExpandedRenderer.php - * Renders a comment. *
File
- phamlp/
sass/ 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…
Code
public function renderComment($node) {
$nl = $node->parent instanceof SassRuleNode ? '' : "\n";
return "{$nl}/* " . join("\n * ", $node->children) . " */{$nl}";
}