Answer the question
In order to leave comments, you need to log in
How to set a multigradient through loop?
In CSS, I set several radial gradients for the element (in the example, two, but in general, from 1 to 4 is needed)
.element {
background: radial-gradient(25% 20px at 25% 20px, rgba(0, 0, 0, .1) 0%, transparent 100%), radial-gradient(25% 20px at 75% 20px, rgba(0, 0, 0, .1) 0%, transparent 100%);
}
.loop-shadow(@counter, @i: 1) when (@i =< @counter) {
.loop-shadow(@counter, (@i + 1));
background-image+: radial-gradient((50% / @counter) 20px at ((50% / @counter) * (2 * @i - 1)) 20px, rgba(0, 0, 0, .1) 0%, transparent 100%);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question