infiniteloop
infiniteloop

Reputation: 2212

Preparing existing CSS code for use with SCSS/Compass

I'm new to SASS and Compass. I want to know if it's pragmatic to use them when modifying (heavily) existing CSS templates. If so, is there any markup I can apply to the existing CSS files to make them SASS/Compass friendly?

Thanks!

Upvotes: 3

Views: 302

Answers (1)

Oleg
Oleg

Reputation: 24988

You have to remember that valid css could be used unmodified in .sass files, meaning that you could make your existing styles into sass files and optimize on your own schedule!

I'd suggest converting repeated values into variables first, than moving to replacing repeating code with mixins etc.

If you're using version control for the project (which I hope you are), I'd strongly advise you against making changes to styles and refactoring their structure in a single transaction. Ideally any heavy reorganizing (purely in terms of sectioning etc. or massive reformatting of indentation) would be done on its own, with future changes individually tracked. This would allow you to clearly see individual changes and regressions introduced by them if any, allowing for a more sane workflow.

On an unrelated note - if you're, for better or for worse, using Visual Studio, I'd highly recommend using a WebWorkbench plugin which takes care of sass->css compilation locally.

Upvotes: 5

Related Questions