Sha256: 53e9bc746c5248c1b49db437d587144d3bb3e5e8bb4c494e438a5c7dbd28531a

Contents?: true

Size: 703 Bytes

Versions: 12

Compression:

Stored size: 703 Bytes

Contents

# used used by the grid, content and card erbs
module Coprl::Presenters::WebClient::Helpers
  module PaddingHelpers
    def _padding_array_(padding, nesting=0)
      return (%i(top0 right0 bottom0 left0) - padding.map {|p| "#{p.to_s.gsub(%r(\d),'')}0".to_sym} + padding.map(&:to_sym)).sort if padding
      nesting > 1 ? %i(top3 right0 bottom3 left0).sort : []
    end

    def _padding?(padding, nesting=0)
      _padding_array_(padding, nesting) != %i(top0 right0 bottom0 left0).sort
    end

    def _padding_classes_(padding, nesting=0)
      "v-padding-#{_padding_array_(padding, nesting).join('-')}"
    end

    def _alignment_class_(align)
      "v-grid-column-align-#{align}"
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
coprl-3.0.0.beta.12 lib/coprl/presenters/web_client/helpers/padding_helpers.rb
coprl-3.0.0.beta.11 lib/coprl/presenters/web_client/helpers/padding_helpers.rb
coprl-3.0.0.beta.10 lib/coprl/presenters/web_client/helpers/padding_helpers.rb
coprl-3.0.0.beta.9 lib/coprl/presenters/web_client/helpers/padding_helpers.rb
coprl-3.0.0.beta.8 lib/coprl/presenters/web_client/helpers/padding_helpers.rb
coprl-3.0.0.beta.7 lib/coprl/presenters/web_client/helpers/padding_helpers.rb
coprl-3.0.0.beta.6 lib/coprl/presenters/web_client/helpers/padding_helpers.rb
coprl-3.0.0.beta.5 lib/coprl/presenters/web_client/helpers/padding_helpers.rb
coprl-3.0.0.beta.4 lib/coprl/presenters/web_client/helpers/padding_helpers.rb
coprl-3.0.0.beta.3 lib/coprl/presenters/web_client/helpers/padding_helpers.rb
coprl-3.0.0.beta.2 lib/coprl/presenters/web_client/helpers/padding_helpers.rb
coprl-3.0.0.beta.1 lib/coprl/presenters/web_client/helpers/padding_helpers.rb