Current section
Files
Jump to
Current section
Files
gen/docs/index.css
@import url("https://fonts.googleapis.com/css2?family=Karla:wght@400;700&family=Ubuntu+Mono&display=swap");
:root {
/* Colours */
--black: #2a2020;
--hard-black: #000;
--pink: #ffaff3;
--hot-pink: #d900b8;
--white: #fff;
--pink-white: #fff8fe;
--mid-grey: #dfe2e5;
--light-grey: #f5f5f5;
--boi-blue: #a6f0fc;
/* Derived colours */
--text: var(--black);
--background: var(--white);
--accented-background: var(--pink-white);
--code-border: var(--pink);
--code-background: var(--light-grey);
--table-border: var(--mid-grey);
--table-background: var(--pink-white);
--links: var(--hot-pink);
--accent: var(--pink);
/* Sizes */
--content-width: 680px;
--header-height: 60px;
--sidebar-width: 240px;
--sidebar-width-inverted: -240px;
--gap: 24px;
--small-gap: calc(var(--gap) / 2);
--tiny-gap: calc(var(--small-gap) / 2);
--large-gap: calc(var(--gap) * 2);
--sidebar-toggle-size: 33px;
/* etc */
--shadow: 0 0 0 1px rgba(50, 50, 93, 0.075), 0 0 1px #e9ecef,
0 2px 4px -2px rgba(138, 141, 151, 0.6);
}
* {
box-sizing: border-box;
}
body,
html {
padding: 0;
margin: 0;
font-family: "Karla", sans-serif;
font-size: 1.05rem;
line-height: 1.4;
position: relative;
min-height: 100vh;
word-break: break-word;
}
html {
/* This is necessary so hash targets appear below the fixed header */
scroll-padding-top: 100px;
}
a,
a:visited {
color: var(--links);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
li {
margin-bottom: 4px;
}
p {
margin: var(--small-gap) 0;
}
.rendered-markdown h1,
.rendered-markdown h2,
.rendered-markdown h3,
.rendered-markdown h4,
.rendered-markdown h5 {
font-size: 1.3rem;
}
/* Code */
pre,
code {
font-family: "Ubuntu Mono", monospace;
line-height: 1.2;
}
pre {
padding: var(--small-gap) var(--gap);
margin: var(--gap) 0;
background: var(--code-background);
border-radius: 1px;
overflow: auto;
box-shadow: var(--shadow);
}
p code {
margin: 0 2px;
}
/* Page layout */
.page {
display: flex;
}
.content {
margin-left: var(--sidebar-width);
padding: calc(var(--header-height) + var(--gap)) var(--gap) 0 var(--gap);
width: calc(100% - var(--sidebar-width));
max-width: var(--content-width);
}
/* Page header */
.page-header {
height: var(--header-height);
color: black;
color: var(--hard-black);
background-color: var(--pink);
padding: var(--small-gap) var(--gap);
position: fixed;
left: 0px;
right: 0px;
top: 0px;
}
.page-header h2 {
margin: 0;
}
/* Module doc */
.module-name {
margin: 0;
font-weight: 700;
}
/* Sidebar */
.sidebar {
background-color: var(--background);
font-size: 0.95rem;
max-height: calc(100vh - var(--header-height));
overflow-y: auto;
padding-top: var(--gap);
padding-bottom: var(--gap);
padding-left: var(--gap);
position: fixed;
top: var(--header-height);
transition: transform 0.5s ease;
width: var(--sidebar-width);
z-index: 100;
}
.sidebar h2 {
margin: 0;
}
.sidebar ul {
list-style: none;
margin: var(--small-gap) 0;
padding: 0;
}
.sidebar li {
line-height: 1.2;
margin-bottom: 4px;
}
.sidebar-toggle {
display: none;
transition: opacity 1s ease;
opacity: 0;
}
/* Module members (types, functions) */
.module-members {
margin-top: var(--large-gap);
}
.module-member-kind {
font-size: 2rem;
color: var(--text);
}
.member {
margin: var(--large-gap) 0;
padding-bottom: var(--gap);
}
.member-name {
border-left: 4px solid var(--accent);
padding: var(--small-gap) var(--gap);
background-color: var(--accented-background);
color: var(--text);
}
/* Custom type constructors */
.constructor-name {
margin-bottom: 0;
}
/* Tables */
table {
border-spacing: 0;
border-collapse: collapse;
}
table td,
table th {
padding: 6px 13px;
border: 1px solid var(--table-border);
}
table tr:nth-child(2n) {
background-color: var(--table-background);
}
/* Footer */
.pride {
width: 100%;
display: none;
flex-direction: row;
position: absolute;
bottom: 0;
z-index: 100;
}
.show-pride .pride {
display: flex;
}
.show-pride .sidebar {
margin-bottom: var(--gap);
}
.pride div {
flex: 1;
text-align: center;
padding: var(--tiny-gap);
}
.pride .white {
background-color: var(--white);
}
.pride .pink {
background-color: var(--pink);
}
.pride .blue {
background-color: var(--boi-blue);
}
.pride-button {
position: absolute;
right: 2px;
bottom: 2px;
opacity: 0.2;
font-size: 0.9rem;
}
.pride-button {
text-decoration: none;
cursor: default;
}
/* Small displays */
@media (max-width: 920px) {
.page-header {
padding-left: calc(var(--sidebar-toggle-size) + var(--gap));
}
.content {
width: unset;
max-width: unset;
margin-left: unset;
}
.sidebar {
height: 100vh;
max-height: unset;
overflow: visible;
top: 0;
transform: translate(var(--sidebar-width-inverted));
}
.sidebar:focus-within {
overflow-y: auto;
overflow-x: hidden;
transform: translate(0);
}
.sidebar:focus-within .sidebar-toggle {
opacity: 0;
}
.sidebar-toggle {
display: block;
opacity: 1;
position: absolute;
top: var(--small-gap);
left: calc(var(--small-gap) + var(--sidebar-width));
height: var(--sidebar-toggle-size);
width: var(--sidebar-toggle-size);
}
}