vendredi 5 juin 2015

How to render inline css in Haml in Rails 3.2?

I have the following code in the <head> tag of a Rails haml view file. I am running Rails 3.2.11 with the haml gem version 4.0.6

:css
  body { background-color: red !important;}

Unfortunately, it is not rendering in the final html output. I tried:

%style {:style => "text/css" }
  body { background-color: red !important;}

But that doesn't render either. What am I missing?

Aucun commentaire:

Enregistrer un commentaire