Files
sphinx/doc/_themes/sphinx13/static/sphinx13.css
Chris Sewell 53119133f2 [docs] Keep top-bar visible (#12464)
This commit ensures the top-bar is always visible, rather than being hidden on scrolling or navigating to a target.
2024-06-23 00:19:43 +02:00

529 lines
10 KiB
CSS

/* Stylesheet for Sphinx's documentation */
/* Set master colours */
:root {
--fonts-sans-serif: system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--colour-sphinx-blue: #0A507A;
--colour-warning-bg: #f8e3d0;
--colour-note-bg: #dce7fc;
--colour-success-bg: #d6ece1;
--colour-todo-bg: #e0c7ff;
--colour-text: #333;
--colour-links-light: #057;
--admonition-radius: 3px;
}
body {
font-family: var(--fonts-sans-serif);
margin: 0 auto;
color: var(var(--colour-text));
}
.pageheader {
position: sticky;
top: 0;
z-index: 99;
height: 3rem;
display: flex;
column-gap: 1em;
align-items: center;
justify-content: space-between;
width: 100%;
background-color: var(--colour-sphinx-blue);
padding: 10px 20px;
box-sizing: border-box;
}
.pageheader .brand {
display: flex;
align-items: baseline;
column-gap: 1em;
color: white;
text-decoration: none;
}
.pageheader .brand a {
width: 2em;
}
.pageheader .brand img {
filter: invert(1) drop-shadow(1px 1px 2px black);
}
.pageheader .brand h1 {
color: white;
margin: 0;
font-weight: 400;
font-size: 2em;
line-height: 1;
}
.pageheader .icons a {
color: white;
}
.pageheader .icons a:hover {
color: rgba(255, 255, 255, 0.8);
}
.pageheader .icons svg {
height: 1.6em;
}
div.document {
display: flex;
margin: 0 0.5em;
}
div.body {
border-left: 1px solid var(--colour-sphinx-blue);
margin: 0;
padding: 0.5em 1.75em;
min-width: 0;
max-width: 800px;
}
div.related {
position: sticky;
top: 3rem;
z-index: 99;
display: flex;
color: white;
background-color: var(--colour-sphinx-blue);
border-top: 1px solid #002e50;
}
div.related ul li {
margin: 0 5px 0 0;
float: left;
}
div.related ul li a {
padding: 0 5px 0 5px;
line-height: 1.75em;
color: white;
}
div.related ul li a:hover {
text-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
}
div.sphinxsidebarwrapper {
padding: 0;
}
div.sphinxsidebar {
position: sticky;
top: 4.6rem;
align-self: flex-start;
height: calc(100vh - 4.6rem);
width: 250px;
min-width: 150px;
overflow-y: auto;
overflow-wrap: break-word;
margin: 0;
padding: 0.5em 15px 0.5em 10px;
font-size: 1em;
}
/* horizontal line between sidebar components */
div.sphinxsidebar div:not(:first-child) {
border-top: 1px solid var(--colour-sphinx-blue);
}
/* overwrite color from basic theme */
div.sphinxsidebar input {
border: 1px solid var(--colour-sphinx-blue);
}
div.sphinxsidebar h3 {
font-size: 1.2em;
font-weight: 300;
margin-top: 0;
margin-bottom: 0.5em;
padding-top: 0.5em;
}
div.sphinxsidebar h4 {
font-size: 1.2em;
margin-bottom: 0;
}
div.sphinxsidebar h3, div.sphinxsidebar h4 {
margin-right: -15px;
margin-left: -15px;
padding-right: 14px;
padding-left: 14px;
color: #333;
font-weight: 300;
}
div.sphinxsidebar h3 a {
color: #333;
}
div.sphinxsidebar ul {
color: #444;
margin-top: 7px;
padding: 0;
line-height: 130%;
}
div.sphinxsidebar ul ul {
margin-left: 1rem;
list-style-type: none;
font-size: .9em;
}
/* De-dent the first list because we hide the top-level item */
.sphinxsidebar .sphinxsidebar-navigation__contents > ul > li > ul {
margin-left: 0;
}
div.sphinxsidebar p.caption {
font-weight: 300;
font-size: 1.2rem;
}
div.sphinxsidebar li.current > a {
font-weight: 600;
}
.sphinxsidebar-navigation__contents > ul > li > a {
display: none;
}
div.sphinxsidebar #searchbox {
margin: 12px 0 20px 0;
}
div.footer {
background-color: var(--colour-sphinx-blue);
color: #ccc;
text-shadow: 0 0 .2px rgba(255, 255, 255, 0.8);
padding: 3px 8px 3px 8px;
clear: both;
font-size: 0.8em;
}
/* no need to make a visible link to Sphinx on the Sphinx page */
div.footer a {
color: #ccc;
}
/* -- body styles ----------------------------------------------------------- */
.body :target {
/* ensure targets are not obscured by top-bar when they are navigated to */
scroll-margin-top: 6.5rem;
}
p {
margin: 0.8em 0 0.5em 0;
}
a {
color: var(--colour-links-light);
text-decoration: none;
}
div.body a {
text-decoration: underline;
}
h1 {
margin: 10px 0 0 0;
font-size: 2.4em;
color: var(--colour-sphinx-blue);
font-weight: 400;
}
h1 span.pre {
/* for code in titles */
word-break: break-all;
white-space: normal;
}
h2 {
margin: 1em 0 0.2em 0;
font-size: 1.5em;
font-weight: 400;
padding: 0;
color: #174967;
}
h3 {
margin: 1em 0 -0.3em 0;
font-size: 1.3em;
font-weight: 400;
}
div.body h1 a, div.body h2 a, div.body h3 a, div.body h4 a, div.body h5 a, div.body h6 a {
text-decoration: none;
}
div.body h1 a tt, div.body h2 a tt, div.body h3 a tt, div.body h4 a tt, div.body h5 a tt, div.body h6 a tt {
color: var(--colour-sphinx-blue) !important;
font-size: inherit !important;
}
a.headerlink {
color: var(--colour-sphinx-blue) !important;
font-size: .8em;
margin-left: 6px;
padding: 0 4px 0 4px;
text-decoration: none !important;
}
a.headerlink:hover {
background-color: #ccc;
color: white!important;
}
/* avoid font-size when :mod: role in headings */
h1 code, h2 code, h3 code, h4 code {
font-size: inherit;
}
cite, code, tt {
font-family: 'Consolas', 'DejaVu Sans Mono',
'Bitstream Vera Sans Mono', monospace;
font-size: 1em;
letter-spacing: -0.02em;
}
table.deprecated code.literal {
word-break: break-all;
}
tt {
background-color: #f2f2f2;
border: 1px solid #ddd;
border-radius: 2px;
color: #333;
padding: 1px 0.2em;
}
tt.descname, tt.descclassname, tt.xref {
border: 0;
}
hr {
border: 1px solid #abc;
margin: 2em;
}
a tt {
border: 0;
color: var(--colour-links-light);
}
pre {
font-family: 'Consolas', 'Courier New', 'DejaVu Sans Mono',
'Bitstream Vera Sans Mono', monospace;
font-size: 1em;
letter-spacing: 0.015em;
line-height: 120%;
padding: 0.5em;
border: 1px solid #ccc;
border-radius: 2px;
background-color: #f8f8f8;
}
pre a {
color: inherit;
text-decoration: underline;
}
td.linenos pre {
padding: 0.5em 0;
}
div.quotebar {
background-color: #f8f8f8;
max-width: 250px;
float: right;
padding: 0px 7px;
border: 1px solid #ccc;
margin-left: 1em;
}
blockquote.epigraph {
font-size: 1.5em;
padding-left: 1rem;
margin-left: 0;
}
nav.contents,
div.topic,
aside.topic {
background-color: #f8f8f8;
}
table {
border-collapse: collapse;
margin: 0 -0.5em 0 -0.5em;
}
table td, table th {
padding: 0.2em 0.5em 0.2em 0.5em;
}
div.admonition, div.warning {
font-size: 0.9em;
margin: 1em 0 1em 0;
border: 1px solid #86989B;
border-radius: var(--admonition-radius);
background-color: #f7f7f7;
padding: 1rem;
}
div.admonition > p, div.warning > p {
margin: 0;
padding: 0;
}
div.admonition > pre, div.warning > pre {
margin: 0.4em 1em 0.4em 1em;
}
div.admonition > p.admonition-title,
div.warning > p.admonition-title {
font-weight: bold;
background-color: #dddddd;
margin: -1rem -1rem 0.8rem -1rem;
padding: 0.3rem 1rem;
border-radius: var(--admonition-radius) var(--admonition-radius) 0 0;
}
div.important > p.admonition-title,
div.caution > p.admonition-title,
div.warning > p.admonition-title {
background-color: var(--colour-warning-bg);
}
div.note > p.admonition-title {
background-color: var(--colour-note-bg);
}
div.hint > p.admonition-title,
div.tip > p.admonition-title,
div.seealso > p.admonition-title {
background-color: var(--colour-success-bg);
}
div.todo > p.admonition-title {
background-color: var(--colour-todo-bg);
}
div.warning {
border: 1px solid #940000;
}
div.admonition > ul,
div.admonition > ol,
div.warning > ul,
div.warning > ol {
margin: 0.1em 0.5em 0.5em 3em;
padding: 0;
}
div.admonition div.highlight {
background: none;
}
.viewcode-back {
font-family: var(--fonts-sans-serif);
}
div.viewcode-block:target {
background-color: #f4debf;
border-top: 1px solid #ac9;
border-bottom: 1px solid #ac9;
}
/* media queries */
/* Reduce padding & margins for smaller screens */
@media (max-width: 768px) {
.sphinxsidebar {
display: none;
}
div.body {
border-left: none;
padding-left: 0.5em;
padding-right: 0.5em;
}
}
/* ReadtheDocs docs selector */
/* see https://docs.readthedocs.io/en/stable/flyout-menu.html */
.rst-versions.rst-badge {
background-color: #f7f7f7;
border: 1px solid var(--colour-sphinx-blue);
border-radius: var(--admonition-radius);
color: var(--colour-sphinx-blue);
}
.rst-versions .rst-current-version {
background-color: #f7f7f7;
border-radius: var(--admonition-radius);
color: var(--colour-sphinx-blue);
}
.rst-versions .rst-current-version .fa {
color: var(--colour-sphinx-blue);
}
.rst-versions .rst-other-versions {
border-radius: 0 0 var(--admonition-radius) var(--admonition-radius);
border-top: 1px solid var(--colour-sphinx-blue);
background-color: #f7f7f7;
color: var(--colour-text);
}
.rst-versions .rst-other-versions dd a {
color: var(--colour-sphinx-blue);
}
/* Landing page */
.sphinx-tagline * {
hyphens: none !important;
font-style: italic !important;
}
/* By default align the sphinx-features one per-row and center them,
then for larger screens align them two per-row. */
.sphinx-features {
display: flex;
flex-wrap: wrap;
gap: 10px;
justify-content: center;
}
.sphinx-feature {
flex: 1 1 100%;
margin: 0 !important;
background-color: white !important;
}
.sphinx-feature p {
hyphens: none !important;
}
.sphinx-feature > p.admonition-title {
background-color: #f7f7f7 !important;
}
@media (min-width: 768px) {
.sphinx-feature {
flex: 0 0 auto;
box-sizing: border-box;
width: 48%;
}
}
.sphinx-users {
text-align: center;
font-weight: 500;
}
.sphinx-users-logos {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 10px;
}