Trying to set a section height to calc(100vh - (106px)) but i get a current value of “INVALID OR UNEXPECTED TOKEN” . I get this whether or not I include quotation marks at the beginning and end of the calculation. Is there something obvious I’m doing wrong?
can you show exactly how you bind the value? It looks like there is an error in the way you are building the string. Make sure you use standard quotes "calc(100vh - 106px)"
I was expecting the current value of the calculation to return a single integer which would represent the resulting height in pixels. When I use the quotation marks in the formula, the current value says “calc(100vh-164px)”. Is that normal for weweb?
It’s completely normal, the formula is plain string that is passed on to element CSS
when you bind values you are using javascript.
calc(100vh - (106px))
it’s not valod js, that’s why you get an error.
binded values for css properties expect strings, so in your case the binded value should be like "calc(100vh - (106px))"
.
Again, mind what kind of quotes you are using, you want to use "
or '