I need to pass some data to a component to be used in CSS calculations. These calculations will depend upon breakpoints as well. It isn't working and I believe that the issue is that I don't know where to place the "px".
React Side
<MainMenu className={styles.mainMenu} myVar={ref1.current.clientHeight - ref2.current.clientHeight/>
CSS Side
.mainMenu {
@include breakpoint(xlarge) {
margin-top: var(--myVar)px;
height: calc(100vh - var(--myVar)px);
}
@include breakpoint(small) {
margin-top: var(--myVar - 47)px;
height: calc(100vh - var(--myVar - 47)px);
}
}