dimanche 30 mars 2014

SASS not preprocessed correctly


Vote count:

0




I have the following file in my vendor/assets/stylesheets/templates folder - test.css.sass. In the application.css I have added the following line in order to load it:



*= require templates/test.css.sass


The file is loaded and preprocessed correctly except in the following case:



$width: 300

.div
transform: translate3d(#{$width/5-1}px,0,0) rotate3d(0,1,0,-45deg)


I am looking for the following output:



.div {
transform: translate3d(59px, 0, 0) rotate3d(0, 1, 0, -45deg);
}


and using this nice converter for validation it seems the syntax is correct. Unfortunately, what I am getting in my application is this:



.div {
transform: translate3d(60 -1px, 0, 0) rotate3d(0, 1, 0, 90deg);
}


Could anyone tell why instead calculation, I am getting concatenation?




Details:



  • Rails 4.0.2

  • Sass 3.2.12 (Media Mark)

  • ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]

  • this code background-position: -#{($width/5)*2}px 0px is working



asked 55 secs ago

gotqn

3,436





Aucun commentaire:

Enregistrer un commentaire