erynwells.me/assets/styles/root.css

648 lines
14 KiB
CSS
Raw Normal View History

@layer reset, root, template, page;
:root {
--black: 0, 0, 0;
--sub-dk-gray: 16, 16, 16;
--dk-gray: 32, 32, 32;
--super-dk-gray: 80, 80, 80;
--mid-gray: 128, 128, 128;
--sub-lt-gray: 175, 175, 175;
--lt-gray: 223, 223, 223;
--super-lt-gray: 240, 240, 240;
--white: 255, 255, 255;
--lt-blue: 69, 212, 243;
--mid-blue: 26, 169, 239;
--dk-blue: 63, 46, 231;
--purple: 161, 49, 232;
--lilac: 187, 121, 245;
2023-03-13 21:06:45 -07:00
--background: var(--white);
--site-nav-link-color: rgb(var(--mid-blue));
--separator-color: rgb(var(--lt-gray));
--header-border-color: var(--separator-color);
--footer-border-color: var(--separator-color);
--box-shadow-color: rgba(var(--lt-gray), 0.8);
--header-box-shadow-color: var(--box-shadow-color);
--font-family-body: Verdana, Helvetica, sans-serif;
--font-family-monospace: "Courier New", Courier, monospace;
--font-family-heading: Museo_Slab, Tahoma, sans-serif;
--font-family-site-heading: Museo_Slab, Tahoma, sans-serif;
--font-size-min: 6px;
--font-size-max: 8px;
--body-font-size: 2rem;
--body-item-spacing: 1em;
--body-line-height: 1.5;
--body-header-line-height: 1.1;
--body-code-background-color: rgb(var(--super-lt-gray));
--heading-color: rgb(var(--black));
2022-10-31 08:41:24 -07:00
--header-series-arrow-foreground-color: rgb(var(--sub-dk-gray));
2023-03-13 21:06:45 -07:00
--html-background-color: rgb(var(--background));
--html-color: rgba(var(--black), 0.8);
--nav-bulleted-spacing: 0.75rem;
--platter-background-color: rgba(var(--white), var(--platter-background-opacity));
--platter-background-opacity: 0.6;
--platter-backdrop-filter: blur(10px);
--content-width: 80rem;
2022-09-24 07:49:43 -07:00
--tag-foreground-color: rgb(var(--super-dk-gray));
--tag-background-color: rgb(var(--super-lt-gray));
--tag-spacer-foreground-color: rgb(var(--super-dk-gray));
--tag-hover-background-color: rgb(var(--sub-lt-gray));
2022-09-24 07:49:43 -07:00
--transition-duration: 0.7s;
2022-09-25 07:34:52 -07:00
--social-menu-padding: 1rem;
--menu-icon-size: 20px;
2022-09-25 07:34:52 -07:00
--twitter-icon: url(/icons/twitter.svg);
--github-icon: url(/icons/github.svg);
--instagram-icon: url(/icons/instagram.svg);
--feed-icon: url(/icons/rss.svg);
}
@media (prefers-color-scheme: dark) {
:root {
2023-03-13 21:06:45 -07:00
--background: var(--black);
--separator-color: rgb(var(--dk-gray));
--box-shadow-color: rgba(var(--dk-gray), 0.8);
--body-code-background-color: rgb(var(--dk-gray));
2022-09-25 07:34:52 -07:00
--heading-color: rgb(var(--white));
2022-10-31 08:41:24 -07:00
--header-series-arrow-foreground-color: rgb(var(--super-dk-gray));
2023-03-13 21:06:45 -07:00
--html-background-color: rgb(var(--background));
--html-color: rgba(var(--white), 0.8);
--platter-background-color: rgba(var(--black), var(--platter-background-opacity));
--platter-backdrop-filter: brightness(0.66) blur(10px);
--tag-foreground-color: rgb(var(--sub-lt-gray));
--tag-background-color: rgb(var(--dk-gray));
--tag-spacer-foreground-color: rgb(var(--super-dk-gray));
--tag-hover-background-color: rgb(var(--super-dk-gray));
--tag-hover-foreground-color: rgb(var(--mid-gray));
2022-09-25 07:34:52 -07:00
--twitter-icon: url(/icons/twitter-dark.svg);
--github-icon: url(/icons/github-dark.svg);
--instagram-icon: url(/icons/instagram-dark.svg);
--feed-icon: url(/icons/rss-dark.svg);
}
}
Implement fingerprinting site and page resources This will keep browsers from caching files that have changed. I've also added SRI information to the <script> and <link> elements for browsers to verify resources. Squashed commit of the following: commit f3fcb163881d366bc72f5961f83074566395a6d9 Author: Eryn Wells <eryn@erynwells.me> Date: Tue Nov 8 17:47:42 2022 -0800 Remove static/styles/root.css commit 53a30624a01b8a3349264efa5cf24bdd9fc5e0a2 Author: Eryn Wells <eryn@erynwells.me> Date: Tue Nov 8 17:47:26 2022 -0800 Add back the basic table styles that got ditched when root.css was moved to assets/styles commit 294fa8343b1d03c3955deeae61948232704fb5e7 Author: Eryn Wells <eryn@erynwells.me> Date: Tue Nov 8 17:45:38 2022 -0800 Get all the fingerprinting done! - Add partials in the resources folder for each of the major resources of my site - Consolidate .css and .js files via resources.Concat where possible commit d0b223fa3353d411d7f05fab8de0a1edda66a695 Author: Eryn Wells <eryn@erynwells.me> Date: Mon Nov 7 08:36:39 2022 -0800 All the template updates for fingerprinting commit 1751abadac3d07f891e3298ac23bf9331be7a2a2 Author: Eryn Wells <eryn@erynwells.me> Date: Mon Nov 7 08:36:27 2022 -0800 Add secure_asset.html template commit 94ea8068c91dfc385af000685df7fbd12f11077f Author: Eryn Wells <eryn@erynwells.me> Date: Mon Nov 7 08:35:48 2022 -0800 Move a bunch of scripts and CSS to assets so they can be processed with Hugo Pipes Use Pipes to fingerprint and add SLI information to <script> and <link> tags.
2022-11-08 17:50:11 -08:00
@font-face {
font-family: "Museo_Slab";
src: url("{{ `/fonts/Museo_Slab_500.woff2` | relURL }}") format("woff2"),
url("{{ `/fonts/Museo_Slab_500.woff` | relURL }}") format("woff");
font-weight: normal;
font-style: normal;
}
@layer reset {
2022-10-15 10:18:43 -07:00
body, button, h1, h2, h3, h4, h5, h6, input, ol, ul, p, pre, textarea {
padding: 0; margin: 0;
}
}
a {
color: rgb(var(--mid-blue));
text-decoration: none;
}
a:hover {
text-decoration: underline;
text-underline-offset: 0.12em;
}
a:visited { color: rgb(var(--mid-blue)); }
a.hover-only {
color: var(--html-color);
transition: color 0.2s;
}
a.hover-only:hover {
color: rgb(var(--mid-blue));
text-decoration: underline;
transition: color 0.2s;
}
article.two-column {
columns: 2;
}
blockquote {
border-inline-start: 4px solid var(--separator-color);
padding-inline-start: 2rem;
margin-inline-start: 2rem;
}
body {
font-size: var(--body-font-size);
line-height: var(--body-line-height);
}
code {
background-color: var(--body-code-background-color);
border-radius: 0.25rem;
font-family: var(--font-family-monospace);
display: inline-block;
padding-inline: 0.6rem;
}
code.nobg {
background: none;
border-radius: 0;
display: inline-block;
margin: 0;
padding: 0;
}
2022-09-25 08:34:54 -07:00
figcaption {
font-size: 75%;
line-height: var(--body-line-height);
2022-09-25 08:34:54 -07:00
margin-block-start: 0.2em;
text-align: center;
}
figure {
border-radius: 6px;
display: inline-block;
2022-10-21 11:09:07 -07:00
line-height: 1;
2022-09-25 08:34:54 -07:00
margin: 0;
margin-inline: 0;
overflow: hidden;
max-width: var(--content-width);
width: 100%;
}
figure.bordered {
padding: 0.5rem;
border: 2px solid #eee;
}
2022-09-25 08:34:54 -07:00
figure a,
figure a:hover {
border: 0;
}
figure img {
border-radius: 6px;
height: auto;
max-width: var(--content-width);
width: 100%;
}
2022-10-03 19:52:28 -07:00
figure svg {
width: 100%;
height: auto;
}
2022-09-25 08:34:54 -07:00
figure .youtube {
border-radius: 6px;
line-height: 1;
overflow: hidden;
max-width: var(--content-width);
width: 100%;
}
2022-09-25 08:43:27 -07:00
footer.site {
align-items: center;
display: flex;
flex-direction: column;
font-size: 1.6rem;
2022-10-25 17:37:15 -04:00
margin-block: var(--body-item-spacing);
2022-09-25 08:43:27 -07:00
text-align: center;
}
2022-10-25 17:37:15 -04:00
footer.site > ul {
2022-09-25 08:43:27 -07:00
align-items: center;
display: flex;
flex-wrap: wrap;
justify-content: center;
list-style: none;
}
footer.site > .slogans {
margin-block-end: 0;
}
2022-10-25 17:37:15 -04:00
footer.site > .slogans > li {
margin-block-end: 0;
2022-09-25 08:43:27 -07:00
margin-inline-start: 0.5em;
}
2022-10-25 17:37:15 -04:00
footer.site > p {
2022-09-25 08:43:27 -07:00
margin: 0;
}
footer.site p + p {
margin-top: 0.25rem;
}
@media (max-width: 740px) {
footer.site .slogans span {
white-space: nowrap;
}
}
h1 { font-size: 1.6em; }
h2 { font-size: 1.5em; }
h3 { font-size: 1.4em; }
h4 { font-size: 1.3em; }
h5 { font-size: 1.3em; }
h6 { font-size: var(--body-font-size); }
h5, h6 { font-family: var(--font-family-body); }
h1, h2, h3, h4, h5, h6 {
color: var(--heading-color);
font-family: var(--font-family-heading);
font-weight: 600;
margin-block: 3.5rem 1rem;
letter-spacing: 0.08em;
line-height: var(--body-header-line-height);
}
h1.site {
color: rgb(var(--mid-blue));
font-size: 2.5em;
}
@supports (background-clip: text) {
h1.site {
background:
radial-gradient(circle at 20% 70%, rgb(var(--purple)), transparent 40%),
radial-gradient(circle at 30% 30%, rgb(var(--lt-blue)), rgb(var(--mid-blue)) 20%, transparent 80%),
radial-gradient(ellipse at 95% 20%, rgb(var(--dk-blue)), rgb(var(--mid-blue)) 70%, transparent 80%),
radial-gradient(circle at 100% 100%, rgb(var(--purple)), rgb(var(--lilac)) 100%),
radial-gradient(circle at 45% 100%, rgb(var(--lilac)), rgb(var(--purple)) 60%),
radial-gradient(ellipse at 50% 50%, rgb(var(--dk-blue)), transparent 80%);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
}
h1.site > a { color: inherit; }
h1.site > a:hover { text-decoration: none; }
header.site {
display: flex;
width: 100%;
z-index: 10000;
}
2022-10-25 17:36:06 -04:00
header.site > .grid > h1 {
font-family: var(--font-family-site-heading);
font-size: 2em;
2022-09-11 10:42:15 -07:00
margin: 0;
2022-10-25 17:36:06 -04:00
order: 1;
white-space: nowrap;
}
2022-10-25 17:36:06 -04:00
header.site > .grid {
align-items: baseline;
2022-10-25 17:36:06 -04:00
display: flex;
flex-wrap: wrap;
gap: 0 0.5em;
margin: 0 auto;
2022-10-25 17:36:06 -04:00
max-width: var(--content-width);
padding: 1.5rem 3rem;
2022-10-25 17:36:06 -04:00
width: 100%;
}
header.site > .grid > nav {
align-items: center;
display: flex;
font-size: max(1.5rem, 80%);
justify-content: start;
letter-spacing: 0.12em;
list-style: none;
text-transform: lowercase;
}
header.site > .grid > nav > li {
color: var(--site-nav-link-color);
display: block;
}
header.site > .grid > nav > .active { font-weight: bold; }
2022-10-25 17:36:06 -04:00
header.site > .grid > nav:first-of-type {
justify-content: start;
2022-10-25 17:36:06 -04:00
order: 2;
}
2022-10-25 17:36:06 -04:00
header.site > .grid > nav:last-of-type {
justify-content: end;
2022-10-25 17:36:06 -04:00
order: 3;
}
@media (max-width: 516px) {
header.site > .platter {
border-left: none;
2022-10-25 17:36:06 -04:00
border-radius: 0;
border-right: none;
border-top: none;
2022-10-25 17:36:06 -04:00
}
header.site > .grid {
max-width: none;
}
}
@media (max-width: 435px) {
header.site > .grid > nav:first-of-type {
order: 5;
}
}
html {
2022-11-18 08:28:58 -08:00
--font-size-scale-factor: 1vmax;
background-color: var(--html-background-color);
color: var(--html-color);
font-family: var(--font-family-body);
2022-11-18 08:28:58 -08:00
font-size: clamp(var(--font-size-min), var(--font-size-scale-factor), var(--font-size-max));
}
img {
height: auto;
max-width: 100%;
}
img.circular {
shape-outside: circle(50%);
-webkit-clip-path: circle(50%);
clip-path: circle(50%);
}
main {
box-sizing: border-box;
max-width: calc(var(--content-width) + 2 * var(--body-item-spacing));
margin: var(--body-item-spacing) auto;
2022-10-21 11:09:07 -07:00
padding-inline: var(--body-item-spacing);
width: 100%;
}
main > :first-child,
main > article > :first-child { margin-block-start: 0; }
main > :not(:last-child),
main > article > :not(:last-child) { margin-block-end: var(--body-item-spacing); }
main > :last-child,
main > article > :last-child { margin-block-end: 0; }
2022-10-25 17:36:06 -04:00
nav.bulleted > li:first-child::before {
color: var(--html-color);
content: "";
margin-inline: 0;
}
2022-10-25 17:36:06 -04:00
nav.bulleted > li::before {
color: var(--heading-color);
content: "•";
font-size: 60%;
font-weight: normal;
opacity: 80%;
margin-inline: var(--nav-bulleted-spacing);
}
nav.social > li { margin-inline-start: var(--nav-bulleted-spacing); }
nav.social > li:first-child { margin-inline-start: 0; }
p {
letter-spacing: 0.025em;
line-height: var(--body-line-height);
2022-11-18 21:17:01 -08:00
}
2022-11-20 09:15:46 -08:00
ul,
ol,
dl,
ul > li,
ol > li,
dl > dt,
2022-11-18 21:17:01 -08:00
ul > li > ul,
ul > li > ol,
ol > li > ul,
ol > li > ol {
2022-11-20 09:15:46 -08:00
margin-inline-start: calc(var(--body-item-spacing) + 2px);
2022-10-14 14:33:22 -07:00
}
2022-10-31 08:41:24 -07:00
header > span.series {
font-size: 1.75rem;
letter-spacing: 1px;
margin-inline-start: 0.5em;
}
header > span.series::before {
color: var(--header-series-arrow-foreground-color);
content: "↳";
margin-inline-end: 0.25em;
}
.post-list {
list-style: none;
margin: 0;
padding: 0;
}
@supports (display: subgrid) {
.post-list {
align-items: baseline;
display: grid;
gap: 1em;
grid-template-columns:
minmax(150px, max-content) minmax(20px, max-content) 3px auto;
grid-template-areas: "month day line title";
}
}
.post-list li {
align-items: baseline;
border-radius: 6px;
display: grid;
gap: 1em;
padding: 0.1em;
}
.post-title {
align-items: baseline;
display: flex;
flex-wrap: wrap;
gap: 0 4rem;
}
.post-title h1 {
flex-grow: 1;
font-size: 1.8em;
margin-block: 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;
white-space: nowrap;
}
.p5-sketch {
display: block;
position: relative;
width: 100%;
}
.social {
2022-10-25 17:36:06 -04:00
display: block;
letter-spacing: 2px;
margin-left: auto;
2022-10-25 17:36:06 -04:00
order: 2;
}
2022-10-25 17:36:06 -04:00
.social > li > 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);
}
2022-10-25 17:36:06 -04:00
.social > li > a > span {
display: none;
}
.social > li + li:before {
color: var(--dark);
padding: 0 0.5rem;
}
footer > .tags {
display: flex;
2022-11-18 21:17:01 -08:00
margin-inline-start: 0;
padding-inline-start: 0;
}
footer > .tags > li {
background-color: var(--tag-background-color);
color: var(--tag-foreground-color);
border-radius: 4px;
display: inline-block;
font-size: 75%;
letter-spacing: 1px;
}
2022-11-20 09:15:46 -08:00
footer > .tags > li:first-child {
margin-inline-start: 0;
}
footer > .tags > li:hover {
background-color: var(--tag-hover-background-color);
}
footer > .tags > li > a {
color: inherit;
display: block;
height: 100%;
width: 100%;
padding: 0.6rem 1rem;
}
footer > .tags > li > a:hover {
color: var(--tag-hover-foreground-color);
text-decoration: none;
}
footer > .tags > li + li { margin-inline-start: 1rem; }
footer > .tags > li.chevron + li { margin-inline-start: 0 }
footer > .tags > .chevron {
align-items: center;
border: 0;
border-radius: 0;
color: var(--tag-spacer-foreground-color);
background-color: inherit;
display: flex;
justify-content: center;
margin-inline-start: 0;
padding-inline-start: 1px;
width: 2rem;
}
footer > .tags > .chevron:hover {
color: var(--tag-spacer-foreground-color);
background-color: inherit;
}
2022-11-07 08:59:10 -08:00
table {
border: 1px solid var(--separator-color);
border-collapse: collapse;
margin-inline: auto;
width: 50%;
}
td, th {
border: 1px solid var(--separator-color);
padding-inline: 1rem;
}
.youtube iframe {
aspect-ratio: 16 / 9;
margin-bottom: -3px;
width: 100%;
}
/** SYNTAX HIGHLIGHTING **/
.highlight code {
background-color: inherit;
margin-block: 0.5em;
}
.highlight .line {
display: grid;
grid-template-columns: max-content auto;
}
.highlight .ln a {
-webkit-user-select: none;
-moz-use-select: none;
-ms-user-select: none;
user-select: none;
}
.highlight .cl {
white-space: pre-wrap;
}
2022-09-25 08:47:02 -07:00
/** HELPER CLASSES **/
.centered { text-align: center; }
2022-10-09 13:26:59 -07:00
.float-right { float: right; }
2022-09-25 08:47:02 -07:00
.nobreak { white-space: nowrap; }
.noselect {
cursor: default;
-webkit-user-select: none;
-moz-use-select: none;
-ms-user-select: none;
user-select: none;
}
2022-09-25 08:47:02 -07:00
.platter {
-webkit-backdrop-filter: var(--platter-backdrop-filter);
backdrop-filter: var(--platter-backdrop-filter);
background-color: var(--platter-background-color);
border: 1px solid var(--header-border-color);
border-radius: 12px;
2022-10-15 10:19:30 -07:00
box-shadow: 3px 4px 4px var(--header-box-shadow-color);
}
2022-09-25 08:47:02 -07:00
.visible { visibility: visible; }