From e20fd899be87cf70ed5c4372c7b2ee634da1453a Mon Sep 17 00:00:00 2001 From: SwastikTripathi <88632085+SwastikTripathi@users.noreply.github.com> Date: Tue, 22 Nov 2022 13:28:48 +0000 Subject: [PATCH] Refs #34095 -- Changed more properties to use rem units in admin CSS. --- .../contrib/admin/static/admin/css/base.css | 12 +++++------ .../contrib/admin/static/admin/css/forms.css | 20 +++++++++---------- .../admin/static/admin/css/responsive.css | 10 +++++----- .../admin/static/admin/css/widgets.css | 6 +++--- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/django/contrib/admin/static/admin/css/base.css b/django/contrib/admin/static/admin/css/base.css index d5d3b589848b..0d4dc85c0f7d 100644 --- a/django/contrib/admin/static/admin/css/base.css +++ b/django/contrib/admin/static/admin/css/base.css @@ -194,7 +194,7 @@ li ul { li, dt, dd { font-size: 0.8125rem; - line-height: 20px; + line-height: 1.25rem; } dt { @@ -308,7 +308,7 @@ table { td, th { font-size: 0.8125rem; - line-height: 16px; + line-height: 1rem; border-bottom: 1px solid var(--hairline-color); vertical-align: top; padding: 8px; @@ -501,7 +501,7 @@ textarea:focus, select:focus, .vTextField:focus { } select { - height: 30px; + height: 1.875rem; } select[multiple] { @@ -761,7 +761,7 @@ a.deletelink:focus, a.deletelink:hover { display: block; float: left; margin-left: 5px; - height: 16px; + height: 1rem; } .object-tools a { @@ -1059,8 +1059,8 @@ a.deletelink:focus, a.deletelink:hover { .delete-confirmation form .cancel-link { display: inline-block; vertical-align: middle; - height: 15px; - line-height: 15px; + height: 0.9375rem; + line-height: 0.9375rem; border-radius: 4px; padding: 10px 15px; color: var(--button-fg); diff --git a/django/contrib/admin/static/admin/css/forms.css b/django/contrib/admin/static/admin/css/forms.css index d932556ade7b..315f4b753c42 100644 --- a/django/contrib/admin/static/admin/css/forms.css +++ b/django/contrib/admin/static/admin/css/forms.css @@ -83,7 +83,7 @@ form ul.inline li { content: ''; display: inline-block; vertical-align: middle; - height: 26px; + height: 1.625rem; } .aligned label + p, .aligned .checkbox-row + div.help, .aligned label + div.readonly { @@ -277,8 +277,8 @@ body.popup .submit-row { } .submit-row input { - height: 35px; - line-height: 15px; + height: 2.1875rem; + line-height: 0.9375rem; } .submit-row input, .submit-row a { @@ -297,9 +297,9 @@ body.popup .submit-row { display: block; background: var(--delete-button-bg); border-radius: 4px; - padding: 10px 15px; - height: 15px; - line-height: 15px; + padding: 0.625rem 0.9375rem; + height: 0.9375rem; + line-height: 0.9375rem; color: var(--button-fg); } @@ -308,8 +308,8 @@ body.popup .submit-row { background: var(--close-button-bg); border-radius: 4px; padding: 10px 15px; - height: 15px; - line-height: 15px; + height: 0.9375rem; + line-height: 0.9375rem; color: var(--button-fg); } @@ -524,8 +524,8 @@ body.popup .submit-row { } .related-lookup { - width: 16px; - height: 16px; + width: 1rem; + height: 1rem; background-image: url(../img/search.svg); } diff --git a/django/contrib/admin/static/admin/css/responsive.css b/django/contrib/admin/static/admin/css/responsive.css index ad6a5cb08594..f250ea40ff3f 100644 --- a/django/contrib/admin/static/admin/css/responsive.css +++ b/django/contrib/admin/static/admin/css/responsive.css @@ -104,13 +104,13 @@ input[type="submit"], button { } #changelist-search label { - line-height: 22px; + line-height: 1.375rem; } #toolbar form #searchbar { flex: 1 0 auto; width: 0; - height: 22px; + height: 1.375rem; margin: 0 10px 0 6px; } @@ -186,12 +186,12 @@ input[type="submit"], button { box-sizing: border-box; margin: 0; padding: 6px 8px; - min-height: 36px; + min-height: 2.25rem; font-size: 0.875rem; } .form-row select { - height: 36px; + height: 2.25rem; } .form-row select[multiple] { @@ -957,7 +957,7 @@ input[type="submit"], button { .calendar-shortcuts { padding: 10px 0; font-size: 0.75rem; - line-height: 12px; + line-height: 0.75rem; } .calendar-shortcuts a { diff --git a/django/contrib/admin/static/admin/css/widgets.css b/django/contrib/admin/static/admin/css/widgets.css index ad5d9090d6b3..572dc0a500fa 100644 --- a/django/contrib/admin/static/admin/css/widgets.css +++ b/django/contrib/admin/static/admin/css/widgets.css @@ -277,8 +277,8 @@ a.active.selector-clearall:focus, a.active.selector-clearall:hover { .selector .search-label-icon { background: url(../img/search.svg) 0 0 no-repeat; display: inline-block; - height: 18px; - width: 18px; + height: 1.125rem; + width: 1.125rem; } /* DATE AND TIME */ @@ -498,7 +498,7 @@ span.clearable-file-input label { background: var(--body-bg); color: var(--body-quiet-color); font-size: 0.6875rem; - line-height: 11px; + line-height: 0.6875rem; border-top: 1px solid var(--hairline-color); padding: 8px 0; }