saadeghi / daisyui

๐ŸŒผ ๐ŸŒผ ๐ŸŒผ ๐ŸŒผ ๐ŸŒผ โ€ƒThe most popular, free and open-source Tailwind CSS component library
https://daisyui.com
MIT License
34.14k stars 1.3k forks source link

bug: vars not available on web component #3125

Closed wildwind123 closed 2 months ago

wildwind123 commented 4 months ago

What version of daisyUI are you using?

v4.14.10

Which browsers are you seeing the problem on?

All browsers

Reproduction URL

https://stackblitz.com/~/github.com/wildwind123/daisyui_custom_element

Describe your issue

on web component, vars not available. but tailwind vars is available. On example button have empty background color.

image

github-actions[bot] commented 4 months ago

Thank you @wildwind123 for reporting issues. It helps daisyUI a lot ๐Ÿ’š
I'll be working on issues one by one. I will help with this one as soon as a I find a solution.
In the meantime providing more details and reproduction links would be helpful.

wildwind123 commented 2 months ago

solve this problem with

 themeRoot: ':host'
/** @type {import('tailwindcss').Config} */
export default {
  content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
  theme: {
    extend: {}
  },
  daisyui: {
    themeRoot: ':host'
  },
  plugins: [daisyui]
}