@import "normalize.scss"; @import "fonts.scss"; $page-horizontal-margin: 2rem; $mobile-breakpoint: 480px; $container-max-width: 768px; :root { --background-color: #f8e7cf; --text-color: black; --secondary-text-color: #656565; --link-color: blue; --page-vertical-margin: 3rem; } .container { max-width: $container-max-width; margin: 0 $page-horizontal-margin / 2; } @media (min-width: calc($container-max-width + 2 * $page-horizontal-margin)) { .container { margin: 0 $page-horizontal-margin; } } a, a:visited { color: var(--link-color); text-decoration-thickness: 2px; text-underline-offset: 2px; /* color: white; text-decoration: none; background-color: black; padding: 0 4px; */ } a:hover { text-decoration-thickness: 3px; } a[href^="http://"]::after, a[href^="https://"]::after { background-color: currentColor; content: ""; width: calc(max(0.667em, 12px)); height: calc(max(0.667em, 12px)); margin-left: 0.333em; display: inline-block; mask: url("data:image/svg+xml;base64," + $external-link) no-repeat 50% 50%; mask-size: cover; } pre, code { font-family: "Berkeley Mono"; font-size: 0.9em; } blockquote { position: relative; font-style: italic; &::before { content: open-quote; font-size: 2em; position: absolute; left: -25px; top: -10px; } } html { font-family: "Valkyrie A", Charter, serif; font-size: 16px; /* background-color: #dfd3c3; */ background-color: var(--background-color); /* background-color: #e8dbc5; */ color: var(--text-color); } header { margin-top: var(--page-vertical-margin); font-style: italic; h1 { font-size: 5rem; margin: 0; a { color: var(--text-color) !important; transition: text-decoration-thickness 0.1s ease-in-out; text-decoration-thickness: 4px; text-underline-offset: 0.5rem; &:hover { text-decoration-thickness: 8px; } } } p { margin-top: 0.25rem; font-size: 1.5rem; font-weight: lighter; text-wrap: balance; } } @media (max-width: $mobile-breakpoint) { header h1 { font-size: 4rem; } } .article-title { // balance the number of words per line text-wrap: balance; } .article-content { font-size: 1.25rem; // Chrome only, but minimizes orphan words text-wrap: pretty; } .header-anchor { text-decoration: none; font-size: 1rem; vertical-align: middle; // drag it up so it's more in the middle padding-bottom: 0.25rem; color: var(--secondary-text-color) !important; background: none; &:hover { color: var(--link-color) !important; } } .footnote-reference { > a { text-decoration: none; &[href^="#fnref-"] { display: none; } } &:hover + .sidenote { color: black; } } .sidenote { float: right; margin-right: -50%; width: 40%; font-size: 1rem; line-height: 1.25; color: var(--secondary-text-color); transition: color 0.2s ease-in-out; display: none; .sidenote-p { margin: 20px 0; display: block; } } .footnote { display: flex; flex-direction: row; gap: 8px; font-size: 1rem; .footnote-marker { flex-shrink: 0; width: 34px; text-align: right; } .footnote-backref { text-decoration: none; } > div > p:first-child { margin-top: 0; } > div > p:last-child { margin-top: 0; } } // 1.5 to account for -50% margin-right on .sidenote // plus page-horizontal-margin to effectively use that as the margin @media (min-width: calc(1.5 * $container-max-width + 2 * $page-horizontal-margin)) { .footnote-reference { > a[href^="#fn-"] { display: none; } > a[href^="#fnref-"] { display: inline; } } .sidenote { display: block; } .footnote { display: none; } } footer { margin-bottom: var(--page-vertical-margin); font-style: italic; font-size: 1.5rem; ul { padding: 0; list-style: none; } } @media (max-width: $mobile-breakpoint) { footer { font-size: 1rem; } }