SSO icon is not centered when there is no text #10019

Closed
opened 2025-12-29 21:25:48 +01:00 by adam · 5 comments
Owner

Originally created by @mcmehrtens on GitHub (Jul 28, 2024).

Originally assigned to: @mcmehrtens on GitHub.

Deployment Type

Self-hosted

NetBox Version

v4.0.8

Python Version

3.11

Steps to Reproduce

  1. Set the SOCIAL_AUTH_BACKEND_ATTRS variable in the configuration directory to have an icon and an empty string as the text:
SOCIAL_AUTH_BACKEND_ATTRS = {
    "oidc": ("", "https://mehrtens-cc.pages.dev/netbox/netbox_sso_icon.svg"),
}
  1. Restart NetBox.

Expected Behavior

The SSO button shows on the login screen with only a centered icon.

image

Note: in the image, the rulers are off by 0.5 pts due to aliasing.

Observed Behavior

The SSO button shows on the login screen with the icon noticeably off-center, due to a 5rem margin on the right of the icon.

image
Originally created by @mcmehrtens on GitHub (Jul 28, 2024). Originally assigned to: @mcmehrtens on GitHub. ### Deployment Type Self-hosted ### NetBox Version v4.0.8 ### Python Version 3.11 ### Steps to Reproduce 1. Set the `SOCIAL_AUTH_BACKEND_ATTRS` variable in the configuration directory to have an icon and an empty string as the text: ```python SOCIAL_AUTH_BACKEND_ATTRS = { "oidc": ("", "https://mehrtens-cc.pages.dev/netbox/netbox_sso_icon.svg"), } ``` 2. Restart NetBox. ### Expected Behavior The SSO button shows on the login screen with only a centered icon. <img width="506" alt="image" src="https://github.com/user-attachments/assets/72371055-5b2c-482a-999b-91ae2550f719"> _Note: in the image, the rulers are off by 0.5 pts due to aliasing._ ### Observed Behavior The SSO button shows on the login screen with the icon noticeably off-center, due to a 5rem margin on the right of the icon. <img width="529" alt="image" src="https://github.com/user-attachments/assets/a981ab4b-e0ff-4b04-a20d-cb2722469784">
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 21:25:48 +01:00
adam closed this issue 2025-12-29 21:25:48 +01:00
Author
Owner

@mcmehrtens commented on GitHub (Jul 28, 2024):

I'd love to fix this quickly myself. I've never contributed to an open-source project before!

@mcmehrtens commented on GitHub (Jul 28, 2024): I'd love to fix this quickly myself. I've never contributed to an open-source project before!
Author
Owner

@mcmehrtens commented on GitHub (Aug 10, 2024):

Just want to double-check that I can open a PR for this :)

@mcmehrtens commented on GitHub (Aug 10, 2024): Just want to double-check that I can open a PR for this :)
Author
Owner

@arthanson commented on GitHub (Aug 12, 2024):

@mcmehrtens yes, and thank you. Will assign to you.

@arthanson commented on GitHub (Aug 12, 2024): @mcmehrtens yes, and thank you. Will assign to you.
Author
Owner

@jeremystretch commented on GitHub (Aug 26, 2024):

@mcmehrtens are you still planning to work on this issue?

@jeremystretch commented on GitHub (Aug 26, 2024): @mcmehrtens are you still planning to work on this issue?
Author
Owner

@mcmehrtens commented on GitHub (Aug 26, 2024):

@mcmehrtens are you still planning to work on this issue?

I'm so sorry, yes. I'll do it tonight. I was moving in to a new apartment last week :)

@mcmehrtens commented on GitHub (Aug 26, 2024): > @mcmehrtens are you still planning to work on this issue? I'm so sorry, yes. I'll do it tonight. I was moving in to a new apartment last week :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10019