Set css variable equal to class property
I want to set a css variable equal to the height of one of my divs.
I tried
:root{
--height-of-div: .div1.height;
}
.div2{
height: calc(--height-of-div/2);
}
But it is not working. Please help.
Set css variable equal to class property
I want to set a css variable equal to the height of one of my divs.
I tried
:root{
--height-of-div: .div1.height;
}
.div2{
height: calc(--height-of-div/2);
}
But it is not working. Please help.