10
私は一連のクラス、.module1、.module2、... module(n)が必要です。HAML CSS内でルビ変数を補間できますか?
私もCSS、RubyとHAMLを使用してこれらのクラスを定義したい:
:css
.mod1 {
background-image: url("#{extra.image}");
}
それは作業を保存するためにRubyの変数を補間することは可能ですか?
.module.mod"#{extra.id}"
%h3 #{extra.title}
%p #{extra.description}
%a.btn-default{:href => "#", :target => "_top"} enter now
:css
.mod#{extra.id} {
background-image: url("#{extra.image}");
}