Doesn't work correctly inside calc
bogdanbeniaminb opened this issue · comments
When using a CSS variable inside calc, it replaces it incorrectly and this throws an error in IE (unspecified error), because it tries to apply a wrong value.
If we have
top: calc(var(--menu-space, 0) + 10px);
then it tries to apply the following:
style['top'] = "calc(0) + 10px";
It breaks the paranthesis and thus applies an incorrect value.
Hi bogdanbeniaminb
Thank you for your feedback.
I found the issue, it works now, with my new update!
Thanks a lot, @nuxodin .
Any chance you could also increase the version number, so that it gets updated to NPM as well?
Thank you!
Yes, for sure, its there now.
Just a friendly note:
Please consider voting for this solution at Stackoverflow if you like my polyfill.
https://stackoverflow.com/a/57000437/4865307 and
https://stackoverflow.com/a/56830621/4865307 and
https://stackoverflow.com/a/57000620/4865307