module Playbook::Position
def self.included(base)
def self.included(base) base.prop :position end
def position_options
def position_options { position: "position", } end
def position_props
def position_props selected_props = position_options.keys.select { |sk| try(sk) } return nil unless selected_props.present? selected_props.map do |k| value = send(k) return nil unless position_values.include? value "position_#{value}" end.compact.join(" ") end
def position_values
def position_values %w[relative absolute fixed sticky] end