Closed dmwyatt closed 9 months ago
I guess these icons come from jQuery? If so, it looks like there's not a way to change the icon color easily. I guess we'd have to bundle an icon for this and save it in a dark and light color.
Yeah, jQuery UI is pre-dark mode.
In general it makes the most sense to build a separate package that solves this problem using modern tooling and libraries. There isn't much point trying to drag jQuery UI into the future for ever.
You may be able to do a CSS image transform. It may not look perfect, but it could look okay.
I ended up overriding base_site.html by placing the following in templates/admin
(assuming you have templates look up setup correctly).
{% extends "admin/base_site.html" %}
{% block extrahead %}
<style>
@media (prefers-color-scheme: dark) {
.ui-icon {
filter: invert(.8);
}
}
</style>
{% endblock %}
So I end up with:
That's not bad at all. Better than nothing. If you can, make a PR. Otherwise I'm overdue (and over busy) to do another fix and a new release.
Hello, In the official docs it's stated that you can change the icon and the CSS if needed, overriding the default one. It may be another workaround...
https://django-ajax-selects.readthedocs.io/en/latest/Media-assets.html
Fixed. Thanks for the css!
Dark mode:
Light mode: