-
Notifications
You must be signed in to change notification settings - Fork 287
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
flowbite-svelte disables Tailwind's file: pseudo-classes #1518
Comments
I've not been able to pin down exactly what triggers the problem in flowbite-svelte, but have found a workaround - just add the following (or similar) to your Svelte project's
` |
Nice. The bg-violet-500 doesn't quite fill the "Browse" button, but adding "h-auto" seems to fix this. What's the status of v0.48.2 please? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Flowbite docs for the
<Fileupload>
component show a "Choose File" button styled with a black background.This might not suit everyone, so you might try to style this with a tailwind "file:bg-red-500" class, or similar. Disappointingly, you'll find this has no effect - the button remains stubbornly black.
Worse, you might also be unhappy with the 3rem height of the button. You'll find that you can style this with a Tailwind "h-[2rem]" or similar, but then you'll find that this loses the vertical alignment of the "Choose File" and "No File selected" text.
You might then try to use a native
<input type="file">
. You'll then be doubly disappointed because this will suffer from exactly the same problems.This behaviour is not seen when the styling is applied in a Svelte/Tailwind project that doesn't use Flowbite-Svelte. It appears that the flowbite-svelte plugin triggers the issue.
Reproduction
`The HTML below in a project with Flowbite-Svelte installed sets the height of the input but doesn't vertically align its content and fails to set the background of its "Choose File" button to violet. The persistent black background is particularly annoying.
Flowbite version and System Info
The text was updated successfully, but these errors were encountered: