Module: Pageflow::MediaQueryHelper

Defined in:
app/helpers/pageflow/media_query_helper.rb

Instance Method Summary collapse

Instance Method Details

#media_query(condition, &block) ⇒ Object


3
4
5
6
7
8
9
10
11
# File 'app/helpers/pageflow/media_query_helper.rb', line 3

def media_query(condition, &block)
  content = capture(&block)

  if condition == :default
    content
  else
    "@media screen and (#{condition}) {\n#{content}}".html_safe
  end
end