From 5956d72f419c46e6de1d97c6bc1e216a9b5ddbc4 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Mon, 2 Sep 2024 19:42:56 -0700 Subject: [PATCH] chore: styles --- package-lock.json | 4 ++-- package.json | 2 +- src/assets/styles/base/index.css | 7 ++++--- src/assets/styles/components/media-grid.css | 2 +- src/assets/styles/components/music-chart.css | 4 ++-- src/assets/styles/defaults/vars.css | 5 +++-- src/assets/styles/feed.xsl | 17 +++++------------ src/assets/styles/pages/books.css | 3 +-- src/assets/styles/pages/music.css | 3 +-- src/assets/styles/pages/watching.css | 7 +++---- src/assets/styles/plugins/prism.css | 2 +- src/assets/styles/reset.css | 2 +- 12 files changed, 25 insertions(+), 33 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3baa90df..8c8867e5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "coryd.dev", - "version": "24.6.4", + "version": "24.6.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "coryd.dev", - "version": "24.6.4", + "version": "24.6.5", "license": "MIT", "dependencies": { "@cdransf/api-text": "^1.5.0", diff --git a/package.json b/package.json index 05626a46..a3783316 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "24.6.4", + "version": "24.6.5", "description": "The source for my personal site. Built using 11ty (and other tools).", "type": "module", "scripts": { diff --git a/src/assets/styles/base/index.css b/src/assets/styles/base/index.css index 59138f55..24e36f5e 100644 --- a/src/assets/styles/base/index.css +++ b/src/assets/styles/base/index.css @@ -16,7 +16,7 @@ html { body { font-size: var(--font-size-base); - line-height: var(--line-height-default); + line-height: var(--line-height-base); } ::-moz-selection { @@ -182,6 +182,7 @@ a.icon-link:focus, a.icon-link:focus-within { outline: var(--outline-default); border-radius: var(--border-radius-slight); + line-height: var(--line-height-sm); text-decoration: none; & svg { @@ -228,7 +229,7 @@ a:active, /* headers */ h1, h2, h3, h4, h5, h6 { font-weight: var(--font-weight-bold); - line-height: var(--line-height-reduced); + line-height: var(--line-height-md); margin: var(--margin-vertical-base-horizontal-zero); } @@ -250,7 +251,7 @@ h6 { font-size: var(--font-size-sm); } .section-header { margin: var(--spacing-xl) 0 var(--spacing-lg); - line-height: 1; + line-height: var(--line-height-sm); &.posts { margin: 0 0 var(--spacing-lg); diff --git a/src/assets/styles/components/media-grid.css b/src/assets/styles/components/media-grid.css index 23403b3a..0d0e92e9 100644 --- a/src/assets/styles/components/media-grid.css +++ b/src/assets/styles/components/media-grid.css @@ -86,7 +86,7 @@ & .subheader { color: var(--color-lightest); font-size: var(--font-size-sm); - line-height: var(--line-height-reduced); + line-height: var(--line-height-md); text-shadow: var(--text-shadow-default); } diff --git a/src/assets/styles/components/music-chart.css b/src/assets/styles/components/music-chart.css index 9d74638f..d11fbe88 100644 --- a/src/assets/styles/components/music-chart.css +++ b/src/assets/styles/components/music-chart.css @@ -58,7 +58,7 @@ & .title { font-weight: var(--font-weight-bold); - line-height: var(--line-height-reduced); + line-height: var(--line-height-md); & a { outline: none; @@ -82,7 +82,7 @@ & .subtext, & .subtext p, & .timestamp { - line-height: var(--line-height-reduced); + line-height: var(--line-height-md); } & .subtext, diff --git a/src/assets/styles/defaults/vars.css b/src/assets/styles/defaults/vars.css index de9648d1..8ed2994e 100644 --- a/src/assets/styles/defaults/vars.css +++ b/src/assets/styles/defaults/vars.css @@ -92,8 +92,9 @@ --font-weight-bold: 600; --font-weight-extrabold: 800; - --line-height-reduced: 1.5; - --line-height-default: 2; + --line-height-sm: 1; + --line-height-md: 1.5; + --line-height-base: 2; /* spacing */ --sizing-xs: .25rem; diff --git a/src/assets/styles/feed.xsl b/src/assets/styles/feed.xsl index ef2d9df2..062a51f1 100644 --- a/src/assets/styles/feed.xsl +++ b/src/assets/styles/feed.xsl @@ -90,8 +90,8 @@ --font-weight-bold: 600; --font-weight-extrabold: 800; - --line-height-reduced: 1.5; - --line-height-default: 2; + --line-height-md: 1.5; + --line-height-base: 2; /* outline */ --outline-default: var(--outline-default); @@ -147,7 +147,7 @@ font-family: var(--font-mono); font-size: var(--font-size-base); font-weight: var(--font-weight-base); - line-height: var(--line-height-default); + line-height: var(--line-height-base); letter-spacing: -.05rem; word-spacing: -.125rem; color: var(--text-color); @@ -209,7 +209,7 @@ h1, h2, h3 { font-weight: var(--font-weight-bold); - line-height: var(--line-height-reduced); + line-height: var(--line-height-md); margin-bottom: var(--spacing-base); } @@ -219,19 +219,12 @@ } a:focus, - a:focus-within - a:focus > svg, - a:focus-within > svg { + a:focus-within, { outline: var(--outline-default); border-radius: var(--border-radius-slight); text-decoration: none; } - a:has(svg):focus, - a:has(svg):focus-within { - outline: none; - } - a:hover, a:focus, a:active { diff --git a/src/assets/styles/pages/books.css b/src/assets/styles/pages/books.css index d1542f69..3af71ee8 100644 --- a/src/assets/styles/pages/books.css +++ b/src/assets/styles/pages/books.css @@ -69,12 +69,11 @@ & p { &.title { font-size: var(--font-size-xl); - line-height: var(--line-height-reduced); + line-height: var(--line-height-md); } &.sub-meta { font-size: var(--font-size-sm); - line-height: var(--line-height-sm); & svg { width: var(--sizing-svg-sm); diff --git a/src/assets/styles/pages/music.css b/src/assets/styles/pages/music.css index 757853c7..1c8744aa 100644 --- a/src/assets/styles/pages/music.css +++ b/src/assets/styles/pages/music.css @@ -35,12 +35,11 @@ &.title { font-size: var(--font-size-xl); - line-height: var(--line-height-reduced); + line-height: var(--line-height-md); } &.sub-meta { font-size: var(--font-size-sm); - line-height: var(--line-height-sm); & svg { width: var(--sizing-svg-sm); diff --git a/src/assets/styles/pages/watching.css b/src/assets/styles/pages/watching.css index b5ffc95c..5859883d 100644 --- a/src/assets/styles/pages/watching.css +++ b/src/assets/styles/pages/watching.css @@ -47,7 +47,7 @@ a:active > .watching.hero::after { & .header, & .subheader { - line-height: var(--line-height-reduced); + line-height: var(--line-height-md); text-shadow: var(--text-shadow-default); } } @@ -109,7 +109,7 @@ a:active > .watching.hero::after { & .rating { color: var(--color-lightest); font-size: var(--font-size-sm); - line-height: var(--line-height-reduced); + line-height: var(--line-height-md); text-shadow: var(--text-shadow-default); } @@ -171,12 +171,11 @@ a:active > .watching.hero::after { &.title { font-size: var(--font-size-xl); - line-height: var(--line-height-reduced); + line-height: var(--line-height-md); } &.sub-meta { font-size: var(--font-size-sm); - line-height: var(--line-height-sm); & svg { width: var(--sizing-svg-sm); diff --git a/src/assets/styles/plugins/prism.css b/src/assets/styles/plugins/prism.css index 58deab35..011dd168 100644 --- a/src/assets/styles/plugins/prism.css +++ b/src/assets/styles/plugins/prism.css @@ -10,7 +10,7 @@ pre[class*="language-"] { word-spacing: normal; word-break: normal; word-wrap: normal; - line-height: var(--line-height-reduced); + line-height: var(--line-height-md); tab-size: 2; hyphens: none; } diff --git a/src/assets/styles/reset.css b/src/assets/styles/reset.css index 65ac757d..5113ceb6 100644 --- a/src/assets/styles/reset.css +++ b/src/assets/styles/reset.css @@ -14,7 +14,7 @@ - improve text rendering */ body { - line-height: var(--line-height-reduced); + line-height: var(--line-height-md); -webkit-font-smoothing: antialiased; }