@font-face{ font-family: "Mister Twiggs W01 Heavy"; src: url("{{ path }}/MisterTwiggsHeavy.woff2") format("woff2"); font-weight: normal; font-style: normal; font-display: fallback; } /* Defaults */ :root { --font-family: sans-serif; } /* Theme colors */ :root { --color-gray-20: #eee; --color-gray-50: #ccc; --color-gray-90: #333; --background-color: #eee; --body-color: #fff; --text-color: var(--color-gray-90); --text-color-link: #ff2121; --text-color-link-active: #ff5959; --text-color-link-visited: #000; --syntax-tab-size: 2; } @media (prefers-color-scheme: dark) { :root { --color-gray-20: #eee; --color-gray-50: #ccc; --color-gray-90: #dad8d8; /* --text-color is assigned to --color-gray-_ above */ --text-color-link: #ff3939; --text-color-link-active: #ff7979; --text-color-link-visited: #fff; --background-color: #222; --body-color: #111; } .logo { filter: invert(100%); } } /* Global stylesheet */ * { box-sizing: border-box; } html, body { padding: 15px; margin: 0 auto; font-family: var(--font-family); color: var(--text-color); background-color: var(--background-color); } html { overflow-y: scroll; background-image: url("{{ path }}/otomata_labs_tile.svg"); background-blend-mode: difference; } body { max-width: 75%; background-color: var(--body-color); border: 2px dashed var(--color-gray-90); } @media (max-width: 480px) { html, body { padding: 8px; } body { max-width: 95%; } } @media (min-width: 481px) and (max-width: 768px) { body { max-width: 85%; } } @media (min-width: 1441px) { body { max-width: 1200px; } } /* https://www.a11yproject.com/posts/how-to-hide-content/ */ .visually-hidden:not(:focus):not(:active) { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; } /* Fluid images via https://www.zachleat.com/web/fluid-images/ */ img{ max-width: 100%; } img[width][height] { height: auto; } img[src$=".svg"] { width: 100%; height: auto; max-width: none; } video, iframe { width: 100%; height: auto; } iframe { aspect-ratio: 16/9; } p:last-child { margin-bottom: 0; } p { line-height: 1.5; } li { line-height: 1.5; } a[href] { color: var(--text-color-link); } a[href]:visited { color: var(--text-color-link-visited); } a[href]:hover, a[href]:active { color: var(--text-color-link-active); } main, footer { padding: 1rem; } main :first-child { margin-top: 0; } header { border-bottom: 2px dashed var(--color-gray-20); } #skip-link { text-decoration: none; background: var(--background-color); color: var(--text-color); padding: 0.5rem 1rem; border: 1px solid var(--color-gray-90); border-radius: 2px; } /* Prevent visually-hidden skip link fom pushing content around when focused */ #skip-link.visually-hidden:focus { position: absolute; top: 1rem; left: 1rem; /* Ensure it is positioned on top of everything else when it is shown */ z-index: 999; } .links-nextprev { display: flex; justify-content: space-between; gap: .5em 1em; list-style: ""; border-top: 1px dashed var(--color-gray-20); padding: 1em 0; } .links-nextprev > * { flex-grow: 1; } .links-nextprev-next { text-align: right; } table { margin: 1em 0; } table td, table th { padding-right: 1em; } pre, code { font-family: monospace; } pre:not([class*="language-"]) { margin: .5em 0; line-height: 1.375; /* 22px /16 */ -moz-tab-size: var(--syntax-tab-size); -o-tab-size: var(--syntax-tab-size); tab-size: var(--syntax-tab-size); -webkit-hyphens: none; -ms-hyphens: none; hyphens: none; direction: ltr; text-align: left; white-space: pre; word-spacing: normal; word-break: normal; overflow-x: auto; } code { word-break: break-all; } /* Header */ header { font-size: 2em; font-family: "Mister Twiggs W01 Heavy", "Impact", "Arial Black", sans-serif; display: flex; gap: 5px; flex-wrap: wrap; justify-content: space-between; align-items: center; padding: 5px; } .home-link { flex-grow: 1; font-size: 1em; /* 16px /16 */ font-weight: 700; max-width: 300px; } .home-link:link:not(:hover) { text-decoration: none; } .logo { width: 100%; height: auto; max-width: 250px; min-width: 180px; display: block; transition: filter 0.2s ease; } @media (max-width: 480px) { header { font-size: 1.5em; gap: 3px; padding: 3px; } .logo { max-width: 200px; min-width: 150px; } .nav { gap: .3em .6em; font-size: 0.9em; } } @media (min-width: 481px) and (max-width: 768px) { header { font-size: 1.75em; } .logo { max-width: 220px; } } @media (min-width: 769px) and (max-width: 1024px) { .logo { max-width: 250px; } } @media (min-width: 1025px) and (max-width: 1440px) { .logo { max-width: 280px; } } @media (min-width: 1441px) { .logo { max-width: 320px; } header { max-width: 1200px; margin: 0 auto; } } /* Nav */ .nav { display: flex; gap: .5em 1em; padding: 0; margin: 0; list-style: none; flex-wrap: wrap; } .nav-item { display: inline-block; } .nav-item a[href]:not(:hover) { text-decoration: none; } .nav a[href][aria-current="page"] { text-decoration: underline; } @media (max-width: 768px) { header { flex-direction: column; align-items: stretch; text-align: center; } .home-link { align-self: center; margin-bottom: 0.5em; } .nav { justify-content: center; gap: .4em .8em; } } /* Posts list */ .postlist { counter-reset: start-from var(--postlist-index); list-style: none; padding: 0; padding-left: 1.5rem; } .postlist-item { display: flex; flex-wrap: wrap; align-items: baseline; counter-increment: start-from -1; margin-bottom: 1em; } .postlist-item:before { display: inline-block; pointer-events: none; content: "" counter(start-from, decimal-leading-zero) ". "; line-height: 100%; text-align: right; margin-left: -1.5rem; } .postlist-date, .postlist-item:before { font-size: 0.8125em; /* 13px /16 */ color: var(--color-gray-90); } .postlist-date { word-spacing: -0.5px; } .postlist-link { font-size: 1.1875em; /* 19px /16 */ font-weight: 700; flex-basis: calc(100% - 1.5rem); padding-left: .25em; padding-right: .5em; text-underline-position: from-font; text-underline-offset: 0; text-decoration-thickness: 1px; } .postlist-item-active .postlist-link { font-weight: bold; } /* Tags */ .post-tag { display: inline-flex; align-items: center; justify-content: center; text-transform: capitalize; font-style: italic; } .postlist-item > .post-tag { align-self: center; } /* Tags list */ .post-metadata { display: inline-flex; flex-wrap: wrap; gap: .5em; list-style: none; padding: 0; margin: 0; } .post-metadata time { margin-right: 1em; }