modlinltd / django-advanced-filters

Add advanced filtering abilities to Django admin
https://pypi.org/project/django-advanced-filters/
MIT License
769 stars 172 forks source link

Modal does not respect dark mode #172

Closed VaZark closed 1 year ago

VaZark commented 2 years ago

Describe the bug When the search modal is opened in a browser that has dark mode by default. The theming support was added in django 3.2 (link)

To Reproduce Steps to reproduce the behavior:

  1. Set browser to prefer dark mode
  2. Open the advanced filter modal on any page

Expected behavior The modal should respect the CSS variables from django 3.2

Screenshots image

Details (please complete the following information):

VaZark commented 2 years ago

CSS variables are available at : https://github.com/django/django/blob/main/django/contrib/admin/static/admin/css/base.css

asfaltboy commented 1 year ago

Thanks @VaZark , I switched to the var(--body-bg) in PR #176 . Could you give a try and let me know if it resolves your concern? My hope is it's a tiny bit simpler than the changes proposed in PR #173

VaZark commented 1 year ago

Looks like the there one little field that has not been updated

image

asfaltboy commented 1 year ago

Thanks for reminding me about it 🙇

Django has an autocomplete.css select2 theme (see here) that seems to do the job. We can play around with select2 themes in the draft PR #177 , as it switched to django vendored select2 v4.