SVG UI elements background issues in dark mode #9542

Closed
opened 2025-12-29 20:51:15 +01:00 by adam · 2 comments
Owner

Originally created by @jsenecal on GitHub (Apr 25, 2024).

Originally assigned to: @arthanson on GitHub.

Deployment Type

Self-hosted

NetBox Version

v4.0-beta2

Python Version

3.11

Steps to Reproduce

1- Create a 42 RU rack
2- Create two devices-types with interfaces, then two devices of this type and assign them to this rack.
3- Connect the interfaces together using a cable
4- Navigate the Rack elevation or perform a cable trace

(step 4 can also be simply executed on https://beta-demo.netbox.dev/ with existing demo data)

Expected Behavior

SVG objects should have their color-scheme set to auto, which should display a transparent background, and white text for labels in dark mode.

image
image

Observed Behavior

SVG objects are displaying a white background (and black text) with bad looking padding which is not aligned with the rest of the UI. This is observed on a chrome based browser. Safari seems to have a transparent background which lack contrast with the text.

image
image

Originally created by @jsenecal on GitHub (Apr 25, 2024). Originally assigned to: @arthanson on GitHub. ### Deployment Type Self-hosted ### NetBox Version v4.0-beta2 ### Python Version 3.11 ### Steps to Reproduce 1- Create a 42 RU rack 2- Create two devices-types with interfaces, then two devices of this type and assign them to this rack. 3- Connect the interfaces together using a cable 4- Navigate the Rack elevation or perform a cable trace (step 4 can also be simply executed on https://beta-demo.netbox.dev/ with existing demo data) ### Expected Behavior SVG objects should have their color-scheme set to auto, which should display a transparent background, and white text for labels in dark mode. ![image](https://github.com/netbox-community/netbox/assets/1564902/fea33c29-f1f7-4f74-ab29-e7259c89bf21) ![image](https://github.com/netbox-community/netbox/assets/1564902/31461b67-8912-4e37-a40a-8d57a084c47b) ### Observed Behavior SVG objects are displaying a white background (and black text) with bad looking padding which is not aligned with the rest of the UI. This is observed on a chrome based browser. Safari seems to have a transparent background which lack contrast with the text. ![image](https://github.com/netbox-community/netbox/assets/1564902/6aaf4398-bc1c-434e-b68a-75b4216293fd) ![image](https://github.com/netbox-community/netbox/assets/1564902/22d53d5d-2e8d-4452-86fc-22aee229bc41)
adam added the type: bugbetatopic: UI/UXseverity: low labels 2025-12-29 20:51:15 +01:00
adam closed this issue 2025-12-29 20:51:16 +01:00
Author
Owner

@arthanson commented on GitHub (Apr 26, 2024):

This is a superset of #15819 leaving this one open as it shows there are more effects then just the rack-elevation.

@arthanson commented on GitHub (Apr 26, 2024): This is a superset of #15819 leaving this one open as it shows there are more effects then just the rack-elevation.
Author
Owner

@arthanson commented on GitHub (Apr 26, 2024):

The rack one I think is HTMX enabled issue only, it works fine on mine if that is not enabled. I do see the cable trace one being the wrong background even if HTMX is not enabled. Strangely safari displays it fine but chrome does not.

@arthanson commented on GitHub (Apr 26, 2024): The rack one I think is HTMX enabled issue only, it works fine on mine if that is not enabled. I do see the cable trace one being the wrong background even if HTMX is not enabled. Strangely safari displays it fine but chrome does not.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9542