Make WordPress Core

#57617 closed defect (bug) (fixed)

Correct bottom margin for language switcher button on smaller screens

Reported by: sabernhardt's profile sabernhardt Owned by: audrasjb's profile audrasjb
Milestone: 6.3 Priority: normal
Severity: minor Version: 5.9
Component: Login and Registration Keywords: has-patch has-screenshots commit
Focuses: css Cc:

Description (last modified by sabernhardt)

Changeset [52058] added a language switcher with a zero bottom margin (for screens up to the 782px breakpoint). Then changeset [52417] removed the button-primary class without updating the styles.

Plus, without the primary button styles, it does not need to remove the float.

Attachments (8)

language-switcher-480px.png (14.6 KB) - added by sabernhardt 18 months ago.
before patch, at 480 pixels wide
language-switcher-360px.png (12.8 KB) - added by sabernhardt 18 months ago.
before patch, at 360 pixels wide
57617.patch (560 bytes) - added by sabernhardt 18 months ago.
corrects class name and removes float: none
language-switcher-480px-with-patch.png (14.6 KB) - added by sabernhardt 18 months ago.
with patch, at 480 pixels wide
language-switcher-360px-with-patch.png (13.2 KB) - added by sabernhardt 18 months ago.
with patch, at 360 pixels wide
language-switcher-360px-with-patch-espanol.png (5.4 KB) - added by sabernhardt 18 months ago.
with patch, at 360 pixels wide, showing the switcher with Spanish (Dominican Republic) as a wide example
Capture d’écran 2023-03-22 à 12.05.03.png (77.1 KB) - added by audrasjb 16 months ago.
Before patch
Capture d’écran 2023-03-22 à 12.07.15.png (75.7 KB) - added by audrasjb 16 months ago.
After patch: all good!

Download all attachments as: .zip

Change History (15)

@sabernhardt
18 months ago

before patch, at 480 pixels wide

@sabernhardt
18 months ago

before patch, at 360 pixels wide

@sabernhardt
18 months ago

corrects class name and removes float: none

@sabernhardt
18 months ago

with patch, at 480 pixels wide

@sabernhardt
18 months ago

with patch, at 360 pixels wide

@sabernhardt
18 months ago

with patch, at 360 pixels wide, showing the switcher with Spanish (Dominican Republic) as a wide example

#1 @sabernhardt
18 months ago

  • Keywords has-patch has-screenshots added

Options for smallest screens (up to 400 pixels wide):

  1. The patch corrects the class name to set the Change button below the select. I had added that in case the select is extra wide. "English (United States)" seems fine (at 100% zoom), but barely.
  2. Remove the special centering below 400px, as it would not wrap often and it has not worked in any releases yet anyway.
  3. Use flexbox with gap for all language switcher elements so it only centers when the language is too wide.
    #language-switcher {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      align-items: center;
      gap: 5px;
    }
    

#2 @sabernhardt
18 months ago

  • Description modified (diff)

#3 @sabernhardt
17 months ago

  • Milestone changed from Awaiting Review to 6.3
  • Severity changed from normal to minor

#4 @audrasjb
16 months ago

  • Keywords has-testing-info needs-testing added

#5 @audrasjb
16 months ago

  • Owner set to audrasjb
  • Status changed from new to reviewing

@audrasjb
16 months ago

After patch: all good!

#6 @audrasjb
16 months ago

  • Keywords commit added; has-testing-info needs-testing removed
  • Status changed from reviewing to accepted

This looks good to me!

#7 @audrasjb
16 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 55582:

Login and Registration: Fix margin for language switcher button on small screens.

This fixes an alignement issue on small screens in the language switcher button displayed on the Login screen.

Follow-up to [52058], [52417].

Props sabernhardt.
Fixes #57617.

Note: See TracTickets for help on using tickets.