Is it possible to pass dynamic values when using the css registered property?
For instance, in the code snippet below, how can I pass on the value ---numValue=35
to to{--num:}
?
@property --num {
syntax: "<integer>";
initial-value: 0;
inherits: false;
}
div {
counter-reset: num var(--num);
animation: counter 3s linear 1 forwards;
}
div::before {
content: counter(num);
}
@keyframes counter {
to {
--num: 60
}
}
<div style="--numValue:35"></div>