Sha256: e8025875b50c05e66bbf47411eae9fc5163d46088c76b55366b3c36729fc0e38
Contents?: true
Size: 1.07 KB
Versions: 1068
Compression:
Stored size: 1.07 KB
Contents
# frozen_string_literal: true module Playbook module JustifyContent def self.included(base) base.prop :justify_content end # rubocop:disable Style/IfInsideElse def justify_content_props selected_props = justify_content_options.keys.select { |sk| try(sk) } return nil unless selected_props.present? selected_props.map do |k| justify_content_value = send(k) if justify_content_value.is_a?(Hash) justify_content_value.map do |media_size, justify_value| "justify_content_#{media_size}_#{justify_value.underscore}" if justify_content_values.include? justify_value end else "justify_content_#{justify_content_value.underscore}" if justify_content_values.include? justify_content_value end end.compact.join(" ") end # rubocop:enable Style/IfInsideElse def justify_content_options { justify_content: "justify_content", } end def justify_content_values %w[start end center spaceBetween spaceAround spaceEvenly] end end end
Version data entries
1,068 entries across 1,068 versions & 1 rubygems