Skip to content

Commit

Permalink
optimize figure bottom margin (pydata#1749)
Browse files Browse the repository at this point in the history
* 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 <gabriel@fouasnon.com>
  • Loading branch information
berlin2123 and gabalafou authored Apr 11, 2024
1 parent 662758e commit 733d9f3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/pydata_sphinx_theme/assets/styles/content/_figures.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ figure {
color: var(--pst-color-text-muted);
margin-left: auto;
margin-right: auto;
margin-top: 0.3rem;

& > p:last-child {
// Don't add extra margin to already existing figure bottom margin
margin-bottom: 0;
}

table.table {
width: fit-content;
Expand Down

0 comments on commit 733d9f3

Please sign in to comment.