adobe / brackets

An open source code editor for the web, written in JavaScript, HTML and CSS.
http://brackets.io
MIT License
33.27k stars 7.63k forks source link

CSS properties don't get saved in the same order they are written and saved. #11879

Closed 1951FDG closed 8 years ago

1951FDG commented 8 years ago

For example:

Imagine there is a CSS file with the selector below. The CSS file is saved.

.card .dimmable.image .imga,
.card .dimmable.image .imgb,
.card .dimmable.image .imgcs {
  background-position: 50% 20%;
  background-repeat: no-repeat;
  border-radius: inherit;
}

Then edit the CSS file in Brackets, in this case I moved the border-radius property from the bottom to the top.

.card .dimmable.image .imga,
.card .dimmable.image .imgb,
.card .dimmable.image .imgcs {
  border-radius: inherit;
  background-position: 50% 20%;
  background-repeat: no-repeat;
}

I save the CSS file in Brackets, open the file in another editor, and I notice that that the above changes have not been made to the CSS file. It seems as if Brackets is intelligently not writing to the the file or prefers its own selector ordering. I can't find any documentation on this, hope someone knows what is going on and how to turn off this behaviour.

petetnt commented 8 years ago

Do you have any extensions installed?

1951FDG commented 8 years ago

No, no extenions installed. I tested this by temporarily removing all extenions to the "disabled" folder and rebooting Brackets. Using Mac OS X 10.6.8

petetnt commented 8 years ago

Are you running any postprocesses (Grunt, Gulp, PostCSS...)? Is Brackets actually saving the file in general?

1951FDG commented 8 years ago

Thanks for your help. I was running Brunch, the "brunch w -s" command. The culprit was https://github.com/garetht/csscomb-brunch, which affects source files upon saving. Issue can be closed.

abose commented 8 years ago

Closing as extension problem.