jedfoster / SassMeister

The Sass playground
http://sassmeister.com
199 stars 25 forks source link

Sass <-> SCSS conversion issue when there's an interpolation in calc #134

Closed futekov closed 9 years ago

futekov commented 9 years ago

In this gist when you try to convert from Sass to SCSS syntax the variable gets interpolated twice, this compiles successfully to CSS, but prevents the user from converting back to Sass. The same thing will happen the other way around as well when converting from SCSS to Sass.

Here's the code before conversion:

$v: 5px;

div {
  height: calc(7em + #{$v});
}

...after conversion we get 7em + #{#{$v}} inside calc.

This might be a issue for people that convert large chunks of code - the double interpolation is a bit hard to spot and may lead to other errors.

jedfoster commented 9 years ago

Hmm. I'm not able to replicate this issue with these gists. I've toggled the syntax repeatedly with no unexpected changes. Can you give it another look?

futekov commented 9 years ago

Yup, I can confirm that the issue is now gone, not sure what was causing it before.