diff --git a/django/contrib/admin/static/admin/css/changelists.css b/django/contrib/admin/static/admin/css/changelists.css index b399cff4277..01c1c5f4f23 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 f76e6ce4859..7eb0de97ab2 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); }