From a4881f5e5d7ee38b7e83301331a0b4962845ef8a Mon Sep 17 00:00:00 2001 From: 007gzs <007gzs@gmail.com> Date: Tue, 25 Feb 2020 08:37:34 +0800 Subject: [PATCH] Fixed #31307 -- Fixed filter_horizontal add/remove SVG :hover positioning. --- AUTHORS | 1 + .../admin/static/admin/css/responsive.css | 24 +++++++++++++++++++ .../admin/static/admin/css/widgets.css | 10 ++++++++ 3 files changed, 35 insertions(+) diff --git a/AUTHORS b/AUTHORS index afc4ad0306..220533f648 100644 --- a/AUTHORS +++ b/AUTHORS @@ -534,6 +534,7 @@ answer newbie questions, and generally made Django that much better: Liang Feng limodou Lincoln Smith + Liu Yijie <007gzs@gmail.com> Loek van Gent Loïc Bistuer Lowe Thiderman diff --git a/django/contrib/admin/static/admin/css/responsive.css b/django/contrib/admin/static/admin/css/responsive.css index b3db28fbf0..d7866c174e 100644 --- a/django/contrib/admin/static/admin/css/responsive.css +++ b/django/contrib/admin/static/admin/css/responsive.css @@ -354,6 +354,14 @@ input[type="submit"], button { } .stacked .active.selector-add { + background-position: 0 -40px; + } + + .active.selector-add:focus, .active.selector-add:hover { + background-position: 0 -140px; + } + + .stacked .active.selector-add:focus, .stacked .active.selector-add:hover { background-position: 0 -60px; } @@ -362,6 +370,14 @@ input[type="submit"], button { } .stacked .active.selector-remove { + background-position: 0 0; + } + + .active.selector-remove:focus, .active.selector-remove:hover { + background-position: 0 -100px; + } + + .stacked .active.selector-remove:focus, .stacked .active.selector-remove:hover { background-position: 0 -20px; } @@ -725,10 +741,18 @@ input[type="submit"], button { background-position: 0 0; } + .active.selector-remove:focus, .active.selector-remove:hover { + background-position: 0 -20px; + } + .selector-add { background-position: 0 -40px; } + .active.selector-add:focus, .active.selector-add:hover { + background-position: 0 -60px; + } + /* Inlines */ .inline-group[data-inline-type="stacked"] .inline-related { diff --git a/django/contrib/admin/static/admin/css/widgets.css b/django/contrib/admin/static/admin/css/widgets.css index 6dbc58e018..14ef12db94 100644 --- a/django/contrib/admin/static/admin/css/widgets.css +++ b/django/contrib/admin/static/admin/css/widgets.css @@ -211,6 +211,11 @@ a.active.selector-clearall:focus, a.active.selector-clearall:hover { } .stacked .active.selector-add { + background-position: 0 -32px; + cursor: pointer; +} + +.stacked .active.selector-add:focus, .stacked .active.selector-add:hover { background-position: 0 -48px; cursor: pointer; } @@ -221,6 +226,11 @@ a.active.selector-clearall:focus, a.active.selector-clearall:hover { } .stacked .active.selector-remove { + background-position: 0 0px; + cursor: pointer; +} + +.stacked .active.selector-remove:focus, .stacked .active.selector-remove:hover { background-position: 0 -16px; cursor: pointer; }