Sha256: fd20055bab00c7e15987a7eeca23cba575659c8370086231658e7e15ff656218

Contents?: true

Size: 1.04 KB

Versions: 2

Compression:

Stored size: 1.04 KB

Contents

@mixin create_keyframes_animation($name, $left_percent, $center_percent, $right_precent, $scale)
  +keyframes($name)
    0%
      transform: scale(1)
    #{$left_percent}%
      transform: scale(1)
    #{$center_percent}%
      transform: scale($scale)
    #{$right_precent}%
      transform: scale(1)
    100%
      transform: scale(1)

@mixin keyframes($name)
  @keyframes "#{$name}"
    @content

@mixin add_animation_on_sharing_button($animation_name, $index, $speed)
  & .sharing_tags-buttons__item
    &:nth-child(#{$index})
      a
        animation: $animation_name #{$speed}s infinite

@mixin create_wave_animation_on_sharing_buttons($count_of_buttons, $speed:2, $scale: 1.4)
  $step: 100 / $count_of_buttons
  $half_step: $step / 2
  @for $i from 1 through $count_of_buttons
    $right: $i*$step
    $center: $right - $half_step
    $left: $center - $half_step

    $animation_name: '#{&}-animate__button#{$i}'
    +create_keyframes_animation($animation_name, $left, $center, $right, $scale)
    +add_animation_on_sharing_button($animation_name, $i, $speed)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sharing_tags-0.0.13 app/assets/stylesheets/sharing_tags/wave_animation.css.sass
sharing_tags-0.0.12 app/assets/stylesheets/sharing_tags/wave_animation.css.sass