@charset "UTF-8"; /* Styles for PEPs */ /* * `initial` works like undefined variables, so `var(intial, x)` will resolve to `x`. * A space means an empty value, so `var( , x) y` will resolve to `y`. */ @media (prefers-color-scheme: dark) { :root { --light: ; --dark: initial; } } @media (prefers-color-scheme: light) { :root { --dark: ; --light: initial; } } :root[data-colour_scheme="dark"] { --light: ; --dark: initial; } :root[data-colour_scheme="light"] { --dark: ; --light: initial; } /* Set master colours */ :root { --colour-background: var(--light, white) var(--dark, #011); --colour-background-accent: var(--light, #eee) var(--dark, #333); --colour-text: var(--light, #333) var(--dark, #ccc); --colour-links: var(--light, #0072aa) var(--dark, #8bf); --colour-scrollbar: var(--light, #ccc) var(--dark, #333); --colour-rule-strong: var(--light, #888) var(--dark, #777); --colour-rule-light: var(--light, #ddd) var(--dark, #222); --colour-inline-code: var(--light, #f8f8f8) var(--dark, #333); --colour-warning: var(--light, #fee) var(--dark, #900); } img.invert-in-dark-mode { filter: var(--dark, invert(1)); } /* Set master rules */ * {box-sizing: border-box} :root {color-scheme: light dark} html { overflow-y: scroll; margin: 0; line-height: 1.4; font-weight: normal; font-size: 1rem; font-family: "Source Sans Pro", Arial, sans-serif; } body { margin: 0; color: var(--colour-text); background-color: var(--colour-background); } section#pep-page-section { padding: 0.25rem; } /* Reduce margin sizes for body text */ p {margin: .5rem 0} /* Header rules */ h1 { font-size: 2rem; font-weight: bold; margin-top: 1.25rem; margin-bottom: 1rem; } h2 { font-size: 1.6rem; font-weight: bold; margin-top: 1rem; margin-bottom: .5rem; } h3 { font-size: 1.4rem; font-weight: normal; margin-top: 1rem; margin-bottom: 0.5rem; } h4 { font-size: 1.2rem; font-weight: normal; margin-top: .5rem; margin-bottom: 0; } h5, h6 { font-size: 1rem; font-weight: bold; margin-top: 0; margin-bottom: 0; } /* Anchor link rules */ a, a:active, a:visited { color: var(--colour-links); display: inline; overflow-wrap: break-word; overflow-wrap: anywhere; text-decoration-color: var(--colour-background-accent); } a:hover, a:focus { text-decoration-color: var(--colour-rule-strong); } /* Blockquote rules */ blockquote { font-style: italic; border-left: 1px solid var(--colour-rule-strong); margin: .5rem; padding: .5rem 1rem; } blockquote em { font-style: normal; } cite { font-style: italic; } /* Code rules (code literals and Pygments highlighting blocks) */ code, pre { font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "DejaVu Sans Mono", Consolas, monospace; font-size: 0.875rem; -webkit-hyphens: none; hyphens: none; } code { overflow-wrap: break-word; overflow-wrap: anywhere; } code.literal { font-size: .8em; background-color: var(--colour-inline-code); } pre { overflow-x: auto; padding: .5rem .75rem; white-space: pre; } /* Contents rules */ details > summary { cursor: pointer; font-size: 1.6rem; font-weight: bold; margin-bottom: 1em; } details > summary:hover { text-decoration: underline; } /* Definition list rules */ dl dt { font-weight: bold; } dl dd { margin-bottom: 0.5rem; } /* Horizontal rule rule */ hr { border: 0; border-top: 1px solid var(--colour-rule-light); margin: 0; } /*Image rules */ img { max-width: 100%; } a img { display: block; margin: 0 auto; } /* List rules */ ul, ol { padding: 0; margin: 0 0 0 1.5rem; } ul {list-style: square} ol.arabic {list-style: decimal} ol.loweralpha {list-style: lower-alpha} ol.upperalpha {list-style: upper-alpha} ol.lowerroman {list-style: lower-roman} ol.upperroman {list-style: upper-roman} /* Maths rules */ sub, sup { font-size: .75em; line-height: 0; position: relative; vertical-align: baseline; } sup {top: -0.5em} sub {bottom: -0.25em} /* Table rules */ div.table-wrapper { overflow-x: auto; } table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--colour-background-accent); border-bottom: 1px solid var(--colour-background-accent); } table caption { margin: 1rem 0 .75rem; } table tbody tr:nth-of-type(odd) { background-color: var(--colour-background-accent); } table th, table td { text-align: left; padding: 0.25rem 0.5rem 0.2rem; } table tr td.num { white-space: nowrap; } table td + td { border-left: 1px solid var(--colour-rule-light); } /* Breadcrumbs rules */ section#pep-page-section > header { border-bottom: 1px solid var(--colour-rule-light); } section#pep-page-section > header > h1 { font-size: 1.1rem; line-height: 1.4; margin: 0; display: inline-block; padding-right: .6rem; border-right: 1px solid var(--colour-rule-strong); } ul.breadcrumbs { margin: 0; padding: .5rem 0 .5rem .4rem; list-style: none; display: inline-block; } ul.breadcrumbs li { display: inline; } ul.breadcrumbs a { text-decoration: none; } /* Dark mode toggle rules */ #colour-scheme-cycler { background: transparent; border: none; padding: 0; cursor: pointer; width: 1.2rem; height: 1.2rem; float: right; translate: 0 50%; } #colour-scheme-cycler svg { color: var(--colour-rule-strong); height: 1.2rem; width: 1.2rem; display: none; } :root[data-colour_scheme="auto"] #colour-scheme-cycler svg.colour-scheme-icon-when-auto {display: initial} :root[data-colour_scheme="dark"] #colour-scheme-cycler svg.colour-scheme-icon-when-dark {display: initial} :root[data-colour_scheme="light"] #colour-scheme-cycler svg.colour-scheme-icon-when-light {display: initial} /* Admonitions rules */ div.note, div.warning { padding: 0.5rem 0.75rem; margin-top: 1rem; margin-bottom: 1rem; } div.note { background-color: var(--colour-background-accent); } div.warning { background-color: var(--colour-warning); } p.admonition-title { font-weight: bold; } /* PEP Header / references rules */ dl.rfc2822, dl.footnote { display: grid; grid-template-columns: fit-content(30%) auto; width: 100%; } dl.footnote { border-top: 1px solid var(--colour-rule-strong); line-height: 1.875; } dl.rfc2822 > dt, dl.rfc2822 > dd { padding: .1rem .3rem .1rem; } dl.footnote > dt, dl.footnote > dd { padding: .25rem .5rem .2rem; border-bottom: 1px solid var(--colour-rule-strong); } dl.rfc2822 > dt { text-align: right; } dl.footnote > dt { font-weight: normal; border-right: 1px solid var(--colour-background); } dl.rfc2822 > dd, dl.footnote > dd { margin: 0; } /* Sidebar formatting */ #pep-sidebar { overflow-y: auto; position: sticky; top: 0; height: 100vh; } #pep-sidebar > h2 { font-size: 1.4rem; } #pep-sidebar ul { margin-left: 1rem; } #pep-sidebar ul a { text-decoration: none; } #source { padding-bottom: 2rem; font-weight: bold; } .reference.external > strong { font-weight: normal; /* Fix strong links for :pep: and :rfc: roles */ }