netbox/netbox/project-static/styles/custom/_markdown.scss
Arthur Hanson 27a39339df
17464 fix margins for custom-field markdown description (#17775)
* 17464 fix margins for custom-field markdown description

* 17464 fix margins for custom-field markdown description

* 17464 review changes

* 17464 update comments
2024-10-16 16:53:21 -04:00

52 lines
871 B
SCSS

// Rendered Markdown
.rendered-markdown {
table {
width: 100%;
// Apply a border
th {
border-bottom: 2px solid #dddddd;
padding: 8px;
}
td {
border-top: 1px solid #dddddd;
padding: 8px;
}
// Map "align" attr of column headings
th[align="left"] {
text-align: left;
}
th[align="center"] {
text-align: center;
}
th[align="right"] {
text-align: right;
}
}
}
// Remove the bottom margin of the last <p> elements in markdown
.rendered-markdown {
p:last-of-type {
margin-bottom: 0;
}
}
// fix layout of rendered markdown inside a table cell
td > .rendered-markdown {
max-height: 200px;
overflow-y: scroll;
}
// Markdown preview
.markdown-widget {
.preview {
border: 1px solid $border-color;
border-radius: $border-radius;
min-height: 200px;
}
}