13

I couldn't figure out that from SASS documentation. For example I would like to use Compass mixin with 5 parameters:

=link-colors(!normal, !hover = false, !active = false, !visited = false, !focus = false)

I would like to declare 5 constants with semantically understandable names like those:

!top_line_navigation_link_normal_color = #00c
!top_line_navigation_link_hover_color = #0cc
!top_line_navigation_link_active_color = #c0c
!top_line_navigation_link_visited_color = #ccc
!top_line_navigation_link_focus_color = #cc0

and then somewhere below add compass mixin to my mixin:

+link-colors(!top_line_navigation_link_normal_color, !top_line_navigation_link_hover_color, !top_line_navigation_link_active_color, !top_line_navigation_link_visited_color, !top_line_navigation_link_focus_color)

The line is long too much. I'm not very serious with this question. But is it possible to make multiline? :)

cimmanon
  • 67,211
  • 17
  • 165
  • 171
Voldy
  • 12,829
  • 8
  • 51
  • 67
  • @cimmanon: this question can't be duplicate of what you have been pointed to because 1) it was asked before it. 2) you pointed to a question related to another language: SCSS and not initial SASS. I would rather mark it as outdated. Cheers! :) – Voldy Jun 02 '15 at 08:37
  • Questions do not have to be newer than the "duplicate" they were marked of (I found the other first and had started using it as my canonical). People still use the indented syntax and still complain about not being able to place it on multiple lines, there's no reason to call it "outdated". – cimmanon Jun 02 '15 at 10:37

1 Answers1

19

No, Sass does not support multiline statements (https://github.com/sass/sass/issues/216). But the new SCSS syntax in Sass3 does because it is whitespace agnostic, just like CSS.

Daniel Darabos
  • 26,991
  • 10
  • 102
  • 114
chriseppstein
  • 10,453
  • 1
  • 25
  • 17