-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Adding background-color to any parent element breaks this #1
Comments
@kevinsproles yes thats a current issue One solutions could be Creating a component for the floating input and passing the background color to it. Better would be if the background color could be applied to the label using maybe css variables or something else we could generate using Tailwind. |
I couldn't figure out how to manually fix this, could you explain or provide a code sample? |
@kevinsproles Here is an example component written w/ Svelte. <label class="... bg-white dark:bg-dark-500" Additonally, the component Does this help you a bit more? I will also create a post on how to do it with an Angular component. |
I solve this removing the <div class="outline relative border-2 focus-within:border-blue-500 rounded-md bg-gray-100">
<input
type="text"
name="username"
placeholder=" "
class="block p-4 w-full text-lg appearance-none focus:outline-none bg-transparent"
/>
<label
for="username"
class="absolute top-0 text-lg p-4 duration-300 origin-0 pointer-events-none"
>Username</label
>
</div> |
example:
The text was updated successfully, but these errors were encountered: