Skip to content

Commit 2d858b1

Browse files
patmellonbrsoff
authored andcommitted
[PYT-210] Update Gallery cards (Lightning-AI#44)
* [PYT-210] Update Gallery cards * Tweak gallery sizing
1 parent cf3f5ba commit 2d858b1

File tree

2 files changed

+87
-29
lines changed

2 files changed

+87
-29
lines changed

pytorch_sphinx_theme/static/css/theme.css

Lines changed: 43 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scss/_sphinx_base.scss

Lines changed: 44 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -252,29 +252,55 @@ article.pytorch-article {
252252
}
253253
}
254254

255-
.sphx-glr-thumbcontainer {
256-
border: 1px solid #d6d7d8 !important;
257-
-webkit-border-radius: 0 !important;
258-
border-radius: 0 !important;
255+
article.pytorch-article .sphx-glr-thumbcontainer {
256+
margin: 0;
257+
border: 1px solid #d6d7d8 ;
258+
border-radius: 0;
259+
width: 45%;
260+
text-align: center;
261+
margin-bottom: 5%;
262+
263+
@media screen and (max-width: $sphinx_medium_width - 1px) {
264+
&:nth-child(odd) {
265+
margin-left: 0;
266+
margin-right: 2.5%;
267+
}
268+
269+
&:nth-child(even) {
270+
margin-right: 0;
271+
margin-left: 2.5%;
272+
}
273+
}
274+
275+
@include sphinx-medium-size {
276+
margin-right: 3%;
277+
margin-bottom: 3%;
278+
width: 30%;
279+
}
280+
259281
.caption-text {
260282
a {
261283
font-size: rem(16px);
262-
color: $quick_start_grey;
284+
color: $not_quite_black;
263285
letter-spacing: 0;
264286
line-height: rem(24px);
265-
&:hover {
266-
color: $not_quite_black;
267-
text-decoration: none;
268-
}
287+
text-decoration: none;
269288
}
270289
}
290+
271291
&:hover {
272292
.figure:before {
273293
bottom: 100%;
274294
}
275-
box-shadow: none !important;
276-
border-bottom-color: $white !important;
295+
296+
box-shadow: none;
297+
border-bottom-color: $white;
298+
}
299+
300+
.figure {
301+
width: 80%;
277302
}
303+
278304
.figure:before {
279305
content: "";
280306
display: block;
@@ -283,8 +309,14 @@ article.pytorch-article {
283309
bottom: 35%;
284310
left: 0;
285311
right: 0;
286-
background: rgba(151, 155, 151, 0.2);
312+
background: #8A94B3;
313+
opacity: 0.10;
314+
}
315+
316+
.figure a.reference.internal {
317+
text-align: left;
287318
}
319+
288320
@include animated_border_hover_state;
289321
}
290322

0 commit comments

Comments
 (0)