Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplified login with square logo needs logo to be smaller #6842

Closed
izmeez opened this issue Feb 4, 2025 · 10 comments · Fixed by backdrop/backdrop#5013
Closed

Simplified login with square logo needs logo to be smaller #6842

izmeez opened this issue Feb 4, 2025 · 10 comments · Fixed by backdrop/backdrop#5013

Comments

@izmeez
Copy link

izmeez commented Feb 4, 2025

Description of the bug

When the new simplified login option available in 1.30.0 is chosen and the logo provided, either by the active theme or a custom logo, is a square logo the appearance on the simplified login page is too large and needs to be smaller.

This issue was noted in the dev meeting discussion related to issue, #6836

The graphic logo is also not responsive for different screen widths.

@izmeez
Copy link
Author

izmeez commented Feb 4, 2025

Here are some screen captures for comparison.

Here is the default with Seven theme when use logo provided by theme:
Image

And this is with path to a wide custom logo:
Image

@izmeez
Copy link
Author

izmeez commented Feb 4, 2025

Here is the simplified login without admin theme with square logo:

Image

And there is simplified login, no admin theme, with custom wide logo:

Image

@avpaderno
Copy link
Member

I cannot replicate this issue, with an SVG logo: Its intrinsic size is 130x130 pixels; on the simplified login page, its rendered size is 130x130 pixels.

@olafgrabienski
Copy link

@avpaderno There is no issue with logos of a reasonable size, like yours, which is already quite small. The issue is with big logos, especially square ones, as their size doesn't get restricted (enough).

@olafgrabienski
Copy link

Thanks for opening the issue, @izmeez! We started the discussion already in the PR for #6570, but I missed to open a follow-up. See backdrop/backdrop#4957 (review) for details.

In that PR, the link surrounding the logo got a max-width of 240px. Which is fine for horizontal logos, but square logos look too big. My suggestion to cover both use cases: add a max-height of 160px to the <img> element (and leave the max-width for the .logo link).

.user-simplified-page-logo .logo img {
  max-height: 160px;
}

@izmeez
Copy link
Author

izmeez commented Feb 6, 2025

@olafgrabienski Thanks for showing the earlier issue and PR that this is related to.

@izmeez
Copy link
Author

izmeez commented Feb 7, 2025

@olafgrabienski Your suggestion appears to work. I have created a PR for testing and review. Thanks.

@olafgrabienski
Copy link

Thanks for the PR, @izmeez ! I've tested the PR in the sandbox, using Seven (with the nearly square big Backdrop logo) and Basis (with a couple of landscape and square logos). They all get scaled down in a nice way. Works for me!

@izmeez
Copy link
Author

izmeez commented Feb 9, 2025

Here is the resulting display with the PR with max-height 160px and default BD logo with Seven theme.

Image

@quicksketch
Copy link
Member

Thank you @izmeez for taking this on! What an improvement. I merged backdrop/backdrop#5013 into 1.x and 1.30.x. Thank you @olafgrabienski and @avpaderno for reviewing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants