Sha256: bde62aeedadc123949bf7fcde1e88626d4d2372f43c960dc2100046370cc4404

Contents?: true

Size: 595 Bytes

Versions: 5

Compression:

Stored size: 595 Bytes

Contents

module Archetype::Functions::CSS

  private

  #
  # extrapolates shorthand value for `animation` property
  #
  def self.extrapolate_shorthand_animation(styles)
    # make sure we have enough info to continue
    return nil if styles.nil? or styles[:name].nil?
    shorthand = []
    shorthand << styles[:name]
    %w(duration timing-function delay iteration-count direction fill-mode play-state).each do |k|
      shorthand << (styles[normalize_property_key(k, 'animation')] || default("animation-#{k}")).to_a.first
    end
    return Sass::Script::Value::List.new(shorthand, :space)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
archetype-1.0.0.alpha.5 lib/archetype/functions/css/shorthands/animation.rb
archetype-1.0.0.alpha.4 lib/archetype/functions/css/shorthands/animation.rb
archetype-1.0.0.alpha.3 lib/archetype/functions/css/shorthands/animation.rb
archetype-1.0.0.alpha.2 lib/archetype/functions/css/shorthands/animation.rb
archetype-1.0.0.alpha.1 lib/archetype/functions/css/shorthands/animation.rb