Closed udit-001 closed 2 months ago
Great plugin! I love how simple it is to use.
❤️
Are there any plans to add a dark theme to the plugin?
No plans, but I would welcome a PR that added this!
After playing with this a little bit, I realised 3 things that put me off the idea of providing built-in dark mode support:
@media (prefers-color-scheme: dark)
will enable dark mode based on the user's OS system settings, BUT most websites that use this plugin won't be respecting this, and so if the plugin starts respecting this on its own, most websites will end up with a dark plugin on a light website which will look silly.@media (prefers-color-scheme: dark) {
.iti {
--iti-arrow-color: #bababa;
}
.iti input, .iti__dropdown-content {
background-color: #212529;
}
}
Which produces the following styles:
So for these reasons, I've decided not to add built-in dark mode support, and instead will leave it to each dev to add this themselves, based on the above snippet, customised to match their own dark colour scheme.
Great plugin! I love how simple it is to use.
Are there any plans to add a dark theme to the plugin? Perhaps one that automatically adjusts based on users' browser preferences?