我想知道,我们可以在 Rails 视图中使用 scss,例如
/views/home/home_stylesheet.css.scss.erb
$gray-medium-light : #eaeaea;
background: $gray-medium-light;
我尝试更改路径格式
<%= stylesheet_link_tag(about_me_user_path(current_user, format: :scss), media: 'all', class: "home_about_me_css") %>
也在路线中
get 'user_profile_stylesheet/:id' => 'users#user_profile_stylesheet', as: :user_profile_stylesheet, :defaults => { :format => 'scss' }
但是 rails 似乎只是将格式转换回css
.
我们可以使用sass-rails
gem 以某种方式做到这一点吗?
谢谢。
编辑我用谷歌搜索了这个,没有任何结果。