csscomb / sublime-csscomb

Sublime plugin for CSScomb—CSS coding style formatter
398 stars 61 forks source link

Sorting attributes removes indentation and adds linebreak #21

Closed Jarrydcrawford closed 10 years ago

Jarrydcrawford commented 10 years ago

I've recently restarted my computer and I'm assuming that CSScomb was updated along with restarting ST3. Sorting my SCSS results in weird behaviour where selecting the attributes I want to sort (either by mouse or Ctrl + Shift + J), and then sorting the attributes (Ctrl + Shift + C) below the first line loses indentation, and a new line is added to the end. Looks like it's not sorting either. Trying to sort vanilla CSS in the same method results in an error.

Package: csscomb-list

Original:

#featured-blog {
    .blog-title {
        margin: 0;
        line-height: 1;
        font-size: 40px;
        color: $brand-primary;
    }
    ...
}

Pre-update:

#featured-blog {
    .blog-title {
        margin: 0;
        color: $brand-primary;
        font-size: 40px;
        line-height: 1;
    }
    ...
}

Post-update:

#featured-blog {
    .blog-title {
        margin: 0;
line-height: 1;
font-size: 40px;
color: $brand-primary;

    }
    ...

Sorting vanilla CSS:

.test {
    color: #000;
    font-size: 12px;
    height: 100px;
    width: 100px;
}

st3-csscomb-error

tonyganch commented 10 years ago

@Jarrydcrawford, php version of the plugin has been removed from Package Control today and replaced with the latest js version. Sorting of a block does not work right now, this is a known bug: https://github.com/csscomb/csscomb.js/issues/177 Here is a related issue: https://github.com/csscomb/sublime-csscomb/issues/5

You can either wait for it to be fixed or install the deprecated plugin from GitHub: https://github.com/csscomb/csscomb-for-sublime But please note that support for php version is dropped.

Jarrydcrawford commented 10 years ago

Alright, thank you!