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

mini preset: Custom CSS Variable generation changed in v0.49.1 #2132

Closed
samydoesit opened this issue Jan 30, 2023 · 1 comment · Fixed by #2133
Closed

mini preset: Custom CSS Variable generation changed in v0.49.1 #2132

samydoesit opened this issue Jan 30, 2023 · 1 comment · Fixed by #2133

Comments

@samydoesit
Copy link

samydoesit commented Jan 30, 2023

Hello some of our tests are failing because some custom variables are wrong generated as "--v" instead of some other name.

shortcuts: [
   ['testString', `selector-[.test]:([--min-width:20px] [--col-gap:20px] [--content-min-width:calc(var(--min-width)_-_2_*_var(--col-gap))])`]
],
--- .test{--min-width:20px;--col-gap:20px;--content-min-width:calc(var(--min-width) - 2 * var(--col-gap));}
+++ .test{--min-width:20px;--col-gap:20px;--content-min-width:calc(var(--min-width) - 2 * var(--v));}

This could be introduced in relation to v.0.49.1 with this change: : #2115

Here is a Sample: UnoCSS Playground

This has worked until 0.49.0. Is there anything wrong how we generate the variables? We could also move this to preflights.

@samydoesit samydoesit changed the title Custom CSS Variable generation changed in v0.49.1 mini preset: Custom CSS Variable generation changed in v0.49.1 Jan 30, 2023
@AaronBeaudoin
Copy link

AaronBeaudoin commented Jan 31, 2023

I'm experiencing this issue as well. In my case, a class pb-[calc(var(--cy)+var(--cx))] is generated as:

padding-bottom: calc(var(--cy) + var(--v));

For now I've downgraded back to 0.48.5.

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

Successfully merging a pull request may close this issue.

2 participants