[PR #3972] [MERGED] Display borders around devices in rack elevations #12713

Closed
opened 2025-12-29 22:23:12 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/3972
Author: @hellerve
Created: 1/21/2020
Status: Merged
Merged: 1/21/2020
Merged by: @jeremystretch

Base: developHead: veit/fix-3964


📝 Commits (2)

  • 5f3f212 dcim: fix #3964 by moving away from properties to inline styles
  • a7a166a Merge branch 'develop' into veit/fix-3964

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 netbox/dcim/models/__init__.py (+1 -1)

📄 Description

Fixes: #3964

This PR fixes #3964 by moving away from a property an inline style for the fill, and adding the right class to a slot. Why an inline style? Because I learned that the override chain for properties in SVG is a little counterintuitive:

  • Properties such as <rect fill="#eee"> bind least strongly.
  • External stylesheets bind more strongly.
  • Inline style such as <rect style="fill: #eee"> binds most strongly, and can be overridden only by using !important.

Funny, no? Anyway, now the classes are set correctly, and the borders are back!

Cheers


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/3972 **Author:** [@hellerve](https://github.com/hellerve) **Created:** 1/21/2020 **Status:** ✅ Merged **Merged:** 1/21/2020 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `veit/fix-3964` --- ### 📝 Commits (2) - [`5f3f212`](https://github.com/netbox-community/netbox/commit/5f3f21215a46e39c98293a15ff030b78e5ca138e) dcim: fix #3964 by moving away from properties to inline styles - [`a7a166a`](https://github.com/netbox-community/netbox/commit/a7a166a9cbfa48c361a8903ef2345c2e0d07d5ee) Merge branch 'develop' into veit/fix-3964 ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/models/__init__.py` (+1 -1) </details> ### 📄 Description ### Fixes: #3964 This PR fixes #3964 by moving away from a property an inline style for the fill, and adding the right class to a slot. Why an inline style? Because I learned that the override chain for properties in SVG is a little counterintuitive: - Properties such as `<rect fill="#eee">` bind least strongly. - External stylesheets bind more strongly. - Inline style such as `<rect style="fill: #eee">` binds most strongly, and can be overridden only by using `!important`. Funny, no? Anyway, now the classes are set correctly, and the borders are back! Cheers --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 22:23:12 +01:00
adam closed this issue 2025-12-29 22:23:12 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12713