reduce custom field padding when using descriptions #10229

Closed
opened 2025-12-29 21:28:38 +01:00 by adam · 4 comments
Owner

Originally created by @ghost on GitHub (Sep 12, 2024).

Originally assigned to: @arthanson on GitHub.

Deployment Type

Self-hosted

NetBox Version

v.4.1.0

Python Version

3.10

Steps to Reproduce

create 2 custom fields
give both custom fields a description

Expected Behavior

custom field padding should be reduced between custom fields that have descriptions.

currently, when custom fields are next to each other and they don't have a description, the spacing is nice and tight. But as soon as you add a description to the custom field, the padding is too much.

Observed Behavior

image

Originally created by @ghost on GitHub (Sep 12, 2024). Originally assigned to: @arthanson on GitHub. ### Deployment Type Self-hosted ### NetBox Version v.4.1.0 ### Python Version 3.10 ### Steps to Reproduce create 2 custom fields give both custom fields a description ### Expected Behavior custom field padding should be reduced between custom fields that have descriptions. currently, when custom fields are next to each other and they don't have a description, the spacing is nice and tight. But as soon as you add a description to the custom field, the padding is too much. ### Observed Behavior ![image](https://github.com/user-attachments/assets/1799b0e3-2666-4c5e-bb7a-68c1a70bfb42)
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 21:28:38 +01:00
adam closed this issue 2025-12-29 21:28:38 +01:00
Author
Owner

@jeremystretch commented on GitHub (Sep 12, 2024):

@goteamkor you currently have 15 open issues, most have which have been tagged as needing an owner. Please consider volunteering to own some of the work you've proposed before opening additional issues.

@jeremystretch commented on GitHub (Sep 12, 2024): @goteamkor you currently have [15 open issues](https://github.com/netbox-community/netbox/issues/created_by/goteamkor), most have which have been tagged as needing an owner. Please consider volunteering to own some of the work you've proposed before opening additional issues.
Author
Owner

@ghost commented on GitHub (Sep 12, 2024):

@goteamkor you currently have 15 open issues, most have which have been tagged as needing an owner. Please consider volunteering to own some of the work you've proposed before opening additional issues.

@jeremystretch , I would LOVE to contribute. I got pretty far down in creating my own dev environment. The part that got me confused was when it came time to create pull requests. It's very intimidating for me since I'm not a programmer by trade.
Would you recommend any other contributors that might be willing to mentor/offer a bit of hand holding on the last few steps of kicking off my own contributions?

@ghost commented on GitHub (Sep 12, 2024): > @goteamkor you currently have [15 open issues](https://github.com/netbox-community/netbox/issues/created_by/goteamkor), most have which have been tagged as needing an owner. Please consider volunteering to own some of the work you've proposed before opening additional issues. @jeremystretch , I would LOVE to contribute. I got pretty far down in creating my own dev environment. The part that got me confused was when it came time to create pull requests. It's very intimidating for me since I'm not a programmer by trade. Would you recommend any other contributors that might be willing to mentor/offer a bit of hand holding on the last few steps of kicking off my own contributions?
Author
Owner

@jeremystretch commented on GitHub (Sep 12, 2024):

Our developer documentation has everything you need to get started. If you need help with something specific, I suggest starting a GitHub discussion.

@jeremystretch commented on GitHub (Sep 12, 2024): Our [developer documentation](https://netbox.readthedocs.io/en/stable/development/) has everything you need to get started. If you need help with something specific, I suggest starting a [GitHub discussion](https://github.com/netbox-community/netbox/discussions/new/choose).
Author
Owner

@atownson commented on GitHub (Sep 18, 2024):

I think the fix for this is to modify _markdown.scss.
Current:

// Remove the bottom margin of <p> elements inside a table cell
td > .rendered-markdown {
  max-height: 200px;
  overflow-y: scroll;

  p:last-of-type {
    margin-bottom: 0;
  }
}

Suggested change:

// Remove the bottom margin of <p> elements inside a table cell
.rendered-markdown {
  max-height: 200px;
  overflow-y: scroll;

  p:last-of-type {
    margin-bottom: 0;
  }
}

The styling doesn't apply for the custom field description in this case because it's not a child of <td>.

@atownson commented on GitHub (Sep 18, 2024): I think the fix for this is to modify _markdown.scss. Current: ``` // Remove the bottom margin of <p> elements inside a table cell td > .rendered-markdown { max-height: 200px; overflow-y: scroll; p:last-of-type { margin-bottom: 0; } } ``` Suggested change: ``` // Remove the bottom margin of <p> elements inside a table cell .rendered-markdown { max-height: 200px; overflow-y: scroll; p:last-of-type { margin-bottom: 0; } } ``` The styling doesn't apply for the custom field description in this case because it's not a child of `<td>`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10229