Sass string evaluation. Is it possible?

In Sass, I have a string for example 1px + 1px

. Can I evaluate this line using Sass to get a 2px result?

+3


source to share


1 answer


Do you have an actual string?

how in $foo: "1px + 1px";



because no, in Sass you can't do anything like this, but you can just add the numbers together, so it 10px + 100px

will equal 110px

See this pen: http://codepen.io/anon/pen/MwEgrX

0


source







All Articles