vueform / slider

Vue 3 slider component with multihandles, tooltips merging and formatting (+Tailwind CSS support).

Home Page:https://vueform.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PostCSS loader exceptions coming from calc rules

andosteinmetz opened this issue · comments

I encountered a series of build errors when I included <style src="@vueform/slider/themes/default.css"></style> in a Nuxtjs project using PostCSS loader.

The exception was thrown by PostCSS loader, and coming from CSS rules like this one:
right:calc(var(--slider-tooltip-arrow-size, 5px)*-2);

I believe the issue is the - character next to another character without any whitespace to distinguish a negative number from subtraction:
https://developer.mozilla.org/en-US/docs/Web/CSS/calc()#notes

I was able to fix the issue by changing the above line and those similar to it like so:
right:calc(var(--slider-tooltip-arrow-size, 5px) * -2) to distinguish -2 from - 2.

I imagine this problem is introduced during minification?

I've put the negative multipliers into brackets, let's see if that solves the problem. Feel free to reopen if not and I'll look into further.