Closed
Description
thanks @evilebottnawi for redirection. #816
I'm encountering an issues while using calc() with CSS Custom variables where presets automatically remove my nested calc while custom variables is unable to resolve in build time.
Given that:
body {
top: calc(100% - calc(10px + 10px));
}
/* will compile to*/
body {
top: calc(100% - 20px);
}
when it comes to a css variables
body {
top: calc(var(--pic-height) - calc(var(--width-height) + var(--border-gap)));
}
/* will compile to*/
body {
top: calc(var(--pic-height) - var(--width-height) + var(--border-gap));
}
which is incorrect in mathematical stand points. To solve this problem, I end up by setting calc preset to false in plugin options.
Is there any possible to omit any clearing unintended nested calc while encountering css variable or if there is any better solution while dealing with variables value?