yourlabs / django-autocomplete-light

A fresh approach to autocomplete implementations, specially for Django. Status: v4 alpha, v3 stable, v2 & v1 deprecated.
https://django-autocomplete-light.readthedocs.io
MIT License
1.79k stars 467 forks source link

Dark mode support #1245

Closed al-muammar closed 1 year ago

al-muammar commented 3 years ago

Django 3.2 introduces dark mode in its admin website. DAL looks very poorly and need to take the same (or similar) styles as django autocomplete.

jpic commented 3 years ago

Agreed, anyone wants to give it a go in a PR?

axvargas commented 3 years ago

Need this please!!!!

lguariento commented 2 years ago

This would be a very welcome addition.

EParisot commented 2 years ago

I second this... as a hotfix, you can still create a /templates/admin/base_site.html and put the following lines in:

{% block extrahead %}
    <style>
        .select2-selection__choice{
            color: #000;
        }
        .select2-results__option {
            color:#000;
        }
    </style>
{% endblock %}
ammarCanc commented 2 years ago

Tried to fix this dark mode compatibility issue in the PR #1280, it just needed to be reviewed.

Stounik commented 2 years ago

It still doesn't work for me. What am I missing? Django==4.0.3 django-autocomplete-light==3.9.4

admin add page

image

forms.py

class AdressForm(forms.ModelForm):

    class Meta:
        model = Address
        fields = ('__all__')
        widgets = {
            'city': autocomplete.ModelSelect2(url='city-autocomplete',
                                              forward=['country', 'region'],
                                              attrs = {'data-placeholder': '...',
                                                      }),

            'region': autocomplete.ModelSelect2(url='region-autocomplete',
                                                forward=['country'],
                                                attrs = {'data-placeholder': '...',
                                                        })
        }
geekkun commented 2 years ago

Still no dark mode support in 3.9.4 :(

django==3.2.13

Screenshot 2022-06-08 at 13 42 16
trumpet2012 commented 1 year ago

I opened #1308 to add support for dark mode.