如何在Sass中使用Ruby/Rails变量?

时间:2023-01-23 20:44:41

Is there a way to use variables from my Ruby application inside a Sass file?

有办法在Sass文件中使用来自Ruby应用程序的变量吗?

1 个解决方案

#1


26  

You can add .erb extention to your .sass file and then add your variables just like in regular .erb file:

您可以将.erb扩展添加到.sass文件中,然后像普通的.erb文件一样添加变量:

<%= APP_CONFIG[:yourkey] %>

More information:

更多信息:

#1


26  

You can add .erb extention to your .sass file and then add your variables just like in regular .erb file:

您可以将.erb扩展添加到.sass文件中,然后像普通的.erb文件一样添加变量:

<%= APP_CONFIG[:yourkey] %>

More information:

更多信息: