css

For all your CSS related content...
wilkerlucio 2017-10-02T10:56:00.000033Z

@noprompt is there a way to create css @keyframes with garden?

wilkerlucio 2017-10-02T13:22:16.000680Z

found the answer 🙂 garden.stylesheet/at-keyframes

noprompt 2017-10-02T17:07:38.000382Z

@wilkerlucio this is something that needs to be in the README and i apologize for it not being there.

noprompt 2017-10-02T17:07:39.000539Z

(require '[garden.def :refer [defrule defkeyframes]])

(defkeyframes pulse
  [:from
   {:opacity 0}]

  [:to
   {:opacity 1}])

(css {:vendors ["webkit"]
      :output-to "foo.css"}

  ;; Include our keyframes
  pulse

  [:h1
   ;; Notice we don't need to quote pulse.
   ^:prefix {:animation [[pulse "2s" :infinite :alternate]]}])

noprompt 2017-10-02T17:08:09.000670Z

@keyframes pulse {

  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }

}

@-webkit-keyframes pulse {

  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }

}

h1 {
  -webkit-animation: pulse 2s infinite alternate;
  animation: pulse 2s infinite alternate;
}

🙂 1
wilkerlucio 2017-10-02T17:10:43.000020Z

thanks, I found it on a changelog, garden is really awesome 🙂

wilkerlucio 2017-10-02T17:11:29.000199Z

I like the inline version better, I'm using with Fulcro, so I can make localized animations per component, the combo of Fulcro + Garden for CSS is the best way to handle css for react components that I found so far