mutian / Sublime-CSS-Format

CSS Formatting for Sublime Text
http://mutian.github.io/Sublime-CSS-Format/
MIT License
98 stars 27 forks source link

not support for #{} of sass #39

Open hkz404 opened 9 years ago

hkz404 commented 9 years ago
@for $i from 1 to 7{
   .life#{$i}{
    z-index: 10 - $i;
    @include img-decoration-life(life#{$i});
    background-image:none;
   }
  }

output:

@for $i from 1 to 7 {
        .life# {
            $i
        }
        {
            z-index: 10 - $i;

            @include img-decoration-life(life# {
                $i
            }
            );
            background-image: none;
        }
    }
cjke commented 9 years ago

+1

Demnogonis commented 8 years ago

+1

The same happens in LESS

.hq-loop(@n, @i: 1) when (@i =< @n) {
    .col-hq-@{i}:extend(.col-hq-1) {}
    .col-hq-@{i} {
        width: (@i * 100% / @n);
    }
    .hq-loop(@n, (@i + 1));
}
.hq-loop(12);

is formatted to:

.hq-loop(@n, @i:1) when (@i =< @n) {
    .col-hq-@ {
        i
    }

    :extend(.col-hq-1) {
    }

    .col-hq-@ {
        i
    }

    {
        width: (@i * 100% / @n);
    }

    .hq-loop(@n, (@i + 1));
}

.hq-loop(12);
elliottregan commented 8 years ago

+1

KiyoshiSaundo commented 7 years ago

+1