Method: Sass::Script::Tree::UnaryOperation#to_sass
- Defined in:
- lib/sass/script/tree/unary_operation.rb
#to_sass(opts = {})
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/sass/script/tree/unary_operation.rb', line 27
def to_sass(opts = {})
operand = @operand.to_sass(opts)
if @operand.is_a?(Operation) ||
(@operator == :minus &&
(operand =~ Sass::SCSS::RX::IDENT) == 0)
operand = "(#{@operand.to_sass(opts)})"
end
op = Sass::Script::Lexer::OPERATORS_REVERSE[@operator]
op + (op =~ /[a-z]/ ? " " : "") + operand
end
|