csscomb.js icon indicating copy to clipboard operation
csscomb.js copied to clipboard

v3.0 Sass: Indentation bug with single-line comments

Open QuentinFchx opened this issue 10 years ago • 3 comments

On SASS indented files, some single-line comments are extra-indented by csscomb. It seems to take the indentation of the previous rule into account. Can we do something here, or shall I use multi-line comments that do not seem to be impacted ?

Initial snippet

.bold
   font-weight: bold

//------------------------------------//
//     Open Sans                      //
//------------------------------------//

@import url(//fonts.googleapis.com/css?family=Open+Sans:400italic,400,600)

After running csscomb

.bold
  font-weight: bold

  //------------------------------------//
//     Open Sans                      //
//------------------------------------//

@import url(//fonts.googleapis.com/css?family=Open+Sans:400italic,400,600)

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

QuentinFchx avatar Jun 17 '14 12:06 QuentinFchx

Any news on this one ? :)

QuentinFchx avatar Sep 02 '14 16:09 QuentinFchx

I confirm that strange behavior.

It seems to happen sometimes with css-comment-blocks too

ArmorDarks avatar Sep 09 '14 14:09 ArmorDarks

Latest gpe doesn't parse @import url(//fonts.googleapis.com/css?family=Open+Sans:400italic,400,600) as sass or scss.

jdalton avatar May 06 '19 07:05 jdalton