/* main.css * Global stylesheet for erynwells.me * Eryn Wells */ :root { --header: 8rem; --footer: calc(8rem + var(--safe-bottom)); --light: #fff; --light-dim: #888; --dark: rgb(22, 22, 22); --highlight-color: rgb(50, 186, 228); --hljs-bg: #111; --safe-bottom: 0; --body-padding: 4rem; --body-width: 80rem; --body-background-color: var(--light); --body-foreground-color: var(--dark); --heading-color: var(--body-foreground-color); --link-color: var(--highlight-color); --menu-icon-size: 20px; --social-menu-padding: 1rem; --tag-text-color: var(--dark); --tag-background-color: #eee; --tag-hover-background-color: #bbb; --separator-color: #888; --twitter-icon: url(/icons/twitter.svg); --github-icon: url(/icons/github.svg); --instagram-icon: url(/icons/instagram.svg); --rss-icon: url(/icons/rss.svg); } @media (prefers-color-scheme: dark) { :root { --body-background-color: var(--dark); --body-foreground-color: var(--light); --tag-text-color: var(--light-dim); --tag-background-color: rgb(40, 40, 40); --tag-hover-background-color: rgb(73, 73, 73); --twitter-icon: url(/icons/twitter-dark.svg); --github-icon: url(/icons/github-dark.svg); --instagram-icon: url(/icons/instagram-dark.svg); --rss-icon: url(/icons/rss-dark.svg); } } blockquote { border-inline-start: 4px solid var(--separator-color); padding-inline-start: 2rem; margin-inline-start: 2rem; } figcaption h4 { margin-bottom: 0; } figure { border-radius: 0.5rem; display: inline-block; margin: 0; margin-block-start: 0; margin-block-end: 0; margin-inline-start: 0; margin-inline-end: 0; } figure a, figure a:hover { border: 0; } figure img { border-radius: 0.5rem; height: auto; max-width: 100%; margin-bottom: -3px; } figure + p { margin-top: 1rem; } figure .youtube { line-height: 1; overflow: hidden; width: var(--body-width); } figure.bordered { padding: 0.5rem; border: 2px solid #eee; } .centered { text-align: center; } h1, h2, h3, h4, h5, h6 { font-family: 'SF Pro Rounded', ui-rounded, 'Arial Rounded MT', system-ui, -apple-system, sans-serif; /*font-family: Palatino, Rockwell, Courier;*/ font-weight: 600; letter-spacing: 2px; } html { font-family: 'SF Pro', sans-serif; font-size: 8px; } img { height: auto; max-width: 100%; } p { line-height: 1.4; } pre { margin-bottom: 0; } .header, .footer { padding: 2rem 0; } /* * Header */ .header { align-items: baseline; border-bottom: 1px solid var(--separator-color); display: flex; flex-direction: row; } .header h1 { margin: 0; margin-right: 2rem; font-size: 4.5rem; } .header h1 a { color: var(--heading-color); text-decoration: none; } .header h1 a:hover { border: 0; } .menu > a + a:before { color: var(--heading-color); content: "•"; padding: 0 0.5rem; } .menu menu, .social menu { display: inline-block; list-style-type: none; margin: 0; padding: 0; text-transform: lowercase; } .menu menu li, .social menu li { display: inline-block; letter-spacing: 2px; } .menu menu li + li:before, .social menu li + li:before { font-size: 1.5rem; margin-right: 0.5rem; } .menu menu li + li:before { content: "•"; } .p5-sketch { display: block; position: relative; width: 100%; } .social menu li + li { margin-left: var(--social-menu-padding); } .social { display: flex; letter-spacing: 2px; margin-left: auto; } .social a { background-image: var(--url); background-repeat: no-repeat; background-size: var(--menu-icon-size); display: block; height: var(--menu-icon-size); width: var(--menu-icon-size); } .social a span { display: none; } .social > li + li:before { color: var(--dark); padding: 0 0.5rem; } .title-and-menu { align-items: baseline; display: flex; flex-direction: row; } .youtube iframe { aspect-ratio: 16 / 9; margin-bottom: -3px; width: 100%; } @media (max-width: 475px) { :root { --menu-icon-size: 18px; --social-menu-padding: 0.5rem; } .menu { margin-top: 1rem; } .social { margin-top: 1rem; } .title-and-menu { align-items: flex-start; flex-direction: column; } } @media (max-width: 320px) { .header h1 { font-size: 3.5rem; } } /* * Main */ .main > header { align-items: baseline; display: flex; } .main { margin: 3.5rem 0; } .main :first-child { margin-top: 0; } .main h1 { font-size: 3.5rem; } .main h1, .main h2, .main h3, .main h4, .main h5, .main h6 { margin-top: 3.5rem; margin-bottom: 2rem; } .main figcaption h4 { margin-bottom: 0; } .main p:last-child { margin-bottom: 0; } .main .main-title { margin-bottom: 0; } .post-list { margin-top: 1rem; line-height: 1.4; } .post-list h1, .post-list h2, .post-list h3, .post-list h4, .post-list h5, .post-list h6 { display: block; margin: 0; } .post-list h2 { font-size: 2.5rem; } .post-list article { color: gray; font-style: oblique; font-size: 1.8rem; margin-top: 0.5rem; } .post-nav { align-items: baseline; display: flex; margin-top: 3.5rem; } .post-nav .next { margin-left: auto; } .post-single footer { margin-block-start: 3.5rem; } ul.post-tags { display: flex; padding-inline-start: 0; } ul.post-tags li { background-color: var(--tag-background-color); border-radius: 4px; display: inline-block; letter-spacing: 2px; } ul.post-tags li:hover { background-color: var(--tag-hover-background-color); } ul.post-tags li a { color: var(--tag-text-color); display: block; font-size: 1.75rem; height: 100%; width: 100%; padding: 0.75rem 1rem; } ul.post-tags li a:hover { text-decoration: none; } ul.post-tags li + li { margin-inline-start: 1rem; } .post-title { align-items: baseline; display: flex; flex-wrap: wrap; margin-bottom: 2rem; } .post-title > h1 { flex-grow: 1; margin-block-end: 0; padding-bottom: 0; } .post-title > .post-date { color: var(--light-dim); display: inline-block; font-size: 1.75rem; inline-size: min-content; letter-spacing: 1px; margin-block-start: 0.5rem; text-transform: uppercase; white-space: nowrap; } @media (max-width: 620px) { .main h1 { font-size: 3rem; margin-bottom: 0.5rem; } .post-list { padding-inline-start: 4rem; } .post-list h2 { display: block; font-size: 2rem; } .post-list time { font-size: 1.8rem; margin-left: 0; } } @media (max-width: 704px) { :root { --body-padding: 2rem; } html { font-size: 7px; } } /* * Helpers */ /* For s that shouldn't break. */ .nobreak { white-space: nowrap; }