From a5ce61f5a453cd8a6005dc408eed8f034ea8df4b Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Sun, 19 Sep 2021 20:34:54 +0200 Subject: [PATCH] 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. --- doc/_static/mpl.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/_static/mpl.css b/doc/_static/mpl.css index aa8878340286..5f62cd3c95c7 100644 --- a/doc/_static/mpl.css +++ b/doc/_static/mpl.css @@ -213,6 +213,10 @@ does not float with it. margin: 5px 2px; } +/* workaround: the default padding decenters the image inside the frame */ +.sphx-glr-thumbcontainer .figure { + padding: 0; +} table.property-table th, table.property-table td {