Opened 7 years ago

Closed 6 years ago

#19177 closed Cleanup/optimization (fixed)

Add some ems to the width of username label at login page.

Reported by: Alexey Boriskin Owned by: anonymous
Component: contrib.admin Version: master
Severity: Normal Keywords: sprints-django-ar
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes


Recent landing of the Russel's work contains one small, but important change:

It makes the username label of the login form to be the same as user model username field's verbose_name. Previously it was just a translated "User" string. I'm fine with that, but that change cause a tiny layout issue. "Username" is two words in some languages, and some languages have longer words than others, and now in the number of languages username label have shifted to the second line.

My proposal is to increase the width of username label by 3em, based on the following screenshots: (Czech, +1em required) (Spanish, +1em required) (Georgian, +3em required) (Kazakh, +1em required) (Mongolian, +1em required) (Russian, +1em required) (Slovak, +2em required)

Change History (5)

comment:1 Changed 7 years ago by Łukasz Rekucki

Triage Stage: UnreviewedAccepted

It would be best if the layout just scaled with the width of the text in the label.

comment:2 Changed 7 years ago by Claude Paroz

If we care for i18n, either use top-aligned labels ( or simply a table, yes, a table.

comment:3 Changed 6 years ago by PMourelle (@…

Keywords: sprints-django-ar added
Owner: changed from nobody to anonymous
Status: newassigned

Top-aligned labels sounds and feels like the best option here.

comment:4 Changed 6 years ago by Pedro Mourelle <pedromagnus@…>

Has patch: set

comment:5 Changed 6 years ago by Ramiro Morales <cramm0@…>

Resolution: fixed
Status: assignedclosed

In 0868e5a8ac6811fffcb25e9dc8248d87d25abcd1:

Fixed #19177 -- Better layout for admin login form field labels.

Thanks goes to void for the comprehensive report, to Pedro Mourelle for
the fix and to Bryan Veloso, Łukasz Rekucki and Claude Paroz for the

This fix includes the following changes:

  • Modified layout to top-aligned labels.
  • Added 'air' for inputs (the padding was really needed there.). It adjust good to zoom in/out.
  • Removed float attributes from label and inputs in login form.
  • Removed useless text-align property.
Note: See TracTickets for help on using tickets.
Back to Top