When I copy/paste some CSS or Scss into my .sass using projects it's annoying to have to clean up all the extra syntax. I've got this bit of regex on hand in Vim that makes it much easier.
Or, if you want to nuke new lines after a closing
} as well you can use:
Here's the regex as a simple railroad diagram (via regexplained).
This is not a “true” conversion from CSS to Sass, but at least it gets all the extra syntax out of the way so you can start moving stuff around!
By the way, I have nothing against
.css, I just prefer