Skip to content

Commit b1092a4

Browse files
berlin2123gabalafou
andcommitted
optimize figure bottom margin (pydata#1749)
* figure bottom margin Avoid multiple margin-bottom by `p` and `figure`, that result in too wide a bottom margin. * Update _figures.scss * Only adjust margins at top and bottom of figcaption --------- Co-authored-by: gabalafou <[email protected]>
1 parent ecf2ea7 commit b1092a4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/pydata_sphinx_theme/assets/styles/content/_figures.scss

+6
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ figure {
1515
color: var(--pst-color-text-muted);
1616
margin-left: auto;
1717
margin-right: auto;
18+
margin-top: 0.3rem;
19+
20+
& > p:last-child {
21+
// Don't add extra margin to already existing figure bottom margin
22+
margin-bottom: 0;
23+
}
1824

1925
table.table {
2026
width: fit-content;

0 commit comments

Comments
 (0)