mutian / Sublime-CSS-Format

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

Breaking code when comments share a line with uncommented code #47

Open elliottregan opened 8 years ago

elliottregan commented 8 years ago

Example:

Starting with:

.card { // IE Hacks. Hiding left/right arrows since IE8-10 don't handle backface-visibility very well :(
  .front, .back { overflow-x: hidden; }
}

when formatted to 'Compact':

.card { // IE Hacks. Hiding left/right arrows since IE8-10 don't handle backface-visibility very well:(.front, .back { overflow-x: hidden; }
}

and then back to 'Expanded':

.card {
  // IE Hacks. Hiding left/right arrows since IE8-10 don't handle backface-visibility very well:(.front, .back {
    overflow-x: hidden;
  }
}
kl23 commented 6 years ago

Besides /* comment */, I've never seen //comment is in the comment syntax specification of CSS. https://developer.mozilla.org/en-US/docs/Web/CSS/Comments

Could you please provide a reference on it?