A
A
A person from Kazakhstan2019-02-03 14:36:36
WordPress
A person from Kazakhstan, 2019-02-03 14:36:36

How to perform such manipulations in sass?

We have a large number of class="item0" up to class="item400" or more .
How to execute keyframes for all these classes in sass less or other preprocessor but with different animation delay?
Purpose: shortening the css code - so as not to write for each class its own keyframes in css

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alex, 2016-07-01
@daruwanov

You need to dig in this direction https://codex.wordpress.org/Rewrite_API/add_rewrit...

S
Sergey delphinpro, 2019-02-03
@LenovoId

Why multiply keyframes at all, one is not enough?

$base-delay: 100ms;
@for $i from 0 through 400 {
  .item#{$i} {
    animation-delay: $base-delay + $i;
    animation-name: myanimation
  }
}
@keyframes myanimation { .... }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question