This question is a bit outdated, but in the spirit of maintaining relevance:
The current version of SASS (3.4.22) does a pretty good job just to change what it needs. If what you wrote is valid CSS, it should be output as is.
The only time you should see that SASS is changing your styles is if you did something similar to how it should be changed. Based on their documentation, it will look like this:
- Nested Styles
- String concatenation
- Using interpolation
left: calc(50% - #{$variable})
- Using Variables
- Using
@extend
or embedding @include
In most other situations, in my experience, SASS will happily spit out everything you wrote.
If you need to infer that SASS insists on parsing when it is not needed, you can wrap the fragment in quotation marks and remove them using the unquote
function:
$family: unquote("Droid+Sans"); @import url("http://fonts.googleapis.com/css?family=#{$family}");
which compiles to
@import url("http://fonts.googleapis.com/css?family=Droid+Sans");
source share