When I use the exact same calc() command in a custom css property as a standard property (left), and print it to the console in javascript, the custom property is clearly not calculating correctly like the standard property is. My code is as follows:
.note {
--qq: calc(10px + 100px);
left: calc(10px + 100px);
}
When I print these to the console using the following code:
console.log("qq = ",getComputedStyle(qqq).getPropertyValue('--qq'))
console.log("left = ",getComputedStyle(qqq).getPropertyValue('left'))
The result in the console is the following:
qq = calc(10px + 100px)
left = 110px
What am I doing wrong here?
Thanks, and best regards.
Was expecting:
qq = 110px
left = 110px