555 lines
10 KiB
CSS
555 lines
10 KiB
CSS
/* Defaults */
|
|
:root {
|
|
--font-family-headline: 'Playfair Display';
|
|
--font-family: Manrope;
|
|
--font-family-monospace: Consolas, Menlo, Monaco, Andale Mono WT, Andale Mono, Lucida Console, Lucida Sans Typewriter, DejaVu Sans Mono, Bitstream Vera Sans Mono, Liberation Mono, Nimbus Mono L, Courier New, Courier, monospace;
|
|
}
|
|
|
|
/* Design Tokens */
|
|
:root {
|
|
/* Colors */
|
|
--color-gray-20: #e0e0e0;
|
|
--color-gray-50: #C0C0C0;
|
|
--color-gray-90: #333333;
|
|
--contrast-color: #027860;
|
|
|
|
--background-color: #FAF5F5;
|
|
|
|
--text-color: var(--color-gray-90);
|
|
--text-color-link: var(--text-color);
|
|
--text-color-link-active: rgba(3,144,116,1);
|
|
--text-color-link-visited: var(--color-gray-90);
|
|
|
|
--nav-pill-background-color-active: rgba(3,144,116,1);
|
|
--nav-pill-background-color-inactive: rgba(71,71,71,1);
|
|
|
|
--nav-pill-text-color: rgba(255,255,255,1);
|
|
--nav-pill-text-color-link-visited: rgba(255,255,255,1);
|
|
--nav-pill-text-color-link-active: rgba(255,255,255,1);
|
|
|
|
/* Space & Size */
|
|
--syntax-tab-size: 2;
|
|
--pill-radius: 5rem;
|
|
--card-radius: .3rem;
|
|
|
|
/* Spacing */
|
|
--single-gap: 1rem;
|
|
--double-gap: 2rem;
|
|
|
|
/* Animation Timing */
|
|
--transition-time: .3s;
|
|
|
|
/* Font Sizes */
|
|
--font-xxl: 3.75rem;
|
|
--font-xl: 2rem;
|
|
--font-l: 1.5rem;
|
|
--font-n: 1rem;
|
|
--font-s: .75rem;
|
|
--font-xs: .65rem;
|
|
|
|
/* Font Weights */
|
|
--weight-extraheavy: 700;
|
|
--weight-heavy: 500;
|
|
--weight-normal: 300;
|
|
}
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
:root {
|
|
--color-gray-20: #e0e0e0;
|
|
--color-gray-50: #C0C0C0;
|
|
--color-gray-90: #dad8d8;
|
|
--card-color: #333333;
|
|
--contrast-color: #04c49e;
|
|
|
|
/* --text-color is assigned to --color-gray-_ above */
|
|
--text-color-link: var(--contrast-color);
|
|
--text-color-link-active: var(--contrast-color);
|
|
--text-color-link-visited: var(--contrast-color);
|
|
|
|
--background-color: #15202b;
|
|
}
|
|
}
|
|
|
|
@media(max-width: 556px) {
|
|
:root {
|
|
/* Font Sizes */
|
|
--font-xxl: 1.75rem;
|
|
--font-xl: 1rem;
|
|
--font-l: 1rem;
|
|
--font-n: .85rem;
|
|
}
|
|
}
|
|
|
|
/* Global stylesheet */
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
html,
|
|
body {
|
|
padding: 0;
|
|
margin: 0 auto;
|
|
font-family: var(--font-family);
|
|
font-weight: var(--weight-normal);
|
|
font-variant-Ligatures: normal;
|
|
color: var(--text-color);
|
|
background-color: var(--background-color);
|
|
}
|
|
html {
|
|
overflow-y: scroll;
|
|
}
|
|
body {
|
|
max-width: 40em;
|
|
}
|
|
a {
|
|
text-decoration-color: var(--contrast-color);
|
|
text-decoration-thickness: .1rem;
|
|
transition: all .5s;
|
|
}
|
|
|
|
/* https://www.a11yproject.com/posts/how-to-hide-content/ */
|
|
.visually-hidden {
|
|
clip: rect(0 0 0 0);
|
|
clip-path: inset(50%);
|
|
height: 1px;
|
|
overflow: hidden;
|
|
position: absolute;
|
|
white-space: nowrap;
|
|
width: 1px;
|
|
}
|
|
|
|
h1 {
|
|
font-family: var(--font-family-headline);
|
|
font-weight: var(--weight-extraheavy);
|
|
font-size: var(--font-xxl);
|
|
font-style: normal;
|
|
line-height: 4rem;
|
|
padding-top: 3rem;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
h3 {
|
|
font-size: var(--font-l);
|
|
line-height: 1.25;
|
|
}
|
|
|
|
p:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
p, li {
|
|
line-height: 1.5;
|
|
font-size: var(--font-n);
|
|
}
|
|
|
|
main > p > img, main > p > a > img {
|
|
width: 100%;
|
|
padding-top: var(--double-gap);
|
|
}
|
|
|
|
figure {
|
|
margin: 0;
|
|
padding: 0 0 2em 0;
|
|
width: 100%;
|
|
}
|
|
|
|
figure > a > img {
|
|
padding: 0;
|
|
width: 100%;
|
|
box-shadow: .75em .75em 0 0 var(--contrast-color);
|
|
}
|
|
|
|
figcaption {
|
|
text-align: center;
|
|
padding-top: var(--single-gap);
|
|
}
|
|
|
|
.page-block {
|
|
margin-top: 3rem;
|
|
margin-bottom: 3rem;
|
|
}
|
|
|
|
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 {
|
|
padding: var(--single-gap);
|
|
}
|
|
|
|
main h2 {
|
|
font-weight: var(--weight-extraheavy);
|
|
font-size: 2rem;
|
|
margin-top: var(--double-gap);
|
|
}
|
|
|
|
main :first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
header {
|
|
border-bottom: 1px solid var(--color-gray-20);
|
|
}
|
|
|
|
.links-nextprev {
|
|
list-style: none;
|
|
border-top: 1px solid var(--color-gray-20);
|
|
padding: 1em 0;
|
|
margin-top: var(--double-gap);
|
|
}
|
|
|
|
table {
|
|
margin: 1em 0;
|
|
}
|
|
table td,
|
|
table th {
|
|
padding-right: 1em;
|
|
}
|
|
|
|
pre,
|
|
code {
|
|
font-family: var(--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;
|
|
}
|
|
code {
|
|
word-break: break-all;
|
|
}
|
|
|
|
/* Header */
|
|
header {
|
|
display: flex;
|
|
gap: 1em .5em;
|
|
flex-wrap: wrap;
|
|
align-items: end;
|
|
padding: 1em;
|
|
}
|
|
.home-link {
|
|
font-size: var(--font-n); /* 16px /16 */
|
|
font-weight: var(--weight-extraheavy);
|
|
margin-right: 2em;
|
|
display: flex;
|
|
align-items: end;
|
|
}
|
|
.home-link:link:not(:hover) {
|
|
text-decoration: none;
|
|
}
|
|
.home-link img {
|
|
width: 3rem;
|
|
}
|
|
|
|
/* Nav */
|
|
.nav {
|
|
padding: 0;
|
|
margin: 0;
|
|
list-style: none;
|
|
}
|
|
nav ul {
|
|
display: flex;
|
|
align-items: end;
|
|
justify-content: space-between;
|
|
width: 20rem;
|
|
}
|
|
.nav-icon {
|
|
width: var(--single-gap);
|
|
height: .8rem;
|
|
margin-right: .25rem;
|
|
fill: var(--color-gray-90);
|
|
padding-bottom: .3rem;
|
|
transition: all .5s;
|
|
}
|
|
.nav-item {
|
|
display: inline-block;
|
|
text-decoration: none;
|
|
}
|
|
.nav-item li {
|
|
display: flex;
|
|
align-items: end;
|
|
height: 2.8rem;
|
|
margin-right: .5em;
|
|
margin-bottom: 0;
|
|
text-transform: uppercase;
|
|
letter-spacing: .15rem;
|
|
font-size: var(--font-xs);
|
|
font-weight: var(--weight-heavy);
|
|
color: var(--color-gray-90);
|
|
border-top: 1px solid var(--color-gray-90);
|
|
transition: all .5s;
|
|
}
|
|
.nav-item li:hover {
|
|
border-top: 20px solid var(--contrast-color);
|
|
}
|
|
.subscribe:hover {
|
|
color: var(--color-gray-90);
|
|
}
|
|
.nav-item a[href]:visited {
|
|
color: var(--color-gray-90);
|
|
}
|
|
.nav-item a[href]:hover {
|
|
text-decoration: none;
|
|
color: var(--color-gray-90);
|
|
}
|
|
.nav-item a[href]:not(:hover) {
|
|
text-decoration: none;
|
|
color: var(--color-gray-90);
|
|
}
|
|
.nav-item[data-currentpage="true"] {
|
|
}
|
|
|
|
.nav a[href][aria-current="page"] {
|
|
color: var(--color-gray-90);
|
|
}
|
|
|
|
/* Posts list */
|
|
.postlist h2 {
|
|
margin-bottom: var(--double-gap);
|
|
}
|
|
.postlist-item-container {
|
|
display: flex;
|
|
flex-flow: column nowrap;
|
|
}
|
|
.postlist-item {
|
|
display: flex;
|
|
flex-flow: row nowrap;
|
|
align-items: flex-start;
|
|
justify-content: flex-start;
|
|
margin-bottom: 1em;
|
|
width: 100%;
|
|
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
|
|
padding: var(--single-gap) 1.1rem var(--single-gap) 1.1rem;
|
|
border-radius: var(--card-radius);
|
|
background-color: white;
|
|
}
|
|
|
|
.post-image-container {
|
|
border-radius: var(--card-radius);
|
|
margin-right: var(--single-gap);
|
|
overflow: hidden;
|
|
max-height: 15rem;
|
|
}
|
|
.postlist-date,
|
|
.postlist-item:before {
|
|
font-size: var(--font-s); /* 13px /16 */
|
|
color: var(--color-gray-90);
|
|
}
|
|
.postlist-date {
|
|
word-spacing: -0.5px;
|
|
}
|
|
.postlist-link {
|
|
font-size: var(--font-xl); /* 19px /16 */
|
|
font-weight: var(--weight-extraheavy);
|
|
padding-right: .5em;
|
|
text-decoration: none;
|
|
}
|
|
.postlist-link h3 {
|
|
font-size: var(--font-l);
|
|
margin-bottom: 0;
|
|
}
|
|
.postlist-item-active .postlist-link {
|
|
font-weight: var(--weight-extraheavy);
|
|
}
|
|
.post-copy {
|
|
display: flex;
|
|
flex-flow: column wrap;
|
|
}
|
|
.post-image {
|
|
width: 15rem;
|
|
height: 15rem;
|
|
object-fit: cover;
|
|
object-position: 50% 50%;
|
|
}
|
|
|
|
/* Tags */
|
|
.post-tag, a.post-tag, .taglist li a {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
color: var(--nav-pill-text-color);
|
|
justify-content: center;
|
|
text-transform: capitalize;
|
|
background-color: var(--nav-pill-background-color-inactive);
|
|
text-decoration: none;
|
|
padding: .2rem .4rem .2rem .4rem;
|
|
border-radius: var(--pill-radius);
|
|
font-size: .75rem;
|
|
}
|
|
|
|
a.post-tag:visited {
|
|
color: var(--nav-pill-text-color);
|
|
}
|
|
|
|
a.post-tag:hover {
|
|
color: var(--nav-pill-text-color);
|
|
}
|
|
|
|
.taglist {
|
|
list-style-type: none;
|
|
padding-left: 0;
|
|
display: flex;
|
|
flex-flow: row wrap;
|
|
}
|
|
.taglist li {
|
|
margin: 0em .5em 1.25em 0em;
|
|
}
|
|
.taglist li a {
|
|
font-size: var(--font-l);
|
|
text-decoration-color: var(--contrast-color);
|
|
text-decoration-thickness: .1rem;
|
|
text-decoration-skip: none;
|
|
transition: all .5s;
|
|
font-weight: var(--weight-extraheavy);
|
|
padding: .4rem .8rem .4rem .8rem;
|
|
}
|
|
.postlist-item > .post-tag {
|
|
align-self: center;
|
|
}
|
|
@media(max-width: 556px) {
|
|
.taglist {
|
|
flex-flow: column nowrap;
|
|
}
|
|
}
|
|
|
|
/* Tags list */
|
|
.post-metadata {
|
|
display: inline-flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
gap: .5em;
|
|
list-style: none;
|
|
padding: 0 0 0 .4em;
|
|
font-size: var(--font-s);
|
|
margin-bottom: 5em;
|
|
}
|
|
.post-metadata time {
|
|
margin-right: .5em;
|
|
font-size: var(--font-n);
|
|
}
|
|
|
|
/* Direct Links / Markdown Headers */
|
|
a.header-anchor {
|
|
text-decoration: none;
|
|
font-style: normal;
|
|
/* font-size: var(--font-n); */
|
|
margin-left: .1em;
|
|
}
|
|
a[href].header-anchor,
|
|
a[href].header-anchor:visited {
|
|
color: transparent;
|
|
}
|
|
a[href].header-anchor:focus,
|
|
a[href].header-anchor:hover {
|
|
text-decoration: underline;
|
|
}
|
|
a[href].header-anchor:focus,
|
|
:hover > a[href].header-anchor {
|
|
color: #aaa;
|
|
}
|
|
|
|
h2 + .header-anchor {
|
|
font-size: var(--font-l);
|
|
}
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
.postlist-item {
|
|
background-color: var(--card-color);
|
|
}
|
|
}
|
|
|
|
/* Mobile Styles */
|
|
@media(max-width: 556px) {
|
|
body {
|
|
padding: 0rem 1.25rem 0rem 1.25rem;
|
|
}
|
|
figcaption {
|
|
font-size: var(--font-n);
|
|
}
|
|
h1 {
|
|
font-size: var(--font-xxl);
|
|
padding-top: 0;
|
|
line-height: 2rem;
|
|
}
|
|
h2, .postlist h2, main h2 {
|
|
font-size: var(--font-xl);
|
|
margin-bottom: var(--single-gap);
|
|
}
|
|
h3, .post-copy a h3 {
|
|
font-size: 1rem;
|
|
}
|
|
.nav-item li {
|
|
height: 2rem;
|
|
}
|
|
nav ul {
|
|
display: flex;
|
|
align-items: end;
|
|
justify-content: auto;
|
|
width: auto;
|
|
}
|
|
.post-copy a h3 {
|
|
margin-top: .5em;
|
|
}
|
|
.postlist {
|
|
padding-top: 0;
|
|
}
|
|
.postlist-item {
|
|
flex-flow: column wrap;
|
|
}
|
|
.postlist-link {
|
|
padding: 0;
|
|
}
|
|
.post-image {
|
|
width: 100%;
|
|
height: auto;
|
|
}
|
|
.post-image-container {
|
|
margin-right: 0;
|
|
height: 10em;
|
|
min-width: 100%;
|
|
}
|
|
.post-metadata {
|
|
margin-bottom: var(--single-gap);
|
|
}
|
|
header {
|
|
padding: 0rem .5rem var(--single-gap) .5rem;
|
|
margin-bottom: var(--single-gap);
|
|
}
|
|
.home-link {
|
|
max-width: 1rem;
|
|
margin-top: var(--single-gap);
|
|
}
|
|
.nav {
|
|
flex-flow: row wrap;
|
|
}
|
|
.nav-item {
|
|
margin-right: .5rem;
|
|
}
|
|
p, p.nodropcap.page-block, .post-copy p {
|
|
font-size: var(--font-n);
|
|
line-height: 1.25rem;
|
|
margin-top: var(--single-gap);
|
|
}
|
|
.post-metadata time, time.postlist-date {
|
|
font-size: var(--font-s);
|
|
}
|
|
.post-tag, a.post-tag, .taglist li a {
|
|
font-size: var(--font-xs);
|
|
}
|
|
}
|