Would it be possible for this to be updated so that it supports inline block comments?
Right now all the CSS I work with is using inline block comments, so the sorting algorithm always ends up moving them elsewhere.
For example, the code below
div.class {
height: 189px;
position: relative;
z-index: 20; /*above main and content */
margin-bottom: -6px;
}
becomes this after being sorted.
div.class {
height: 189px; /*above main and content */
margin-bottom: -6px;
position: relative;
z-index: 20;
}
The comment jumped from z-index to height because it was “above” margin-bottom so it was assumed to be a comment related to it.
A condition checking if the comment is the only text on the line would fix this I think.
So if the line above is only a comment, move it with the line below. If it isn’t, keep it with the current line.
I don’t know Python so I’m not sure if that would be hard to do or not, but hopefully it wouldn’t be too hard.
Other than that, this plugin is great! I always get annoyed with my co-workers lack of organization with things like CSS files and this saves me loads of time. Thanks for all your hard work!