diff --git a/django/contrib/admin/static/admin/css/changelists.css b/django/contrib/admin/static/admin/css/changelists.css index b399cff427..01c1c5f4f2 100644 --- a/django/contrib/admin/static/admin/css/changelists.css +++ b/django/contrib/admin/static/admin/css/changelists.css @@ -265,6 +265,15 @@ background-color: var(--selected-row); } +@media (forced-colors: active) { + #changelist table tbody tr.selected { + background-color: SelectedItem; + } + #changelist table tbody tr:has(input[type=checkbox]:checked) { + background-color: SelectedItem; + } +} + #changelist .actions { padding: 10px; background: var(--body-bg); diff --git a/django/contrib/admin/static/admin/css/nav_sidebar.css b/django/contrib/admin/static/admin/css/nav_sidebar.css index f76e6ce485..7eb0de97ab 100644 --- a/django/contrib/admin/static/admin/css/nav_sidebar.css +++ b/django/contrib/admin/static/admin/css/nav_sidebar.css @@ -102,6 +102,12 @@ background: var(--selected-row); } +@media (forced-colors: active) { + #nav-sidebar .current-model { + background-color: SelectedItem; + } +} + .main > #nav-sidebar + .content { max-width: calc(100% - 23px); }