|
| 1 | +@charset "UTF-8"; |
| 2 | +/* Styles for PEPs |
| 3 | +
|
| 4 | +Changes for ePub: |
| 5 | + - header line height reduced |
| 6 | + - horizontal line made invisible |
| 7 | + - ePub reading mode added |
| 8 | + - link target rules added |
| 9 | + - breadcrumbs and sidebar rules removed |
| 10 | +
|
| 11 | +Colours: |
| 12 | +white: |
| 13 | + background |
| 14 | + footnotes/references vertical border |
| 15 | +#333 |
| 16 | + body text |
| 17 | +#888 |
| 18 | + blockquote left line |
| 19 | + header breadcrumbs separator |
| 20 | + link underline (hovered/focussed) |
| 21 | +#ccc: |
| 22 | + scrollbar |
| 23 | +#ddd |
| 24 | + header bottom border |
| 25 | + horizontal rule |
| 26 | + table vertical border |
| 27 | +#eee: |
| 28 | + link underline |
| 29 | + table rows & top/bottom border |
| 30 | + PEP header rows |
| 31 | + footnotes/references rows |
| 32 | + admonition note background |
| 33 | +#f8f8f8: |
| 34 | + inline code background |
| 35 | +
|
| 36 | +#0072aa: |
| 37 | + links |
| 38 | +# fee: |
| 39 | + admonition warning background |
| 40 | +
|
| 41 | +*/ |
| 42 | + |
| 43 | +/* Set master rules */ |
| 44 | +* {box-sizing: border-box} |
| 45 | +html { |
| 46 | + overflow-y: scroll; |
| 47 | + -webkit-font-smoothing: antialiased; |
| 48 | + margin: 0; |
| 49 | + line-height: 1.4rem; |
| 50 | + font-weight: normal; |
| 51 | + font-size: 1rem; |
| 52 | + font-family: "Source Sans Pro", Arial, sans-serif; |
| 53 | +} |
| 54 | +body { |
| 55 | + writing-mode: horizontal-tb; |
| 56 | + line-break: normal; |
| 57 | + -epub-writing-mode: horizontal-tb; |
| 58 | + -webkit-writing-mode: horizontal-tb; |
| 59 | + -epub-line-break: normal; |
| 60 | + -webkit-line-break: normal; |
| 61 | + margin: 0; |
| 62 | + color: #333; |
| 63 | + background-color: white; |
| 64 | +} |
| 65 | +section#pep-page-section { |
| 66 | + padding: 0.25rem 0.25rem 0; |
| 67 | + display: table; |
| 68 | +} |
| 69 | + |
| 70 | +/* Reduce margin sizes for body text */ |
| 71 | +p {margin: .5rem 0} |
| 72 | + |
| 73 | +/* Header rules */ |
| 74 | +h1.page-title { |
| 75 | + line-height: 2.3rem; |
| 76 | + font-size: 2rem; |
| 77 | + font-weight: bold; |
| 78 | + margin-top: 2rem; |
| 79 | + margin-bottom: 1.5rem; |
| 80 | +} |
| 81 | +h2 { |
| 82 | + font-size: 1.6rem; |
| 83 | + font-weight: bold; |
| 84 | + margin-top: 1rem; |
| 85 | + margin-bottom: .5rem; |
| 86 | +} |
| 87 | +h3 { |
| 88 | + font-size: 1.4rem; |
| 89 | + font-weight: normal; |
| 90 | + margin-top: 1rem; |
| 91 | + margin-bottom: 0.5rem; |
| 92 | +} |
| 93 | +h4 { |
| 94 | + font-size: 1.2rem; |
| 95 | + font-weight: normal; |
| 96 | + margin-top: .5rem; |
| 97 | + margin-bottom: 0; |
| 98 | +} |
| 99 | +h5, |
| 100 | +h6 { |
| 101 | + font-size: 1rem; |
| 102 | + font-weight: bold; |
| 103 | + margin-top: 0; |
| 104 | + margin-bottom: 0; |
| 105 | +} |
| 106 | + |
| 107 | +/* Anchor link rules */ |
| 108 | +a, |
| 109 | +a:active, |
| 110 | +a:visited { |
| 111 | + color: #0072aa; |
| 112 | + text-decoration-color: #eee; |
| 113 | + display: inline; |
| 114 | +} |
| 115 | +a:hover, |
| 116 | +a:focus { |
| 117 | + text-decoration-color: #888; |
| 118 | +} |
| 119 | + |
| 120 | +/* Blockquote rules */ |
| 121 | +blockquote { |
| 122 | + font-style: italic; |
| 123 | + border-left: 1px solid #888; |
| 124 | + margin: .5rem; |
| 125 | + padding: .5rem 1rem; |
| 126 | +} |
| 127 | +blockquote em { |
| 128 | + font-style: normal; |
| 129 | +} |
| 130 | + |
| 131 | +cite { |
| 132 | + font-style: italic; |
| 133 | +} |
| 134 | + |
| 135 | +/* Code rules (code literals and Pygments highlighting blocks) */ |
| 136 | +pre, |
| 137 | +code { |
| 138 | + font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "DejaVu Sans Mono", Consolas, monospace; |
| 139 | + white-space: pre-wrap; |
| 140 | + word-wrap: break-word; |
| 141 | + -webkit-hyphens: none; |
| 142 | + hyphens: none; |
| 143 | +} |
| 144 | +code.literal { |
| 145 | + font-size: .8em; |
| 146 | + background-color: #f8f8f8; |
| 147 | +} |
| 148 | +pre { |
| 149 | + padding: .5rem .75rem; |
| 150 | +} |
| 151 | + |
| 152 | +/* Definition list rules */ |
| 153 | +dl dt { |
| 154 | + font-weight: bold; |
| 155 | +} |
| 156 | +dl dd { |
| 157 | + margin: 0; |
| 158 | +} |
| 159 | + |
| 160 | +/* Horizontal rule rule */ |
| 161 | +hr { |
| 162 | + display: none; |
| 163 | +} |
| 164 | +/*Image rules */ |
| 165 | +img { |
| 166 | + max-width: 100%; |
| 167 | +} |
| 168 | +a img { |
| 169 | + display: block; |
| 170 | + margin: 0 auto; |
| 171 | +} |
| 172 | + |
| 173 | +/* List rules */ |
| 174 | +ul, |
| 175 | +ol { |
| 176 | + padding: 0; |
| 177 | + margin: 0 0 0 1.5rem; |
| 178 | +} |
| 179 | +ul {list-style: square} |
| 180 | +ol.arabic {list-style: decimal} |
| 181 | +ol.loweralpha {list-style: lower-alpha} |
| 182 | +ol.upperalpha {list-style: upper-alpha} |
| 183 | +ol.lowerroman {list-style: lower-roman} |
| 184 | +ol.upperroman {list-style: upper-roman} |
| 185 | + |
| 186 | +/* Maths rules */ |
| 187 | +sub, |
| 188 | +sup { |
| 189 | + font-size: .75em; |
| 190 | + line-height: 0; |
| 191 | + position: relative; |
| 192 | + vertical-align: baseline; |
| 193 | +} |
| 194 | +sup {top: -0.5em} |
| 195 | +sub {bottom: -0.25em} |
| 196 | + |
| 197 | +/* Table rules */ |
| 198 | +table { |
| 199 | + width: 100%; |
| 200 | + border-collapse: collapse; |
| 201 | + border-top: 1px solid #eee; |
| 202 | + border-bottom: 1px solid #eee; |
| 203 | +} |
| 204 | +table caption { |
| 205 | + margin: 1rem 0 .75rem; |
| 206 | +} |
| 207 | +table tbody tr:nth-of-type(odd) { |
| 208 | + background-color: #eee; |
| 209 | +} |
| 210 | +table th, |
| 211 | +table td { |
| 212 | + text-align: left; |
| 213 | + padding: 0.25rem 0.5rem 0.2rem; |
| 214 | +} |
| 215 | +table td + td { |
| 216 | + border-left: 1px solid #ddd; |
| 217 | +} |
| 218 | + |
| 219 | +/* Admonitions rules */ |
| 220 | +div.note, |
| 221 | +div.warning { |
| 222 | + padding: 0.5rem 0.75rem; |
| 223 | + margin-top: 1rem; |
| 224 | + margin-bottom: 1rem; |
| 225 | +} |
| 226 | +div.note { |
| 227 | + background-color: #eee; |
| 228 | +} |
| 229 | +div.warning { |
| 230 | + background-color: #fee; |
| 231 | +} |
| 232 | +p.admonition-title { |
| 233 | + font-weight: bold; |
| 234 | +} |
| 235 | + |
| 236 | +/* PEP Header / references rules */ |
| 237 | +dl.rfc2822, |
| 238 | +dl.footnote { |
| 239 | + display: grid; |
| 240 | + grid-template-columns: fit-content(30%) auto; |
| 241 | + width: 100%; |
| 242 | + border-top: 1px solid #eee; |
| 243 | + border-bottom: 1px solid #eee; |
| 244 | +} |
| 245 | +dl.rfc2822 > dt, dl.rfc2822 > dd, |
| 246 | +dl.footnote > dt, dl.footnote > dd { |
| 247 | + padding: .25rem .5rem .2rem; |
| 248 | +} |
| 249 | +dl.rfc2822 > dt:nth-of-type(even), dl.rfc2822 > dd:nth-of-type(even), |
| 250 | +dl.footnote > dt:nth-of-type(even), dl.footnote > dd:nth-of-type(even) { |
| 251 | + background-color: #eee; |
| 252 | +} |
| 253 | +dl.footnote > dt { |
| 254 | + font-weight: normal; |
| 255 | + border-right: 1px solid white; |
| 256 | +} |
| 257 | + |
| 258 | +/* Link-target rules */ |
| 259 | +.link-target { |
| 260 | + font-size: 80%; |
| 261 | +} |
| 262 | + |
| 263 | +table .link-target { |
| 264 | + /* Do not show links in tables, there is not enough space */ |
| 265 | + display: none; |
| 266 | +} |
0 commit comments