Without specifying a background-size, in this case "background-size: 370% 370%;", the changing linear gradient animation does not work.
For some reason, the background-size also only works when declared as important (ex: background-size: 370% 370% !important;)
I've tried removing the background-size but then the animation isn't visible.
.bg {
height: 100vh;
background-size: 370% 370% !important;
animation: bggradient 30s ease-in-out infinite;
background: linear-gradient(to right, #ff9966, #ff5e62, #ff9966, #ff5e62);
}
@keyframes bggradient {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
<div class="bg"></div>
I would expect to see an animation without specifying the background-size. I also would expect to use the background-size without having to set it to important.