I am developing an SVG image of a snowman and I am trying to use variables to determine specific things. The color of the strap thing on the hat and the color of the scarf are successfully set by var(--maincolor). What I am having trouble with is var(--armangle).
<path d="..." stroke="#442200" stroke-width="2" fill="none" transform="rotate(var(--armangle))" transform-origin="32.5% 60%"/>
Why doesn't it get accepted?
I have tried:
svg{
--armangle: 20deg;
}
and
svg{
--armangle: 20;
}
but neither work at all.
Is there a way to use a variable in a function in CSS? A normal value (without deg) works (deg just gets ignored) very well.