3

I'm using premailer-rails gem for a newsletter e-mail which is responsive. The gem is removing media queries that are within my .scss file by default. Premailer comes with an option that works only on style tags data_premailer => ignore, which leaves the style tag untouched.

I'd like to set this attribute while using the :scss filter in haml:

:scss // <- can I add an attribute here?

I went through the haml docs with no success, I also tried:

 :scss, data_premailer: "ignore"
 :scss{ data_premailer: "ignore" }
Emil A.
  • 3,387
  • 4
  • 29
  • 46
  • 2
    http://stackoverflow.com/questions/21450524/specify-options-for-a-filter-in-ruby-haml – bigsolom Sep 06 '15 at 10:25
  • 1
    Possible duplicate of [Specify options for a filter in ruby HAML](https://stackoverflow.com/questions/21450524/specify-options-for-a-filter-in-ruby-haml) – Eyeslandic Aug 13 '19 at 11:59

1 Answers1

1

You use plain filter inside css

%style{"data-premailer" => "ignore"}
  :plain
    @media only screen and (max-width: 480px) {
    }