I can't use rails helpers within .sass files or import external libraries that belong to a gem (e.g. Bourbon)
My .sass file looks like this:
@import 'bourbon'
@import 'variables'
.text
color: $my_color_1
background-color: $my_color_2
background-image: image-url('email/email_bg_blue.jpg')
@include inline_block
The external library is not that important (I need it because I include some mixins in my _variables.css.sass file) - this can be fixed by a refactor in my code
But the important part is being able to use Rails' asset helpers like image-url because we use cloud asset hosting and can't hard-code the path to the image background in the .sass file.
I can't use rails helpers within .sass files or import external libraries that belong to a gem (e.g. Bourbon)
My .sass file looks like this:
The external library is not that important (I need it because I include some mixins in my
_variables.css.sassfile) - this can be fixed by a refactor in my codeBut the important part is being able to use Rails' asset helpers like
image-urlbecause we use cloud asset hosting and can't hard-code the path to the image background in the .sass file.