I got this CSS code:
<style>
div.indexCount {
animation: counter 15s alternate ease-in-out;
animation-fill-mode: forwards;
counter-reset: num var(--num);
}
div.indexCount::after {
content: counter(num);
display: none;
}
@property --num {
syntax: '<number>';
}
@keyframes counter {
from {
--num: 0;
}
to {
--num: 100000000000;
}
}
</style>
Which was supposed to allow me to have a nice counter animation from 0
to 100000000000
.
Instead, it is going from 0
to only 2147483647
.
Sounds to me like I've reached the limit of the number
variable using CSS, or am I not? I thought it was the limits of Integers
, not Number
. I can't find anything in the specifications - is there a way to circumvent that ?
EDIT: To the people saying it's a duplicate, I have another usage, it's not about z-index
, but about a CSS variable property. I want to find a way to circumvent my issue, please do not tag it as a duplicate gain.