With nuxt, if using a standalone configuration `uno.config.ts`, the class `space-{direction}-{number}` is incorrectly generated
leo91000 opened this issue · comments
I have a weird issue with unocss & nuxt & css class space-{direction}-{number}
. The class is not applied and the generated css seems wrong :
.space-y-3 > :not([hidden]) ~ :not([hidden]) > :not([hidden]) ~ :not([hidden]) {
--un-space-y-reverse: 0;
margin-bottom: calc(.75rem * var(--un-space-y-reverse));
margin-top: calc(.75rem * (1 - var(--un-space-y-reverse)))
}
The var --un-space-y-reverse
is set to 0 where it should be 3
Here a very simple stackblitz repro : https://stackblitz.com/edit/github-xishze-ftqdny?file=app.vue,uno.config.ts
If you delete presetUno()
from uno.config.ts
or define uno: false
in nuxt.config.ts
it will work. Because presetUno already enabled by default and loading it twice will cause some issues.
If you delete
presetUno()
fromuno.config.ts
or defineuno: false
innuxt.config.ts
it will work. Because presetUno already enabled by default and loading it twice will cause some issues.
Thanks, that was it !