8000 Merge pull request #27798 from timhoffm/doc-gallery-height · matplotlib/matplotlib@fd5f164 · GitHub
[go: up one dir, main page]

Skip to content

Commit fd5f164

Browse files
authored
Merge pull request #27798 from timhoffm/doc-gallery-height
Fix sphinx-gallery CSS
2 parents 2fa85ee + 5d1f2ae commit fd5f164

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

doc/_static/mpl.css

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,13 @@ html[data-theme="dark"] .sphx-glr-thumbcontainer {
8585
background-color: rgb(63, 63, 63);
8686
}
8787

88-
/* workaround: the default padding decenters the image inside the frame */
89-
.sphx-glr-thumbcontainer .figure {
90-
padding: 0;
88+
/* Set a fixed height so that lazy loading does not change heights. Without a fixed
89+
* height lazy loading of images interferes with anchor links: Clicking a link goes to
90+
* a certain position, but then the loaded images add content and move the anchor to a
91+
* different position.
92+
*/
93+
.sphx-glr-thumbcontainer img {
94+
height: 112px;
9195
}
9296

9397
/* hide download buttons in example headers

0 commit comments

Comments
 (0)
0