| 1 |
html { |
| 2 |
font-size: var(--pst-font-size-base); |
| 3 |
scroll-padding-top: calc(var(--pst-header-height) + 1rem); |
| 4 |
} |
| 5 |
|
| 6 |
body { |
| 7 |
background-color: var(--pst-color-background); |
| 8 |
font-family: var(--pst-font-family-base); |
| 9 |
font-weight: 400; |
| 10 |
line-height: $line-height-body; |
| 11 |
color: var(--pst-color-text-base); |
| 12 |
min-height: 100vh; |
| 13 |
display: flex; |
| 14 |
flex-direction: column; |
| 15 |
|
| 16 |
// hack to avoid the black background on some browser including Safari |
| 17 |
&::-webkit-scrollbar-track { |
| 18 |
background-color: var(--pst-color-background); |
| 19 |
} |
| 20 |
} |
| 21 |
|
| 22 |
p { |
| 23 |
margin-bottom: 1.15rem; |
| 24 |
font-size: 1em; |
| 25 |
|
| 26 |
/* section header in docstring pages */ |
| 27 |
&.rubric { |
| 28 |
border-bottom: 1px solid var(--pst-color-border); |
| 29 |
} |
| 30 |
|
| 31 |
&.centered { |
| 32 |
text-align: center; |
| 33 |
} |
| 34 |
} |
| 35 |
|
| 36 |
a { |
| 37 |
@include link-style-default; |
| 38 |
|
| 39 |
// The # anchor that appears on hover over headings |
| 40 |
&.headerlink { |
| 41 |
color: var(--pst-color-secondary); |
| 42 |
font-size: 0.8em; |
| 43 |
padding: 0 4px; |
| 44 |
margin-left: 0.2em; |
| 45 |
text-decoration: none; |
| 46 |
user-select: none; |
| 47 |
} |
| 48 |
|
| 49 |
// set up an icon next to the shorten links from github and gitlab |
| 50 |
&.github, |
| 51 |
&.gitlab { |
| 52 |
&::before { |
| 53 |
color: var(--pst-color-text-muted); |
| 54 |
font: var(--fa-font-brands); |
| 55 |
margin-right: 0.25rem; |
| 56 |
} |
| 57 |
} |
| 58 |
|
| 59 |
&.github::before { |
| 60 |
content: var(--pst-icon-github); |
| 61 |
} |
| 62 |
|
| 63 |
&.gitlab::before { |
| 64 |
content: var(--pst-icon-gitlab); |
| 65 |
} |
| 66 |
} |
| 67 |
|
| 68 |
%heading-style { |
| 69 |
margin: 2.75rem 0 1.05rem; |
| 70 |
font-family: var(--pst-font-family-heading); |
| 71 |
font-weight: var(--pst-font-weight-heading); |
| 72 |
line-height: 1.15; |
| 73 |
} |
| 74 |
|
| 75 |
// From 0.16.1, the preferred variable for headings is --pst-color-heading |
| 76 |
// if you have --pst-heading-color, this variable will be used, otherwise the default |
| 77 |
// --pst-color-heading will be used. |
| 78 |
h1 { |
| 79 |
@extend %heading-style; |
| 80 |
|
| 81 |
margin-top: 0; |
| 82 |
font-size: var(--pst-font-size-h1); |
| 83 |
color: var(--pst-heading-color, --pst-color-heading); |
| 84 |
} |
| 85 |
|
| 86 |
h2 { |
| 87 |
@extend %heading-style; |
| 88 |
|
| 89 |
font-size: var(--pst-font-size-h2); |
| 90 |
color: var(--pst-heading-color, --pst-color-heading); |
| 91 |
} |
| 92 |
|
| 93 |
h3 { |
| 94 |
@extend %heading-style; |
| 95 |
|
| 96 |
font-size: var(--pst-font-size-h3); |
| 97 |
color: var(--pst-heading-color, --pst-color-heading); |
| 98 |
} |
| 99 |
|
| 100 |
h4 { |
| 101 |
@extend %heading-style; |
| 102 |
|
| 103 |
font-size: var(--pst-font-size-h4); |
| 104 |
color: var(--pst-heading-color, --pst-color-heading); |
| 105 |
} |
| 106 |
|
| 107 |
h5 { |
| 108 |
@extend %heading-style; |
| 109 |
|
| 110 |
font-size: var(--pst-font-size-h5); |
| 111 |
color: var(--pst-color-text-base); |
| 112 |
} |
| 113 |
|
| 114 |
h6 { |
| 115 |
@extend %heading-style; |
| 116 |
|
| 117 |
font-size: var(--pst-font-size-h6); |
| 118 |
color: var(--pst-color-text-base); |
| 119 |
} |
| 120 |
|
| 121 |
small, |
| 122 |
.text_small { |
| 123 |
font-size: var(--pst-font-size-milli); |
| 124 |
} |
| 125 |
|
| 126 |
hr { |
| 127 |
border: 0; |
| 128 |
border-top: 1px solid var(--pst-color-border); |
| 129 |
} |
| 130 |
|
| 131 |
pre, |
| 132 |
code, |
| 133 |
kbd, |
| 134 |
samp { |
| 135 |
font-family: var(--pst-font-family-monospace); |
| 136 |
} |
| 137 |
|
| 138 |
kbd { |
| 139 |
// use theme negative |
| 140 |
background-color: var(--pst-color-on-background); |
| 141 |
color: var(--pst-color-text-muted); |
| 142 |
|
| 143 |
// Compound keyboard elements will have nested kbd in them, so this prevents double lines |
| 144 |
&:not(.compound) { |
| 145 |
border: 1px solid var(--pst-color-border); |
| 146 |
margin: 0 0.1rem; |
| 147 |
padding: 0.1rem 0.4rem; |
| 148 |
box-shadow: 1px 1px 1px var(--pst-color-shadow); |
| 149 |
} |
| 150 |
} |
| 151 |
|
| 152 |
code { |
| 153 |
color: var(--pst-color-inline-code); |
| 154 |
} |
| 155 |
|
| 156 |
pre { |
| 157 |
margin: 1.5em 0; |
| 158 |
padding: 1rem; |
| 159 |
background-color: var(--pst-color-surface); |
| 160 |
color: var(--pst-color-text-base); |
| 161 |
line-height: 1.2em; |
| 162 |
border: 1px solid var(--pst-color-border); |
| 163 |
border-radius: $admonition-border-radius; |
| 164 |
|
| 165 |
.linenos { |
| 166 |
// minimum opacity to make the line numbers WCAG AA conformant |
| 167 |
opacity: 0.8; |
| 168 |
padding-right: 10px; |
| 169 |
} |
| 170 |
} |
| 171 |
|
| 172 |
// the back to top btn |
| 173 |
#pst-back-to-top { |
| 174 |
// zindex-tooltip comes from Bootstrap https://getbootstrap.com/docs/5.2/layout/z-index/ |
| 175 |
z-index: $zindex-tooltip; |
| 176 |
position: fixed; |
| 177 |
display: none; |
| 178 |
top: 90vh; |
| 179 |
left: 50vw; |
| 180 |
transform: translate(-50%); |
| 181 |
color: var(--pst-color-secondary-text); |
| 182 |
background-color: var(--pst-color-secondary); |
| 183 |
border: none; |
| 184 |
|
| 185 |
.fa-arrow-up { |
| 186 |
// Using margin instead of a space character prevents the space between the |
| 187 |
// icon and the text from being underlined when the button is hovered. |
| 188 |
margin-inline-end: 0.5em; |
| 189 |
} |
| 190 |
|
| 191 |
&:hover { |
| 192 |
@include link-style-hover; |
| 193 |
|
| 194 |
text-decoration-thickness: 1px; |
| 195 |
background-color: var(--pst-color-secondary-highlight); |
| 196 |
color: var(--pst-color-secondary-highlight-text); |
| 197 |
} |
| 198 |
|
| 199 |
&:focus-visible { |
| 200 |
box-shadow: none; |
| 201 |
outline: $focus-ring-outline; |
| 202 |
outline-color: var(--pst-color-secondary); |
| 203 |
outline-offset: $focus-ring-width; |
| 204 |
} |
| 205 |
} |
| 206 |
|
| 207 |
// Focus ring |
| 208 |
// ---------- |
| 209 |
// Note: The Bootstrap stylesheet provides the focus ring (customized by this |
| 210 |
// theme via Sass variables in _bootstrap.scss) in some cases. This rule covers |
| 211 |
// all other cases. |
| 212 |
:focus-visible { |
| 213 |
outline: $focus-ring-outline; |
| 214 |
box-shadow: none; // override Bootstrap |
| 215 |
} |