167 lines
3 KiB
CSS
167 lines
3 KiB
CSS
/* welcome, F12 enjoyer! Get comfortable! I know *nothing* about the frontend,
|
|
* eldrich horrors of my own making await! On a serious note, if you can
|
|
* recommend something from accessibility side plz get in touch */
|
|
/* heavily inspired by simple.css */
|
|
:root {
|
|
/* Set sans-serif & mono fonts */
|
|
--sans-font: -apple-system, BlinkMacSystemFont, "Avenir Next", Avenir,
|
|
"Nimbus Sans L", Roboto, "Noto Sans", "Segoe UI", Arial, Helvetica,
|
|
"Helvetica Neue", sans-serif;
|
|
--mono-font: Consolas, Menlo, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
|
|
--standard-border-radius: 5px;
|
|
|
|
/* theme is inspired by^W^W stolen from evergreen vim theme */
|
|
/* https://github.com/sainnhe/everforest */
|
|
--bg: #fffbef;
|
|
--accent-bg: #fffbef;
|
|
--border: #f2efdf;
|
|
--blue: #3a94c5;
|
|
--purple: #df69ba;
|
|
--fg: #222;
|
|
--bg-red: #ffe7de;
|
|
}
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
:root {
|
|
--bg: #272e33;
|
|
--accent-bg: #374145;
|
|
--border: #1e2326;
|
|
--blue: #7fbbb3;
|
|
--purple: #d699b6;
|
|
--fg: #d3c6aa;
|
|
}
|
|
}
|
|
|
|
body {
|
|
background-color: var(--bg);
|
|
color: var(--fg);
|
|
}
|
|
|
|
html {
|
|
/* Set the font globally */
|
|
font-family: var(--sans-font);
|
|
scroll-behavior: smooth;
|
|
}
|
|
|
|
/* Make the body a nice central block */
|
|
body {
|
|
color: var(--fg);
|
|
background-color: var(--bg);
|
|
font-size: 1rem;
|
|
line-height: 1.3;
|
|
display: grid;
|
|
grid-template-columns: 1fr min(45rem, 90%) 1fr;
|
|
margin: 0;
|
|
}
|
|
body > * {
|
|
grid-column: 2;
|
|
}
|
|
|
|
/* Make the header bg full width, but the content inline with body */
|
|
body > header {
|
|
background-color: var(--accent-bg);
|
|
border-bottom: 1px solid var(--border);
|
|
text-align: center;
|
|
padding: 0 0.5rem 0.2rem 0.5rem;
|
|
grid-column: 1 / -1;
|
|
}
|
|
|
|
body > header > *:only-child {
|
|
margin-block-start: 2rem;
|
|
}
|
|
|
|
body > header h1 {
|
|
max-width: 1200px;
|
|
margin: 1rem auto;
|
|
}
|
|
|
|
body > header p {
|
|
max-width: 40rem;
|
|
margin: 1rem auto;
|
|
}
|
|
|
|
/* Add a little padding to ensure spacing is correct between content and header > nav */
|
|
main {
|
|
padding-top: 1.5rem;
|
|
}
|
|
|
|
body > footer {
|
|
margin-top: 4rem;
|
|
padding: 2rem 1rem 1.5rem 1rem;
|
|
color: var(--fg-light);
|
|
font-size: 0.9rem;
|
|
text-align: center;
|
|
border-top: 1px solid var(--border);
|
|
}
|
|
|
|
/* Format headers */
|
|
h1 {
|
|
font-size: 2rem;
|
|
}
|
|
|
|
h2 {
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
h3 {
|
|
font-size: 1rem;
|
|
}
|
|
|
|
h4 {
|
|
font-size: 1rem;
|
|
}
|
|
|
|
h1, h2, h3, h4 {
|
|
margin-top: 1rem;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
p {
|
|
margin: 0.3rem 0;
|
|
}
|
|
|
|
/* Prevent long strings from overflowing container */
|
|
p, h1, h2, h3, h4, h5, h6 {
|
|
overflow-wrap: break-word;
|
|
}
|
|
|
|
/* Fix line height when title wraps */
|
|
h1,
|
|
h2,
|
|
h3 {
|
|
line-height: 1.1;
|
|
}
|
|
|
|
/* Reduce header size on mobile */
|
|
@media only screen and (max-width: 720px) {
|
|
h1 {
|
|
font-size: 2.5rem;
|
|
}
|
|
|
|
h2 {
|
|
font-size: 2.1rem;
|
|
}
|
|
|
|
h3 {
|
|
font-size: 1.75rem;
|
|
}
|
|
|
|
h4 {
|
|
font-size: 1.25rem;
|
|
}
|
|
}
|
|
|
|
|
|
/* Format links & buttons */
|
|
a {
|
|
color: var(--blue);
|
|
text-decoration: underline;
|
|
}
|
|
|
|
a:visited {
|
|
color: var(--purple);
|
|
}
|
|
|
|
a:hover {
|
|
text-decoration-style: dotted;
|
|
}
|