From d83249b0b9e516470c29278321ad77f6b087ed97 Mon Sep 17 00:00:00 2001 From: Denis Skulimovskiy Date: Thu, 28 Jan 2021 12:29:46 +0300 Subject: [PATCH] [3.2.x] Fixed #32391 -- Used CSS flex properties for changelist filter. Matched layout adjustment using flex from admin sidebar added in d24ba1be7a53a113d19e2860c03aff9922efec24. Filters would become squashed when viewport was constrained or list display table became too wide. Backport of 269a76714616fd7ad166a14113f3354bab8d9b65 from master --- django/contrib/admin/static/admin/css/changelists.css | 2 +- django/contrib/admin/static/admin/css/responsive.css | 2 +- docs/releases/3.1.6.txt | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/django/contrib/admin/static/admin/css/changelists.css b/django/contrib/admin/static/admin/css/changelists.css index f9adf0c085b..b4a1557887a 100644 --- a/django/contrib/admin/static/admin/css/changelists.css +++ b/django/contrib/admin/static/admin/css/changelists.css @@ -128,8 +128,8 @@ /* FILTER COLUMN */ #changelist-filter { + flex: 0 0 240px; order: 1; - width: 240px; background: var(--darkened-bg); border-left: none; margin: 0 0 0 30px; diff --git a/django/contrib/admin/static/admin/css/responsive.css b/django/contrib/admin/static/admin/css/responsive.css index e60a6f02c7e..8c6dd810ca2 100644 --- a/django/contrib/admin/static/admin/css/responsive.css +++ b/django/contrib/admin/static/admin/css/responsive.css @@ -157,7 +157,7 @@ input[type="submit"], button { } #changelist-filter { - width: 200px; + flex-basis: 200px; } .change-list .filtered .results, diff --git a/docs/releases/3.1.6.txt b/docs/releases/3.1.6.txt index dfc60acc95a..2d0a48616dc 100644 --- a/docs/releases/3.1.6.txt +++ b/docs/releases/3.1.6.txt @@ -9,4 +9,5 @@ Django 3.1.6 fixes several bugs in 3.1.5. Bugfixes ======== -* ... +* Fixed an admin layout issue in Django 3.1 where changelist filter controls + would become squashed (:ticket:`32391`).