Class: BulmaX::Columns::Column
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- BulmaX::Columns::Column
- Defined in:
- lib/bulma_x/columns.rb
Constant Summary collapse
- PROPORTIONS =
%w[three-quarters two-thirds half one-third one-quarter full four-fifths three-fifths two-fifths one-fifth].freeze
- SPANS =
(1..12).to_a.freeze
Constants inherited from BaseComponent
BaseComponent::BLANK_VALUES, BaseComponent::BOOLEAN, BaseComponent::COLORS, BaseComponent::COLOR_MODIFIER, BaseComponent::COLOR_PALETTE, BaseComponent::MODIFIERS, BaseComponent::MODIFIERS_DECLINED, BaseComponent::MODIFIERS_PALETTE
Constants included from Shared::SpacingOptions
Shared::SpacingOptions::VALID_SPACING_KEYS, Shared::SpacingOptions::VALID_SPACING_VALUES
Instance Method Summary collapse
-
#root_classes ⇒ Object
rubocop:disable Metrics/PerceivedComplexity, Metrics/CyclomaticComplexity.
Methods inherited from BaseComponent
#after_template, #attributes, #base_attributes, #base_classes, #before_template, #classes, #compact_blank, #css, #initialize, #render_root, #view_template
Methods included from Shared::AriaOptions
Methods included from Shared::GlobalOptions
#global_attributes, #global_classes, included
Methods included from Shared::DataOptions
Methods included from Shared::FlexOptions
Methods included from Shared::SpacingOptions
Methods included from Shared::TextOptions
Methods included from BulmaX::ComponentDsl
Constructor Details
This class inherits a constructor from BulmaX::BaseComponent
Instance Method Details
#root_classes ⇒ Object
rubocop:disable Metrics/PerceivedComplexity, Metrics/CyclomaticComplexity
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/bulma_x/columns.rb', line 44 def root_classes super + [ 'column', @proportion && "is-#{@proportion}", @proportion_mobile && "is-#{@proportion_mobile}-mobile", @proportion_tablet && "is-#{@proportion_tablet}-tablet", @proportion_desktop && "is-#{@proportion_desktop}-desktop", @proportion_widescreen && "is-#{@proportion_widescreen}-widescreen", @proportion_fullhd && "is-#{@proportion_fullhd}-fullhd", @span && "is-#{@span}", @offset && "is-offset-#{@offset}", @narrow && (@narrow == :always ? 'is-narrow' : "is-narrow-#{@narrow}") ] end |