Sublime-CSS-Format icon indicating copy to clipboard operation
Sublime-CSS-Format copied to clipboard

Breaking code when comments share a line with uncommented code

Open elliottregan opened this issue 8 years ago • 1 comments

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;
  }
}

elliottregan avatar Mar 17 '16 19:03 elliottregan

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?

kl23 avatar Jul 21 '18 12:07 kl23