Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostCSS loader exceptions coming from calc rules #37

Closed
andosteinmetz opened this issue Nov 24, 2021 · 1 comment
Closed

PostCSS loader exceptions coming from calc rules #37

andosteinmetz opened this issue Nov 24, 2021 · 1 comment

Comments

@andosteinmetz
Copy link

andosteinmetz commented Nov 24, 2021

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?

@adamberecz
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants