SASS syntax indented on multiple lines?

I love Sass syntax indentation (unlike SCSS, which is an agnostic of spaces and uses parentheses and semicolons). I think this is a lot cleaner.

There is one question that I have. If I have a really long line, there is no way to split it into several lines (for example, observing a limit of 80 characters)

Take this example of a very long mixin declaration, first written in SCSS.

@mixin col($cols, $mleft: 0, $mright: 0, $include-margin: false, $border: 0,
           $pleft: 0, $pright: 0, $include-padding: true, $extra: 0, 
           $clear: false, $lead: true, $container: false) {
    color: red;
    display: block;
}

I can split one long ad into several lines. With indented syntax, I don't think there is a way. I have to put the ad on one line, which is less readable.

@mixin col($cols, $mleft: 0, $mright: 0, $include-margin: false, $border: 0, $pleft: 0, $pright: 0, $include-padding: true, $extra: 0, $clear: false, $lead: true, $container: false)
    color: red
    display: block

Is there any way that I don't know about ?: (

+5
2

sass. , , CSS, :

.users #userTab,
.posts #postTab
  width: 100px
  height: 30px

: http://sass-lang.com/docs/yardoc/file.INDENTED_SYNTAX.html#multiline_selectors

, : sass.

+3

-: . ( Sass ).

-: .

:

=mixin($argument)
    body::before
        content: $argument
$v1: 'foo-'
$v2: 'bar-'
$v3: 'baz.'
$var: $v1+$v2+$v3
+mixin($var)

$v#, $var.

body::before {
    content: 'foo-bar-baz';
}

- Sass , . SVG .

0

All Articles