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

Cannot make a table with DaisyUI on svelte #809

Closed
yajatvishwak opened this issue May 21, 2022 · 3 comments
Closed

Cannot make a table with DaisyUI on svelte #809

yajatvishwak opened this issue May 21, 2022 · 3 comments
Labels

Comments

@yajatvishwak
Copy link

image
App.svelte
image

tailwind.config.js
image

@saadeghi
Copy link
Owner

Can you share a sample repo so I can reproduce the issue?

@saadeghi saadeghi added the table label May 21, 2022
@yajatvishwak
Copy link
Author

Node : v16.13.0

Find the repo here:
https://github.com/yajatvishwak/daisyui-table-error.git

@saadeghi
Copy link
Owner

This issue must be fixed from Svelte.
When we use <style global>, svelte tries to handle styles with :global() but it doesn't process :where() correctly.
table :where(th, td) is a valid CSS selector that I used in daisyUI but Svelte changes it to :global(.table) :global(:where(th), :global(td)) which is wrong.

Current workarounds:

  1. You can use this on your main layout (without global)
<style lang="postcss">
  @tailwind base;
  @tailwind components;
  @tailwind utilities;
</style>
  1. Or you can import one postCSS file instead of use <style> tag:
    https://stackblitz.com/edit/daisyui-svelte-vite?file=src%2Fmain.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants