Sha256: ae889ba3f2a5d2ca5e5db74b4c369fbe50bf600b8a2f94cf1ec82a0c4d04cb6c
Contents?: true
Size: 748 Bytes
Versions: 590
Compression:
Stored size: 748 Bytes
Contents
# frozen_string_literal: true module Playbook module Overflow def self.included(base) base.prop :overflow base.prop :overflow_x base.prop :overflow_y end def overflow_values %w[visible hidden scroll auto] end def overflow_options { overflow: "overflow", overflow_x: "overflow_x", overflow_y: "overflow_y", } end def overflow_props selected_props = overflow_options.keys.select { |sk| try(sk) } return nil unless selected_props.present? selected_props.map do |k| overflow_value = send(k) "#{overflow_options[k]}_#{overflow_value}" if overflow_values.include? overflow_value end.compact.join(" ") end end end
Version data entries
590 entries across 590 versions & 1 rubygems