Class: AnimateIt::AnimationProperty
- Inherits:
-
Data
- Object
- Data
- AnimateIt::AnimationProperty
- Defined in:
- lib/animate_it/animation.rb
Overview
----- Per-animatable property declaration ----------------------------
One CSS-driven animation slot on a data-anim="..." element. The
framework turns these into both:
1. CSS variables on the wrapper (set per frame at render time), and
2. CSS rules of the form `[data-anim="name"] { property: var(--…); }`
injected into the rendered HTML so the HAML doesn't need a `:css`
block to bind variables to selectors.
Instance Attribute Summary collapse
-
#css_property ⇒ Object
readonly
Returns the value of attribute css_property.
-
#default ⇒ Object
readonly
Returns the value of attribute default.
-
#keyframes_to_values ⇒ Object
readonly
Returns the value of attribute keyframes_to_values.
-
#unit ⇒ Object
readonly
Returns the value of attribute unit.
-
#var_suffix ⇒ Object
readonly
Returns the value of attribute var_suffix.
Instance Method Summary collapse
Instance Attribute Details
#css_property ⇒ Object (readonly)
Returns the value of attribute css_property
9 10 11 |
# File 'lib/animate_it/animation.rb', line 9 def css_property @css_property end |
#default ⇒ Object (readonly)
Returns the value of attribute default
9 10 11 |
# File 'lib/animate_it/animation.rb', line 9 def default @default end |
#keyframes_to_values ⇒ Object (readonly)
Returns the value of attribute keyframes_to_values
9 10 11 |
# File 'lib/animate_it/animation.rb', line 9 def keyframes_to_values @keyframes_to_values end |
#unit ⇒ Object (readonly)
Returns the value of attribute unit
9 10 11 |
# File 'lib/animate_it/animation.rb', line 9 def unit @unit end |
#var_suffix ⇒ Object (readonly)
Returns the value of attribute var_suffix
9 10 11 |
# File 'lib/animate_it/animation.rb', line 9 def var_suffix @var_suffix end |
Instance Method Details
#var_name(animatable_name) ⇒ Object
10 11 12 |
# File 'lib/animate_it/animation.rb', line 10 def var_name(animatable_name) "--#{animatable_name.to_s.tr("_", "-")}-#{var_suffix.to_s.tr("_", "-")}" end |