codingjoe / django-select2

This is a Django integration for Select2
https://django-select2.rtfd.io
MIT License
172 stars 52 forks source link

Color issus in Django Admin dark mode #283

Closed jonocodes closed 5 months ago

jonocodes commented 5 months ago

Description

When using dark mode that comes with django admin, the colors make the widget unreadable.

In this screenshot:

Screen Shot 2024-06-01 at 09 57 22

Steps to Reproduce

  1. Create a Select2 field. In my case I am using forms.ChoiceField(widget=Select2MultipleWidget, choices=get_sorted_operator_choices())
  2. Render the page and see that the text is white in a white box.

Note: I am not using the built in admin autoselect since these are not foreign keys. It is a foreign table, but using a different field then the foreign key.

I'm using vanilla Django 5.x. I believe dark mode was introduced at 3.2.

Expected Behavior

Like other dark mode select fields, the field should be black and the text white.