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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 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 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 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 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 168 169 170 171 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 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264
|
/**
* This is a general styling sheet.
* It should be used for customizations that affect multiple pages.
*
* This file is compiled into styles/custom.css by sphinxcontrib.sass, see:
* https://sass-lang.com/guide/
*/
/* Global */
code.literal {
border: 0;
}
/* Version switcher */
.version-switcher__menu.dropdown-menu {
// The version switcher is aligned right so we need to avoid the dropdown menu
// to be cut off by the right boundary
left: unset;
right: 0;
a.list-group-item.sk-avail-docs-link {
display: flex;
align-items: center;
&:after {
content: var(--pst-icon-external-link);
font: var(--fa-font-solid);
font-size: 0.75rem;
margin-left: 0.5rem;
}
}
}
/* Primary sidebar */
.bd-sidebar-primary {
width: 22.5%;
min-width: 16rem;
// The version switcher button in the sidebar is ill-styled
button.version-switcher__button {
margin-bottom: unset;
margin-left: 0.3rem;
font-size: 1rem;
}
// The section navigation part is to close to the right boundary (originally an even
// larger negative right margin was used)
nav.bd-links {
margin-right: -0.5rem;
}
}
/* Article content */
.bd-article {
h1 {
font-weight: 500;
margin-bottom: 2rem;
}
h2 {
font-weight: 500;
margin-bottom: 1.5rem;
}
// Avoid changing the aspect ratio of images; add some padding so that at least
// there is some space between image and background in dark mode
img {
height: unset !important;
padding: 1%;
}
// Resize table of contents to make the top few levels of headings more visible
li.toctree-l1 {
padding-bottom: 0.5em;
> a {
font-size: 150%;
font-weight: bold;
}
}
li.toctree-l2,
li.toctree-l3,
li.toctree-l4 {
margin-left: 15px;
}
}
/* Dropdowns (sphinx-design) */
details.sd-dropdown {
&:hover > summary.sd-summary-title {
> .sd-summary-text > a.headerlink {
visibility: visible;
}
> .sk-toggle-all {
opacity: 1;
}
}
> summary.sd-summary-title {
> .sd-summary-text > a.headerlink {
font-size: 1rem;
}
// See `js/scripts/dropdown.js`: this is styling the "expand/collapse all" button
> .sk-toggle-all {
color: var(--pst-sd-dropdown-color);
margin-right: 0.5rem;
pointer-events: auto !important;
opacity: 0;
}
}
}
/* Tabs (sphinx-design) */
.sd-tab-set {
--tab-caption-width: 0%; // No tab caption by default
margin-top: 1.5rem;
&::before {
// Set `content` for tab caption
width: var(--tab-caption-width);
display: flex;
align-items: center;
font-weight: bold;
}
.sd-tab-content {
padding: 0.5rem 0 0 0 !important;
background-color: transparent !important;
border: none !important;
> p:first-child {
margin-top: 1rem !important;
}
}
> label.sd-tab-label {
margin: 0 3px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 5px !important;
&.tab-6 {
width: calc((100% - var(--tab-caption-width)) / 2 - 6px) !important;
}
&.tab-4 {
width: calc((100% - var(--tab-caption-width)) / 3 - 6px) !important;
}
}
> input:checked + label.sd-tab-label {
transform: unset;
border: 2px solid var(--pst-color-primary);
}
}
/* Download/launcher links and top hint (sphinx-gallery) */
// https://sphinx-gallery.github.io/stable/advanced.html#using-sphinx-gallery-sidebar-components
.sphx-glr-download-link-note,
.binder-badge,
.lite-badge,
.sphx-glr-download-jupyter,
.sphx-glr-download-python,
.sphx-glr-download-zip {
display: none;
}
/* scikit-learn buttons */
a.btn {
&.sk-btn-orange {
background-color: var(--sk-orange-tint-1);
color: black !important;
&:hover {
background-color: var(--sk-orange-tint-3);
}
}
&.sk-btn-cyan {
background-color: var(--sk-cyan-shades-2);
color: white !important;
&:hover {
background-color: var(--sk-cyan-shades-1);
}
}
}
/* scikit-learn avatar grid, see build_tools/generate_authors_table.py */
div.sk-authors-container {
display: flex;
flex-wrap: wrap;
justify-content: center;
> div {
width: 6rem;
margin: 0.5rem;
font-size: 0.9rem;
}
}
/* scikit-learn text-image grid, used in testimonials and sponsors pages */
@mixin sk-text-image-grid($img-max-height) {
display: flex;
align-items: center;
flex-wrap: wrap;
div.text-box,
div.image-box {
width: 50%;
@media screen and (max-width: 500px) {
width: 100%;
}
}
div.text-box .annotation {
font-size: 0.9rem;
font-style: italic;
color: var(--pst-color-text-muted);
}
div.image-box {
text-align: center;
img {
max-height: $img-max-height;
max-width: 50%;
}
}
}
div.sk-text-image-grid-small {
@include sk-text-image-grid(60px);
}
div.sk-text-image-grid-large {
@include sk-text-image-grid(100px);
}
/* Responsive three-column grid list */
.grid-list-three-columns {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1rem;
@media screen and (max-width: 500px) {
grid-template-columns: 1fr;
}
}
|