Module: DesignSystem::Helpers::CssHelper
- Included in:
- Generic::Builders::Base, Generic::FormBuilder
- Defined in:
- lib/design_system/helpers/css_helper.rb
Overview
Provides CSS helper methods
Instance Method Summary collapse
-
#css_class_options_merge(options, css_classes = []) {|css_classes| ... } ⇒ Object
This method merges the specified css_classes into the options hash.
Instance Method Details
#css_class_options_merge(options, css_classes = []) {|css_classes| ... } ⇒ Object
This method merges the specified css_classes into the options hash
9 10 11 12 13 14 15 16 17 |
# File 'lib/design_system/helpers/css_helper.rb', line 9 def (, css_classes = [], &) = .symbolize_keys css_classes += [:class].split if .include?(:class) yield(css_classes) if block_given? [:class] = css_classes.join(' ') unless css_classes.empty? raise "Multiple css class definitions: #{css_classes.inspect}" unless css_classes == css_classes.uniq end |