I have the following css on a series of elements.
#foo-parent {
--rotation: 45deg;
}
@media (max-width: 1680px) {
.foo {
--multiplier: 8.33;
}
}
/* a number of other nearly identical media queries defining different values for --multiplier */
.foo {
transform: scale(calc(var(--multiplier) / 25)) rotate(calc(0deg - var(--rotation)))!important;
}
The rotation transform is working fine, but the scaling isn't kicking in. If I change it to
transform: scale(.222) rotate(calc(0deg - var(--rotation)))!important;
...it works.
Edit: from further testing, if I take out either half, each one works separately:
transform: scale(calc(var(--multiplier) / 25))!important;
transform: rotate(calc(0deg - var(--rotation)))!important;
It's only failing when both css variable bits are present:
transform: scale(calc(var(--multiplier) / 25)) rotate(calc(0deg - var(--rotation)))!important;
So, is there a limit that only css variable can be used, or is there something else I'm missing?