-
Notifications
You must be signed in to change notification settings - Fork 38
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
Card not dark in dark mode #263
Comments
Hello @BeBel42 have you defined your dark mode colours in your |
Pretty much, yes. Here is how it looks: import forms from "@tailwindcss/forms";
import colors from "tailwindcss/colors";
/** @type {import('tailwindcss').Config} */
export default {
content: [
"./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php",
"./storage/framework/views/*.php",
"./resources/views/**/*.blade.php",
],
darkMode: "selector",
theme: {
extend: {
colors: {
primary: colors.blue,
secondary: colors.slate,
green: colors.emerald,
dark: colors.slate,
success: colors.emerald,
error: colors.red,
warning: colors.amber,
info: colors.blue,
},
},
},
plugins: [forms],
}; |
Code looks good. Regarding the tag colour in dark mode. I normally do <div class="inline-block dark:hidden">
<x-bladewind::tag label="pending" color="red" />
</div>
<div class="dark:inline-block hidden">
<x-bladewind::tag label="pending" color="red" shade="dark" />
</div> A bit of a long approach but a workaround for now. Would probably be great to specify if one wants to use the darker shade of the colour in dark mode. Also, can you please |
Thank you for the tip for tags! I have tried to fiddle around to get some clues, and I had this in my tailwind config:
Anything marked with
Works! While testing I found out that the datepicker input was not fully dark. <div class="bg-black my-6 p-3 text-green-400 dark:text-red-400 ">
This is red if dark mode is on
<x-bladewind::card>
Hi
</x-bladewind::card>
<x-bladewind::datepicker />
</div> Gives: With an html tag like this: I guess that there is no need to send the html of the card, since it works as expected. <input class="bw-input peer bw_datepicker bw-datepicker" x-on:click="showDatepicker = !showDatepicker;" x-model="datepickerValue" x-on:keydown.escape="showDatepicker = false" id="dtp-bw_datepicker" max_date="today" onblur="" tabindex="-1" type="text" name="bw_datepicker" value="" autocomplete="off" placeholder="Select a date"> |
Thanks for the detailed feedback. Very much appreciated. Strange that I'm glad though that good 'ol I'll look into the datepicker. |
Hi,
![image](https://private-user-images.githubusercontent.com/64377698/326213355-8c7ca46c-c594-4622-80ed-2d2a3bf12910.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE0NTg2MjcsIm5iZiI6MTcyMTQ1ODMyNywicGF0aCI6Ii82NDM3NzY5OC8zMjYyMTMzNTUtOGM3Y2E0NmMtYzU5NC00NjIyLTgwZWQtMmQyYTNiZjEyOTEwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIwVDA2NTIwN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgwZjI2MDNmOTUyODEzMjYxYjc4MTkxMThhOGZlNTQzNWQ3MDA5NzEzMzY0ZWU0ZGRhMjU3ZmMyNjI4NzAwYmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.xUOOPWJ00xSGTJob4Xsn4uyAC1CGiTxUp_nfiJ9fma8)
This is what I get with this code:
As you can see, the card is completely white
I am using bladewind v2.5.12, the latest version at the time of writing
Maybe the background color of the tag should be darker, and its text color lighter in dark mode? That would increase readability
The text was updated successfully, but these errors were encountered: