Can I use classes to change CSS variables in SCSS file? it works but I want to know if it's the right way to do it:
.header {
--transform: translate(-50%, 0);
transform: var(--transform);
&--hide {
--transform: translate(-50%, -84px);
}
&--show {
--transform: translate(-50%, 0);
}
}
// instead of this:
.header {
transform: translate(-50%, 0);
&--hide {
transform: translate(-50%, -84px);
}
&--show {
transform: translate(-50%, 0);
}
}