Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 652a7b7

Browse files
committed
Fix decenter of image in gallery thumbnails
When using the default padding and the pydata-sphinx-theme, the image is shifted away from the center. While that should be fixed in sphinx-gallery (and I will report it there), this serves as a workaround on the matplotlib side, because I don't think they will have it fixed ready for the 3.5 release.
1 parent 820cf1f commit 652a7b7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/_static/mpl.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,10 @@ does not float with it.
213213
margin: 5px 2px;
214214
}
215215

216+
/* workaround: the default padding decenters the image inside the frame */
217+
.sphx-glr-thumbcontainer .figure {
218+
padding: 0;
219+
}
216220

217221
table.property-table th,
218222
table.property-table td {

0 commit comments

Comments
 (0)