:root {
--dark-blue: hsl(214, 93%, 42%);
--light-blue: hsl(214, 93%, 78%);
--blue: hsl(214, 93%, 62%);
--radius: 5px;
--small-font-size: 12px;
--medium-font-size: 14px;
--text-font-size: 16px;
/* Best stick to 100% white for plots that have white background. */
--background: hsl(220, 60%, 100%);
--code-background: hsl(0, 0%, 94%);
--button-background: hsl(0, 0%, 92%);
--code-border: #dbdbdb;
/* Never use black (https://huijzer.xyz/posts/design) */
--text: hsl(212, 90%, 7%);
--border: hsl(0, 0%, 60%);
--header: hsl(212, 90%, 18%);
--accent: hsl(212, 91%, 60%);
--visited: hsl(271, 68%, 32%);
--blue-gradient: linear-gradient(to right, var(--dark-blue), var(--blue));
}
@media (prefers-color-scheme: dark) {
:root {
--background: hsl(199, 10%, 22%);
--border: hsl(0, 0%, 40%);
--code-background: hsl(0, 0%, 8%);
--button-background: hsl(0, 0%, 15%);
--code-border: #0e0e0e;
--text: hsl(0, 0%, 96%);
--header: hsl(0, 0%, 96%);
--accent: hsl(212, 91%, 65%);
--visited: hsl(271, 68%, 68%);
--blue-gradient: linear-gradient(to right, var(--black), var(--dark-blue));
}
}
@media (min-width: 640px) {
:root {
--small-font-size: 13px;
--medium-font-size: 16px;
--text-font-size: 18px;
}
}
body {
/* Avoid horizontal scroll on mobile. */
padding: 0.2rem;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif;
line-height: 150%;
text-rendering: optimizeLegibility;
background-color: var(--background);
color: var(--text);
font-size: var(--text-font-size);
margin: 0px;
}
h1, h2, h3, h4, h5, h6 {
color: var(--header);
margin-top: 1.5em;
line-height: 1.1;
}
a {
color: var(--accent);
}
a:visited {
color: var(--accent);
}
a.url {
word-break: break-all;
}
li {
margin-bottom: 0.5rem;
}
li p {
margin: 0.5rem 0;
}
code {
background-color: var(--code-background);
border-radius: var(--radius);
padding: 0.2rem;
font-size: 0.9em;
}
pre code {
font-size: var(--small-font-size);
background-color: var(--code-background);
border-radius: var(--radius);
display: block;
padding: 10px;
overflow: auto;
white-space: pre;
word-wrap: normal;
white-space: pre;
line-height: 1.35;
}
img {
display: block;
margin: 0 auto;
max-width: 100%;
height: auto;
}
blockquote {
border-left: 2px solid var(--border);
padding: 0.2rem 10px;
margin: 0.2rem 10px;
}
blockquote p {
margin: 0.2rem 0;
}
table {
font-size: var(--small-font-size);
border-collapse: collapse;
margin: 2rem auto;
}
th {
border-top: 1px solid var(--border);
font-weight: bold;
}
th, td {
padding: 0.3rem 0.4rem;
border-bottom: 1px solid var(--border);
}
.container {
display: flex;
justify-content: center;
align-items: stretch;
min-height: 98vh;
}
.middle {
width: 100%;
max-width: 70ch;
padding: 0px;
display: flex;
flex-direction: column;
flex-grow: 1;
}
.post {
border-radius: var(--radius);
padding: 10px;
margin: 8px 0px;
}
.post-header {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 12px;
color: var(--gray);
}
.post-content {
font-size: var(--text-font-size);
margin-bottom: 30px;
}
.post-preview {
h1, h2, h3, h4, h5, h6 {
margin-top: 0.5em;
}
margin-bottom: 10px;
}
.top {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
}
.bottom {
text-align: center;
margin-top: auto;
padding-top: 30px;
padding-bottom: 0.8rem;
font-size: 0.8rem;
}
.unstyled-link {
text-decoration: none;
color: var(--text);
}
.unstyled-link:visited {
color: var(--text);
}
.right {
margin-left: auto;
}
.menu-space {
margin-left: 10px;
margin-right: 10px;
}
input {
box-sizing: border-box;
background-color: var(--button-background);
color: var(--text);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 4px;
margin-top: 4px;
margin-bottom: 10px;
font-size: var(--small-font-size);
}
input[type="submit"] {
border: 1px solid var(--border);
padding: 7px 20px;
line-height: 1.3;
margin: 12px 6px;
}
input[type="submit"]:hover {
cursor: pointer;
}
.ui-text {
font-size: var(--small-font-size);
}
.medium-text {
font-size: var(--medium-font-size);
}
.margin-auto {
margin-left: auto;
margin-right: auto;
}
button {
background-color: var(--button-background);
border: 1px solid var(--border);
border-radius: var(--radius);
color: var(--text);
padding: 7px 20px;
line-height: 1.3;
margin: 12px 6px;
font-size: var(--small-font-size);
}
textarea {
box-sizing: border-box;
border: 1px solid var(--border);
border-radius: var(--radius);
background-color: var(--button-background);
color: var(--text);
padding: 7px;
/* Too small size will cause browser to zoom on mobile. */
/* Being bigger on big screens is also not too bad. */
font-size: 17px;
}
a.button {
font-size: var(--small-font-size);
background-color: var(--button-background);
border: 1px solid var(--border);
border-radius: var(--radius);
text-decoration: none;
color: var(--text);
padding: 7px 20px;
line-height: 1.3;
margin: 12px 6px;
}
.boxsizing-border {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.katex-display {
/* Is 1.2em by default, which makes display math too big. */
font-size: 1em !important;
}
.blogroll-item {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-bottom: 0.2em;
}
.blogroll-item a:visited {
color: var(--visited);
}