Sha256: 82d769c2434566a0018ef9829ca7c238abcdd14948b7fe107c6ca86878cc8868

Contents?: true

Size: 930 Bytes

Versions: 21

Compression:

Stored size: 930 Bytes

Contents

+keyframes(noise-anim)
  $steps: 20
  @for $i from 0 through $steps
    #{percentage($i * 1 / $steps)}
      clip: rect(random(100) + px, 9999px, random(100) + px, 0)
+keyframes(noise-anim-2)
  $steps: 20
  @for $i from 0 through $steps
    #{percentage($i * 1 / $steps)}
      clip: rect(random(100) + px, 9999px, random(100) + px, 0)

=glitch($cl: white, $bg-col: black)
  position: relative
  overflow: hidden
  display: inline-block
  color: $cl
  &:after,
  &:before
    content: attr(data-text)
    color: $cl
    background-color: $bg-col
    overflow: hidden
    clip: rect(0, 900px, 0, 0)
  &:after
    +position(absolute, left 1px, top 0)
    +rem('text-shadow', -1px 0 0 rgba(red, 0.4))
    +animation(noise-anim 2s infinite linear alternate-reverse)
  &:before
    +position(absolute, left -1px, top 0)
    +rem('text-shadow', 1px 0 0 rgba(blue, 0.4))
    +animation(noise-anim-2 3s infinite linear alternate-reverse)

Version data entries

21 entries across 21 versions & 3 rubygems

Version Path
oulu-0.9.4 app/assets/stylesheets/options/glitch/_glitch.sass
oulu-0.9.3 app/assets/stylesheets/options/glitch/_glitch.sass
oulu-0.9.2 app/assets/stylesheets/options/glitch/_glitch.sass
oulu-0.9.1 app/assets/stylesheets/options/glitch/_glitch.sass
oulu-0.9.0 app/assets/stylesheets/options/glitch/_glitch.sass
oulu-rails-0.8.4 vendor/assets/stylesheets/options/glitch/_glitch.sass
oulu-rails-0.8.3 vendor/assets/stylesheets/options/glitch/_glitch.sass
oulu-0.8.3 app/assets/stylesheets/options/glitch/_glitch.sass
oulu-0.8.2 app/assets/stylesheets/options/glitch/_glitch.sass
middleman-oulu-0.8.0 assets/stylesheets/options/glitch/_glitch.sass
oulu-rails-0.8.0 vendor/assets/stylesheets/options/glitch/_glitch.sass
middleman-oulu-0.7.7 assets/stylesheets/options/glitch/_glitch.sass
oulu-rails-0.7.6 vendor/assets/stylesheets/options/glitch/_glitch.sass
oulu-rails-0.7.5 vendor/assets/stylesheets/options/glitch/_glitch.sass
oulu-rails-0.7.4 vendor/assets/stylesheets/options/glitch/_glitch.sass
oulu-rails-0.7.3 vendor/assets/stylesheets/options/glitch/_glitch.sass
middleman-oulu-0.7.6 assets/stylesheets/options/glitch/_glitch.sass
middleman-oulu-0.7.4 assets/stylesheets/options/glitch/_glitch.sass
middleman-oulu-0.7.3 assets/stylesheets/options/glitch/_glitch.sass
middleman-oulu-0.7.2 assets/stylesheets/options/glitch/_glitch.sass