Class: Pageflow::BackgroundImageHelper::DivWithSizeAttributes
- Includes:
- RevisionFileHelper
- Defined in:
- app/helpers/pageflow/background_image_helper.rb
Instance Attribute Summary
Attributes inherited from Div
#configuration, #options, #property_base_name
Instance Method Summary collapse
Methods included from RevisionFileHelper
Methods inherited from Div
Constructor Details
This class inherits a constructor from Pageflow::BackgroundImageHelper::Div
Instance Method Details
#data_attributes ⇒ Object
86 87 88 89 90 91 92 |
# File 'app/helpers/pageflow/background_image_helper.rb', line 86 def data_attributes if file super.merge(width: file.width, height: file.height) else super end end |
#inline_style ⇒ Object
94 95 96 97 98 99 100 |
# File 'app/helpers/pageflow/background_image_helper.rb', line 94 def inline_style if [:spanning] "padding-top: #{padding_top}%; width: 100%; background-position: 0 0" # fix me (yet disables background_position option) else super end end |