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

Stylelint ParserError when not using calc() in min #256

Open
daveykropf opened this issue Dec 1, 2023 · 1 comment
Open

Stylelint ParserError when not using calc() in min #256

daveykropf opened this issue Dec 1, 2023 · 1 comment

Comments

@daveykropf
Copy link
Contributor

De stylelint gaat kapot wanneer je het volgende doet:

:root {
  --container-padding: min(5vw, 2.5vw + 24px);
}
ParserError: Syntax Error at line: 1, column 16 at Parser.error (/Volumes/Development/project-x/node_modules/postcss-values-parser/lib/parser.js:127:11) at Parser.operator (/Volumes/Development/project-x/node_modules/postcss-values-parser/lib/parser.js:183:18) at Parser.parseTokens (/Volumes/Development/project-x/node_modules/postcss-values-parser/lib/parser.js:245:14) at Parser.loop (/Volumes/Development/project-x/node_modules/postcss-values-parser/lib/parser.js:132:12) at Parser.parse (/Volumes/Development/project-x/node_modules/postcss-values-parser/lib/parser.js:51:17) at parse (/Volumes/Development/project-x/node_modules/postcss-custom-properties/index.cjs.js:47:30) at /Volumes/Development/project-x/node_modules/postcss-custom-properties/index.cjs.js:73:42 at Array.forEach (<anonymous>) at /Volumes/Development/project-x/node_modules/postcss-custom-properties/index.cjs.js:69:26 at Array.forEach (<anonymous>)

Wanneer je min(5vw, calc(2.5vw + 24px)); doet werkt het wel, maar de calc functie zou niet nodig moeten zijn.

https://web.dev/articles/min-max-clamp#background

@EECOLOR
Copy link
Member

EECOLOR commented Dec 9, 2023

Wordt veroorzaakt door een oude versie van postcss-values-parser, die wordt echter door een aantal libraries gebruikt. Waarschijnlijk is dit opgelost wanneer we het hele postcss gebeuren updaten. Kijk ik niet echt naar uit, vorige keer was dat best wel wat gedoe.

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