summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantoliny0919 <antoliny0919@gmail.com>2025-09-10 04:27:50 +0200
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2025-09-17 10:01:37 +0200
commitd8e9dec1ada659755595e2d90a3492f8f805f394 (patch)
tree3f9632e9602d23650d4aabb6ed9993384e696a22
parent1dbf415a1829a0bacd8cb31a8da5f2a99c5ea465 (diff)
[5.2.x] Fixed #36601 -- Fixed color contrast of FilteredSelectMultiple widget chosen labels in TabularInlines.
Regression in a0f50c2a483678d31bd1ad6f08fd3a0b8399e27b. Backport of 1e7728888dbbff437ad9847c82b84feb81f785df from main.
-rw-r--r--django/contrib/admin/static/admin/css/widgets.css4
-rw-r--r--docs/releases/5.2.7.txt4
-rw-r--r--tests/admin_inlines/tests.py12
3 files changed, 17 insertions, 3 deletions
diff --git a/django/contrib/admin/static/admin/css/widgets.css b/django/contrib/admin/static/admin/css/widgets.css
index 538af2eb06..a5f615abef 100644
--- a/django/contrib/admin/static/admin/css/widgets.css
+++ b/django/contrib/admin/static/admin/css/widgets.css
@@ -49,7 +49,7 @@
padding: 8px;
}
-.aligned .selector-chosen-title label {
+.selector-chosen-title label {
color: var(--header-link-color);
width: 100%;
}
@@ -60,7 +60,7 @@
padding: 8px;
}
-.aligned .selector-available-title label {
+.selector-available-title label {
width: 100%;
}
diff --git a/docs/releases/5.2.7.txt b/docs/releases/5.2.7.txt
index ea06ac9089..58a4633bd3 100644
--- a/docs/releases/5.2.7.txt
+++ b/docs/releases/5.2.7.txt
@@ -9,4 +9,6 @@ Django 5.2.7 fixes several bugs in 5.2.6.
Bugfixes
========
-* ...
+* Fixed a regression in Django 5.2 that reduced the color contrast of
+ the chosen label of ``filter_horizontal`` and ``filter_vertical`` widgets
+ within a ``TabularInline`` (:ticket:`36601`).
diff --git a/tests/admin_inlines/tests.py b/tests/admin_inlines/tests.py
index 89f43300d7..07c4f11baa 100644
--- a/tests/admin_inlines/tests.py
+++ b/tests/admin_inlines/tests.py
@@ -2525,3 +2525,15 @@ class SeleniumTests(AdminSeleniumTestCase):
delete.get_attribute("innerHTML"),
)
self.take_screenshot("loaded")
+
+ @screenshot_cases(["desktop_size", "mobile_size", "rtl", "dark", "high_contrast"])
+ def test_tabular_inline_with_filter_horizontal(self):
+ from selenium.webdriver.common.by import By
+
+ self.admin_login(username="super", password="secret")
+ self.selenium.get(
+ self.live_server_url + reverse("admin:admin_inlines_courseproxy2_add")
+ )
+ m2m_widget = self.selenium.find_element(By.CSS_SELECTOR, "div.selector")
+ self.assertTrue(m2m_widget.is_displayed())
+ self.take_screenshot("tabular")