title: Styled components - why is animation not working?
body: <p>We failed at getting this example to work using styled components in react. </p>
  
  <p>Why is the animation not working in our code? I cannot get it to move and had to resort back to using normal css for success. Must be a simple mistake somewhere</p>
  
  <pre><code>import React from 'react'
  import styled, { keyframes } from 'styled-components'
  import './ticker.css'
  
  
  
  
  
  export default function Ticker({ text }) {
        return (&lt;div class="ticker-wrap"&gt;
          &lt;div class="ticker"&gt;
            &lt;div class="ticker__item"&gt;Letterpress chambray brunch.&lt;/div&gt;
            &lt;div class="ticker__item"&gt;Vice mlkshk crucifix beard chillwave meditation hoodie asymmetrical Helvetica.&lt;/div&gt;
            &lt;div class="ticker__item"&gt;Ugh PBR&amp;B kale chips Echo Park.&lt;/div&gt;
            &lt;div class="ticker__item"&gt;Gluten-free mumblecore chambray mixtape food truck. &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;)
      }
  
  
   @-webkit-keyframes ticker {
       0% {
      -webkit-transform: translate3d(0, 0, 0);
      transform: translate3d(0, 0, 0);
      visibility: visible;
      }
       100% {
      -webkit-transform: translate3d(-100%, 0, 0);
      transform: translate3d(-100%, 0, 0);
      }
  }
   @keyframes ticker {
       0% {
      -webkit-transform: translate3d(0, 0, 0);
      transform: translate3d(0, 0, 0);
      visibility: visible;
      }
       100% {
      -webkit-transform: translate3d(-100%, 0, 0);
      transform: translate3d(-100%, 0, 0);
      }
  }
   .ticker-wrap {
    position: fixed;
    bottom: 0;
    width: 100%;
    overflow: hidden;
    height: 4rem;
    background-color: #FDFCF8;
    padding-left: 100%;
    box-sizing: content-box;
  }
  
  .ticker-wrap .ticker {
    display: inline-block;
    height: 4rem;
    line-height: 4rem;
    white-space: nowrap;
    padding-right: 100%;
    box-sizing: content-box;
    -webkit-animation-iteration-count: infinite;
    animation-iteration-count: infinite;
    -webkit-animation-timing-function: linear;
    animation-timing-function: linear;
    -webkit-animation-name: ticker;
    animation-name: ticker;
    -webkit-animation-duration: 30s;
    animation-duration: 30s;
  }
  </code></pre>