Skip to content

fix(login): language switcher layout and button colours on the login screen - #426

Merged
ogorzalka merged 1 commit into
developfrom
fix/login-language-switcher
Oct 7, 2026
Merged

ogorzalka merged 1 commit into
developfrom
fix/login-language-switcher

Conversation

@ogorzalka

Copy link
Copy Markdown
Member

Problem

On a dressed login screen (a theme with config/login.php) and a site with a second language installed:

  • the language switcher's label ("Language" and its icon) sat at the left edge of the window, far from its dropdown;
  • the switcher's Change button kept wp-admin's blue instead of the theme's primary colour.

Cause

  • .pollora-login form { display: flow-root }, meant for the login card, also reached #language-switcher. WordPress makes that form an inline-block so its left-aligned label sits above the dropdown; as a block it spanned the page.
  • The button rules were written .pollora-login .wp-core-ui … (descendant), but both classes are on <body>, so they never matched. The primary button was still styled through its second selector (.pollora-login .button-primary), minus the padding WordPress's .button-large rule kept; the secondary button rule had no fallback.

Fix

  • .pollora-login .language-switcher form { display: inline-block; }
  • .pollora-login .wp-core-ui → .pollora-login.wp-core-ui (compound).

Verified on pollora-test (WordPress 7.1.2, fr_FR + en_US, theme apiary) at 1280 px and 360 px: label and dropdown share the same left edge, the button takes the theme's primary colour, the submit button keeps its gradient and colours (slightly wider: its own padding now applies).

The E2E login test now checks, when the switcher is present, that its label is aligned with the dropdown.

…screen

The card rule for the login form also reached the language switcher's form and made it a full-width block, so its label sat at the window's left edge. It is an inline block again.

The button rules used .pollora-login .wp-core-ui as a descendant selector while both classes are on <body>, so they never matched: the switcher's button kept wp-admin's blue. They are compound selectors now.
@ogorzalka
ogorzalka merged commit a0d9759 into develop Oct 7, 2026
11 checks passed
@ogorzalka
ogorzalka deleted the fix/login-language-switcher branch October 7, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant