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
|
/*
Furo theme CSS variables:
https://github.com/pradyunsg/furo/blob/main/src/furo/assets/styles/variables/_index.scss
*/
:root {
--color-primary: #0094ff; /* custom variable */
--color-primary--dark: #0080dd; /* custom variable */
--color-primary--light: #6cc1ff; /* custom variable */
--color-brand-primary: var(--color-primary--dark);
--color-brand-content: var(--color-primary--dark);
--admonition-font-size: var(--font-size--normal);
--sidebar-item-font-size: 95%;
--toc-font-size: .87rem;
--toc-font-size--level1: .95rem; /* custom variable */
--toc-title-font-size: var(--sidebar-caption-font-size);
--color-toc-item-text: var(--color-sidebar-caption-text);
--color-toc-title-text: var(--color-sidebar-caption-text);
--toc-item-spacing-horizontal: 1em;
--toc-item-spacing-vertical: 0.3em;
--toc-item-spacing-vertical--level1: 0.7em;
--color-toc-item-text: #696969;
--color-toc-item-text--level1: var(--color-brand-content); /* custom variable */
--code-font-size: 90%;
--inline-code-font-size: 93%;
--color-inline-code-foreground: #005fa1;
--admonition-font-size: 95%;
--admonition-title-font-size: 100%;
}
@media (prefers-color-scheme: dark) {
:root {
--color-brand-primary: var(--color-primary--light);
--color-brand-content: var(--color-primary--light);
--color-inline-code-foreground: #b2deff;
--color-toc-item-text--level1: rgba(255, 255, 255, 95%); /* custom variable */
--color-toc-item-text: #bbb;
--color-sidebar-caption-text: var(--color-brand-content);
--color-sidebar-link-text--top-level: rgba(255, 255, 255, 95%);
--color-sidebar-link-text: #ccc;
}
}
/*
Layout
- give more space to right ToC drawer
- increase .content padding to keep the right drawer on the right side
*/
.content {
padding: 0 4rem;
width: 46rem;
}
@media only screen and (max-width: 700px) {
.content {
padding: 0 1rem;
}
}
.toc-drawer {
flex: 1;
max-width: 40ch;
}
.toc-sticky {
padding-right: 1em;
}
/*
Typography
- increase font size and limits line width
- increase paragraph and list items spacing
- use a dark blue for code.literal
*/
h1, h2, h3 {
color: var(--color-brand-primary);
}
h2, h3 {
margin: 1.25em 0 .5em;
}
h1 + .section h2:first-of-type,
h2 + .section h3:first-of-type {
margin-top: .5em;
}
.content {
/* blindly taken from Google web.dev website. May be non-sense. */
font-size: clamp(1em, 1.7578125vw, 1.125em);
line-height: 1.6;
}
article {
max-width: 72ch;
line-height: 1.6;
}
.section > p {
margin: 1.2em 0;
}
code.literal {
font-size: var(--inline-code-font-size);
padding: 0.15em 0.25em;
color: var(--color-inline-code-foreground);
background: var(--color-inline-code-background);
}
a code.literal {
color: var(--color-brand-content);
}
.section > p + ul, .section > p + ol {
margin-top: -0.25em;
}
ul > li, ol > li {
margin: 0.75em 0;
}
ul > li li, ol > li li {
margin: 0.25em 0;
}
.table-wrapper {
padding: .2rem .2rem 0;
}
/*
Admonitions
- use a bigger font-size, not much different from main content
- fix icon vertical alignment
*/
.admonition {
margin: 1.5em auto;
}
.admonition p.admonition-title::before { /* adjust icon vertical centering */
top: 0.65em;
}
/* Version changed/added */
.versionchanged, .versionadded {
margin: .5em 0;
padding: .5em .8em;
font-size: 90%;
background: var(--color-admonition-title-background--note);
border-radius: 5px;
}
.versionadded {
background: var(--color-admonition-title-background--tip);
}
.versionmodified {
font-weight: 600;
}
/*
Right table of contents
- replace title "Contents" with "On this page" and use the same style as
sidebar labels
- increase font-size and spacing, emphasize 1st level items
*/
.toc-drawer {
padding-right: 0.2rem;
}
.toc-tree {
line-height: 1.2;
}
.toc-tree > ul > li:first-child {
margin-top: 0;
}
.toc-tree > ul > li > ul > li { /* 1st-level ToC items */
padding-top: var(--toc-item-spacing-vertical--level1);
font-size: var(--toc-font-size--level1);
}
.toc-tree > ul > li > ul > li .reference { /* 1st-level anchors */
color: var(--color-toc-item-text--level1);
}
.toc-tree > ul > li > ul > li > ul li { /* Other levels ToC items */
padding-top: var(--toc-item-spacing-vertical);
font-size: var(--toc-font-size);
}
.toc-tree > ul > li > ul > li > ul li .reference { /* Other levels ToC items */
color: var(--color-toc-item-text);
}
.toc-tree .reference:hover {
text-decoration: underline;
}
.toc-tree .scroll-current .reference:hover {
text-decoration: none;
}
table.docutils td {
padding: .2em .3em;
}
.toc-title {
display: none;
}
.toc-title-container::before {
content: "On this page";
font-weight: bold;
font-size: var(--toc-title-font-size);
padding-left: var(--toc-spacing-horizontal);
text-transform: uppercase;
color: var(--color-toc-title-text);
}
/* Miscellaneous */
#user-guide .caption {
display: none;
}
.sidebar-logo {
margin: .5em auto 0;
}
.field-list.simple {
margin-top: 1em;
}
#user-guide.section li.toctree-l1 {
margin-top: .25em;
}
#user-guide.section li.toctree-l2 {
font-size: 95%;
margin-top: 0;
}
.highlight .hll {
display: block;
background-color: hsla(60, 100%, 50%, .3);
}
|