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

Bug: Darkmode broken when setup along other Tailwind-based libraries #14

Open
heshdotcc opened this issue Dec 27, 2023 · 4 comments
Open

Comments

@heshdotcc
Copy link

Context

I'm using shadcn-svelte as a tailwind-based UI library, which curiously depends on BitsUI, a library from the same creator of the MeltUI, which paradoxically novel-svelte also depends on.

Issue

After importing novel-svelte Editor in a SvelteKit page, it overrides dark theme behavior by mixing colors; meanwhile, Vite throws a Tailwind warning that complains about CSS nesting. I tried setting @tailwindcss/nesting or postcss-nesting in the main Tailwind configuration file. The dark theme shows ugly and broken, as well as other styles from BitsUI-derived shadcn-svelte library components.

Solution

My partial fix was trimming specific rules of your compiled Tailwind configuration file, which did the trick, with the cons of leaving out small parts of the slash widget broken in the dark mode.

Can we agree on finding a way to combat svelte-novel with any Tailwind-based component library?

If so, I will gladly help find a more definitive solution.

Thanks for such a fantastic project! Regards,

@TGlide
Copy link
Owner

TGlide commented Dec 27, 2023

I'm using shadcn-svelte as a tailwind-based UI library, which curiously depends on BitsUI, a library from the same creator of the MeltUI, which paradoxically novel-svelte also depends on.

Hah! This made me giggle 😄 BTW, I created Melt and Novel-svelte, but I didn't create Bits nor shadcn-svelte. That's all on Huntabyte.

Regarding a solution, I want to strip away TW from novel.

@heshdotcc
Copy link
Author

I'm using shadcn-svelte as a tailwind-based UI library, which curiously depends on BitsUI, a library from the same creator of the MeltUI, which paradoxically novel-svelte also depends on.

Hah! This made me giggle 😄 BTW, I created Melt and Novel-svelte, but I didn't create Bits nor shadcn-svelte. That's all on Huntabyte.

Regarding a solution, I want to strip away TW from novel.

My bad for not knowing that properly. So, all the more reason, thank you also for such a project!

Suppose TW gets ditched out... That would fix the issue. Have you another library in mind? Or just the plain styles.

Let me know so I can adapt myself to your idea since I will be making a fork for myself in the meantime.

Again, thanks for such a cool project! Regards,

@TGlide
Copy link
Owner

TGlide commented Dec 27, 2023

My bad for not knowing that properly. So, all the more reason, thank you also for such a project!

Suppose TW gets ditched out... That would fix the issue. Have you another library in mind? Or just the plain styles.

Let me know so I can adapt myself to your idea since I will be making a fork for myself in the meantime.

Again, thanks for such a cool project! Regards,

Base CSS/SCSS probably!

@rotimi-best
Copy link
Contributor

Also look forward to the removal of tailwind on this one.

It would resolve a ton of issues I am facing integrating novel-svelte into my project.

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

3 participants