TheRealSyler / sass-formatter

Sass(indented syntax) formatter written in typescript
https://sass-formatter.syler.de
MIT License
10 stars 2 forks source link

wrong format of sass mixins on save #38

Closed F-y-o-d-o-r closed 3 years ago

F-y-o-d-o-r commented 3 years ago

Describe the bug wrong sass mixins formating

To Reproduce Steps to reproduce the behavior: to format

Expected behavior It should have an indent like this: image

Screenshots but it breaks all code: image

My mixin: image

=r($width)
  @media only screen and (max-width: $width+ "px")
    @content

.container-1475
  margin-left: auto
  margin-right: auto
  width: 100%
  max-width: 1475px
  +r(1800)
    padding-left: 20px
    padding-right: 20px

Desktop (please complete the following information):

Additional context Sass extension in vscode image

TheRealSyler commented 3 years ago

its not a bug its expected behaviour, i will change it in the future but im not sure when, for more details read #32.

F-y-o-d-o-r commented 3 years ago

its not a bug its expected behaviour, i will change it in the future but im not sure when, for more details read #32.

I read this but he has the opposite problem ) sometimes this indent needs to be added and sometimes not, depending on the mixin .. he doesn't need a space, but I need ...

mesqueeb commented 3 years ago

@TheRealSyler it sounds like since in Sass both syntaxes are correct depending on the situation, you should just remove any auto formatting of indentation underneath a mixin. What do you think ?

TheRealSyler commented 3 years ago

@mesqueeb yep, thats the plan.

TheRealSyler commented 3 years ago

@F-y-o-d-o-r should be fixed now.