netbox/netbox/project-static/styles/custom/_markdown.scss
bctiemann dab27695b9
Add styling to rendered-markdown class to clamp height and add scrollbar (#17237)
* Add clamp_height to the markdown filter which limits max height to 200 (scrollable) on the container div

* Remove clamp_height option, apply scrolling style to all markdown divs inside td's
2024-08-23 09:35:01 -04:00

49 lines
792 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 <p> elements inside a table cell
td > .rendered-markdown {
max-height: 200px;
overflow-y: scroll;
p:last-of-type {
margin-bottom: 0;
}
}
// Markdown preview
.markdown-widget {
.preview {
border: 1px solid $border-color;
border-radius: $border-radius;
min-height: 200px;
}
}