rob-balfre / svelte-select

Svelte Select. A select component for Svelte
https://svelte-select-examples.vercel.app
Other
1.25k stars 175 forks source link

Improve Tailwind implementation #530

Open frederikhors opened 1 year ago

frederikhors commented 1 year ago

I tried the code for https://github.com/rob-balfre/svelte-select/blob/master/src/lib/tailwind.css with v5.

It doesn't work (many issues).

Are you interested in keeping it or not?

If yes, I could find some time to investigate further.

rob-balfre commented 1 year ago

It's experimental, more of a starting point for people really. I think others would love an improvement PR, thanks - I personally don't use TW and after trying it out wont be rushing back to it 😂.

JVariance commented 11 months ago

I used Tailwind's theme() function:

    .svelte-select {
        --background: theme("backgroundColor.surface-container-high");
        --list-background: theme("backgroundColor.surface-container-high");
        --item-hover-bg: theme("backgroundColor.primary-fixed");
        --item-is-active-bg: theme("backgroundColor.primary-fixed");
        --item-active-background: theme("backgroundColor.primary-fixed");
        --item-is-active-color: theme("textColor.black");
        --multi-item-bg: theme("backgroundColor.primary-fixed");
    }