Skip to content

Commit 3e2fed5

Browse files
authored
[PYT-135] Style Sphinx download buttons (Lightning-AI#8)
1 parent e6f37f0 commit 3e2fed5

File tree

4 files changed

+139
-0
lines changed

4 files changed

+139
-0
lines changed

images/arrow-down-orange.svg

Lines changed: 19 additions & 0 deletions
Loading

pytorch_sphinx_theme/static/css/theme.css

Lines changed: 55 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 19 additions & 0 deletions
Loading

scss/_sphinx_base.scss

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,3 +225,49 @@ article.pytorch-article {
225225
}
226226
}
227227
}
228+
229+
.pytorch-article {
230+
div.sphx-glr-download a {
231+
background-color: $light_grey;
232+
background-image: url("../images/arrow-down-orange.svg");
233+
background-repeat: no-repeat;
234+
background-position: left 10px center;
235+
background-size: 15px 15px;
236+
border-radius: 0;
237+
border: none;
238+
display: block;
239+
text-align: left;
240+
padding: rem(15px) rem(50px);
241+
position: relative;
242+
margin: rem(20px) auto;
243+
244+
@include animated_border_hover_state;
245+
246+
@include desktop {
247+
background-position: left 20px center;
248+
}
249+
250+
&:hover {
251+
box-shadow: none;
252+
text-decoration: none;
253+
background-image: url("../images/arrow-down-orange.svg");
254+
background-color: $light_grey;
255+
256+
span.pre {
257+
color: $content_text_color;
258+
}
259+
}
260+
261+
span.pre {
262+
background-color: transparent;
263+
font-size: rem(18px);
264+
padding: 0;
265+
color: $quick_start_grey;
266+
font-weight: 300;
267+
}
268+
269+
code, kbd, pre, samp, span.pre {
270+
font-family: FreightSans, Helvetica Neue, Helvetica, Arial, sans-serif;
271+
}
272+
}
273+
}

0 commit comments

Comments
 (0)