AdminThemeUikit: fix login form fields hidden behind oversized masthead - #343
Open
adrianbj wants to merge 1 commit into
Open
AdminThemeUikit: fix login form fields hidden behind oversized masthead#343adrianbj wants to merge 1 commit into
adrianbj wants to merge 1 commit into
Conversation
The login screen styles in themes/default/admin.css set #pw-masthead-mobile to height:auto so the logo area can grow, but the parent #pw-mastheads keeps its fixed 56px height. With a custom admin logo whose login logo box (.pw-logo-link, aspect-ratio 4/3) exceeds 56px, the masthead overflows its container and overlaps the top of the login form. Because the masthead has z-index 100 !important, sites that give .pw-masthead an opaque background paint over the Username field and labels, leaving only the Password input visible. Let #pw-mastheads size naturally on the login screen so the logo area pushes the form down instead of overlapping it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes processwire/processwire-issues#2331
On the themes/default login screen, the login overrides set
#pw-masthead-mobile { height: auto }so the logo area can grow, but the parent#pw-mastheadskeeps the theme's fixedheight: 56px. With a custom admin logo whose login logo box (.pw-logo-link,aspect-ratio: 4/3, contents scaled 1.35×) exceeds 56px — e.g. any wide logo such as a 300×66 SVG — the masthead overflows its container and hangs down over the top of the login form. Because the masthead carriesz-index: 100 !important, it stacks above the Username field (blocking mouse interaction), and on sites whose custom admin CSS gives.pw-mastheadan opaque background it visually erases the Username label/input and the Password label, leaving only the Password input visible.This adds
height: autoto the existing login-screen#pw-mastheadsoverride so the logo area pushes the form down instead of overlapping it.Verified:
.pw-mastheadbackground): injecting this one rule restores both fields and labels;document.elementsFromPoint()at the Username input's center returns the input itself instead of the.pw-logo-link/#pw-masthead-mobilestack.