material_custom.css 4.86 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* Material icon: https://developers.google.com/fonts/docs/material_icons */
/* Icon library: https://fonts.google.com/icons */
.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;  /* Preferred icon size */
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
  
    /* Support for all WebKit browsers. */
    -webkit-font-smoothing: antialiased;
    /* Support for Safari and Chrome. */
    text-rendering: optimizeLegibility;
  
    /* Support for Firefox. */
    -moz-osx-font-smoothing: grayscale;
  
    /* Support for IE. */
    font-feature-settings: 'liga';
}

Yuge Zhang's avatar
Yuge Zhang committed
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* viewcode link should have left padding */
span.viewcode-link {
    padding-left: 0.6rem;
}

/* adding an eyebrow for API references */
dt.sig-object {
    position: relative;
    background: #f4f5f7;
    padding: 0.5rem;
    border-left: 0.2rem solid #ec407a;  /* this should be matched with theme color. */
    word-wrap: break-word;
}

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
.class > dt.sig-object {
    border-left: none;                    /* remove left border */
    border-top: 0.18rem solid #ec407a;  /* this should be matched with theme color. */
}

.function > dt.sig-object {
    border-left: none;                    /* remove left border */
    border-top: 0.18rem solid #ec407a;  /* this should be matched with theme color. */
}

.exception > dt.sig-object {
    border-left: none;                    /* remove left border */
    border-top: 0.18rem solid #ec407a;  /* this should be matched with theme color. */
}

/* Padding on parameter list is not needed */
dl.field-list > dt {
    padding-left: 0 !important;
}

dl.field-list > dd {
    margin-left: 1.5em;
}

/* show headerlink when hover/focus */
.headerlink:focus, .headerlink:hover {
    -webkit-transform: translate(0);
    transform: translate(0);
    opacity: 1;
}

Yuge Zhang's avatar
Yuge Zhang committed
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/* logo is too large */
a.md-logo img {
    padding: 3px;
}

/* Add split for navigation */
nav.md-tabs .md-tabs__item:not(:last-child) {
    padding-right: 0;
}

nav.md-tabs .md-tabs__item:not(:last-child) .md-tabs__link:after {
    content: "»";
    font-family: "Material Icons";
    padding-left: 0.6rem;    
}

/* hide the floating button generated by readthedocs */
.rst-versions.rst-badge {
    display: none !important;
}

/* Add some margin between main content and footer */
.md-footer {
    margin-top: 1rem;
}

/* make footer appearing inline */
.md-footer-copyright__highlight {
    display: inline;
}
103
104
105
106
107

/* toc style */
.md-nav span.caption {
    margin-top: 1.25em;
}
Yuge Zhang's avatar
Yuge Zhang committed
108
109
110
111
112

/* citation style */
.citation dt {
    padding-right: 1em;
}
Yuge Zhang's avatar
Yuge Zhang committed
113

114
115
116
117
118
119
/* for release icon, on home page */
.release-icon {
    margin-left: 8px;
    width: 40px;
}

120
121
122
123
124
125
126
127
128
129
/* Similar to cardlink, but used in codesnippet in index page. see sphinx_gallery.css */
.codesnippet-card-container {
    display: flex;
    flex-flow: wrap row;
}

.codesnippet-card.admonition {
    border-left: 0;
    padding: 0;
    margin: .5rem 1rem 1rem 0rem;
130
131
132
133
134
    width: 100%;
}

/* Controlling the cards in containers only */
.codesnippet-card-container .codesnippet-card.admonition {
135
136
137
138
    width: 47%;
}

@media only screen and (max-width:59.9375em) {
139
    .codesnippet-card-container .codesnippet-card.admonition {
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
        width: 100%;
    }
}

.codesnippet-card .codesnippet-card-body {
    min-height: 4rem;
    position: relative;
    padding: 0.9rem 0.9rem 3rem 0.9rem;
}

.codesnippet-card .codesnippet-card-footer {
    padding: 0.8rem 0.9rem;
    border-top: 1px solid #ddd;
    margin: 0 !important;
    position: absolute;
    bottom: 0;
    width: 100%;
}

.codesnippet-card a:not(:hover) {
    color: rgba(0, 0, 0, .68);
}

.codesnippet-card-title-container {
    margin-top: 0.3rem;
    position: relative;
}

168
169
170
171
.codesnippet-card-title-container h4 {
    padding-left: 2.3rem;
    line-height: 1.6rem;
    height: 1.6rem;
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
    margin-top: 0;
}

.codesnippet-card-icon {
    position: absolute;
    top: 0;
    left: 0;
}

.codesnippet-card-icon img {
    max-width: 100%;
    max-height: 100%;
    /* horizontal and vertical center */
    /* https://stackoverflow.com/questions/7273338/how-to-vertically-align-an-image-inside-a-div */
    text-align: center;
    vertical-align: middle;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
}

.codesnippet-card-icon {
197
198
    width: 1.6rem;
    height: 1.6rem;
199
200
201
202
203
204
205
206
207
208
209
210
    padding: 0;
}

.codesnippet-card-link {
    position: relative;
}

.codesnippet-card-link .material-icons {
    position: absolute;
    right: 0;
}

Yuge Zhang's avatar
Yuge Zhang committed
211
212
213
214
215
216
/* fixes reference overlapping issue */
/* This is originally defined to be negative in application_fixes.css */
/* They did that to ensure the header doesn't disappear in jump links */
/* We did this by using scroll-margin-top instead */
dt:target {
    margin-top: 0.15rem !important;
217
    padding-top: 0.5rem !important;
Yuge Zhang's avatar
Yuge Zhang committed
218
219
    scroll-margin-top: 3.5rem;
}