Opened 2 years ago

Closed 2 years ago

#34093 closed Bug (fixed)

Admin theme switcher icon should resize according to browser font size

Reported by: Thibaud Colas Owned by: Colm O'Connor
Component: contrib.admin Version: dev
Severity: Release blocker Keywords: accessibility, ux, font size, dark mode
Cc: Sarah Abderemane Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: yes

Description (last modified by Thibaud Colas)

The new admin theme switcher’s icon is a fixed 16x16px, regardless of the browser’s configured font size. It would be better for users requiring larger text if icons resized as well.

This seems to be due to the icons’ SVG symbols having hard-coded width and height attributes, which prevents resizing with CSS. I believe the width and height should either be removed, or set on the inline SVG (which can be a bit tedious).

Screenshot: https://code.djangoproject.com/raw-attachment/ticket/34093/Screenshot%202022-10-13%20at%2017.44.39.png

Relevant code: https://github.com/django/django/blob/da8fa764134980ee1079f790cda6616f32cf9c44/django/contrib/admin/templates/admin/base.html#L118-L122

Attachments (1)

Screenshot 2022-10-13 at 17.44.39.png (240.8 KB ) - added by Thibaud Colas 2 years ago.

Download all attachments as: .zip

Change History (6)

by Thibaud Colas, 2 years ago

comment:1 by Thibaud Colas, 2 years ago

Description: modified (diff)

comment:2 by Mariusz Felisiak, 2 years ago

Cc: Sarah Abderemane added
Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted

It's a visual regression in bc7aa2a5e91cf65fc7510edaf1776528c7ad07b4.

Last edited 2 years ago by Mariusz Felisiak (previous) (diff)

comment:3 by Sarah Abderemane, 2 years ago

Owner: changed from nobody to Sarah Abderemane
Status: newassigned

comment:4 by Mariusz Felisiak, 2 years ago

Has patch: set
Owner: changed from Sarah Abderemane to Colm O'Connor

comment:5 by GitHub <noreply@…>, 2 years ago

Resolution: fixed
Status: assignedclosed

In 37c5b8c0:

Fixed #34093 -- Changed width/height of switch button icons to use rem units in admin.

Note: See TracTickets for help on using tickets.
Back to Top