PHP Class SassCompressedRenderer

Compressed style takes up the minimum amount of space possible, having no whitespace except that necessary to separate selectors and a newline at the end of the file. It's not meant to be human-readable
Inheritance: extends SassRenderer
Show file Open project: richthegeek/phpsass Class Usage Examples

Public Methods

Method Description
renderComment ( SassNode $node ) : string Renders a comment.
renderDirective ( SassNode $node, array $properties ) : string Renders a directive.
renderProperties ( SassNode $node, array $properties ) : string Renders properties.
renderProperty ( SassNode $node ) : string Renders a property.
renderRule ( SassNode $node, array $properties, string $rules ) : string Renders a rule.

Protected Methods

Method Description
between ( ) : string Renders the brace between the selectors and the properties
end ( ) : string Renders the brace at the end of the rule
getIndent ( SassNode $node ) : string Returns the indent string for the node
renderSelectors ( SassNode $node ) : string Renders the rule's selectors

Method Details

between() protected method

Renders the brace between the selectors and the properties
protected between ( ) : string
return string the brace between the selectors and the properties

end() protected method

Renders the brace at the end of the rule
protected end ( ) : string
return string the brace between the rule and its properties

getIndent() protected method

Returns the indent string for the node
protected getIndent ( SassNode $node ) : string
$node SassNode the node to return the indent string for
return string the indent string for this SassNode

renderComment() public method

Renders a comment.
public renderComment ( SassNode $node ) : string
$node SassNode the node being rendered
return string the rendered comment

renderDirective() public method

Renders a directive.
public renderDirective ( SassNode $node, array $properties ) : string
$node SassNode the node being rendered
$properties array properties of the directive
return string the rendered directive

renderProperties() public method

Renders properties.
public renderProperties ( SassNode $node, array $properties ) : string
$node SassNode the node being rendered
$properties array properties to render
return string the rendered properties

renderProperty() public method

Renders a property.
public renderProperty ( SassNode $node ) : string
$node SassNode the node being rendered
return string the rendered property

renderRule() public method

Renders a rule.
public renderRule ( SassNode $node, array $properties, string $rules ) : string
$node SassNode the node being rendered
$properties array rule properties
$rules string rendered rules
return string the rendered directive

renderSelectors() protected method

Renders the rule's selectors
protected renderSelectors ( SassNode $node ) : string
$node SassNode the node being rendered
return string the rendered selectors