sek-consulting / solid-ui

Beautifully designed components. Built with Kobalte & corvu. Styled with Tailwind CSS.
https://www.solid-ui.com
MIT License
680 stars 25 forks source link

Issue using other tailwind plugins with this library. #50

Closed ZanzyTHEbar closed 3 weeks ago

ZanzyTHEbar commented 6 months ago

I use daisyui as the styling engine for most of my projects. When implementing solid-ui into any of those projects i get this error:

[plugin:vite:css] [postcss] F:/Github/Alamanac/app/src/styles/imports.css:22:1: The `border-border` class does not exist. If `border-border` is a custom class, make sure it is defined within a `@layer` directive.

Re-ordering my imports can remove the error, but it fails to load any css located in the file that the solid-ui cli generates.

Here is a gist.

ZanzyTHEbar commented 6 months ago

Note - i took the contents of ui.presets.js and i simply added them manually (then promptly removed that extraneous file) to my tailwind.config.ts file and the issue went away. Seems that there is an issue with the method of adding the presets to tailwind that causes the issue. I can not use solid-ui and daisyui along side each other - with a lot more granularity.

sek-consulting commented 5 months ago

Hi @ZanzyTHEbar,

thanks for your feedback. I think the issue might be that the cli just overwrites/sets the tailwind config which would conflict with existing stuff.

I'll open a PR in the coming days to fix all the issues caused by the cli.

sek-consulting commented 3 months ago

Hi @ZanzyTHEbar, after thinking about the whole topic and looking at other projects (shadcn/ui, shadcn-svelte, ...) I wont add support for stuff like this to the init function of the cli. But I'll add a manual installation section to the docs, that walk you through the steps you need to do so you can run the add command afterwards.