From b3045197be46f2d245b5dd78e07893fa0bed0eef Mon Sep 17 00:00:00 2001 From: Khokan Sardar Date: Thu, 20 Aug 2026 17:59:21 +0530 Subject: [PATCH] Login and Registration: Center the Remember Me row and help toggle. The "Remember Me" checkbox, label, and help toggle sit in a floated paragraph laid out inline. The help toggle is an inline-flex box, so it takes its baseline from the icon it wraps rather than from the text, which lifts it above the label it belongs to. Separately, the paragraph has never been centered against the taller Log In button beside it. Making the paragraph a flex row aligns all three against each other, and giving it the button's height centers the row against the button. Since centering aligns margin boxes, the margins the checkbox and label carried for the inline layout are zeroed so both land on the row's center. Fixes #65918. --- src/wp-admin/css/login.css | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/wp-admin/css/login.css b/src/wp-admin/css/login.css index 4765e604a938d..2b224fc3330aa 100644 --- a/src/wp-admin/css/login.css +++ b/src/wp-admin/css/login.css @@ -201,11 +201,23 @@ p { } .login form .forgetmenot { + display: flex; + align-items: center; + gap: 4px; + /* Matches the height of the Log In button beside it, so the row centers on it. */ + min-height: 40px; font-weight: 400; float: left; margin-bottom: 0; } +/* Centering aligns margin boxes, so margins left from the inline layout would offset these. */ +.login form .forgetmenot input[type="checkbox"], +.login form .forgetmenot label { + margin-top: 0; + margin-bottom: 0; +} + .login .button-primary { float: right; }