From 1010837e2f565ce8f54da98f7a0cc29ee324dacf Mon Sep 17 00:00:00 2001
From: Jake Jarvis
Date: Thu, 24 Apr 2025 11:20:02 -0400
Subject: [PATCH] semantic color names
---
app/contact/form.module.css | 20 +--
app/contact/page.tsx | 2 +-
app/globals.css | 114 +++++++-----------
app/hillary/page.tsx | 2 +-
app/layout.tsx | 2 +-
app/leo/page.tsx | 2 +-
app/notes/[slug]/page.module.css | 4 +-
app/page.tsx | 2 +-
app/previously/page.mdx | 2 +-
app/projects/page.tsx | 26 ++--
app/themes.css | 37 ------
app/zip/page.tsx | 4 +-
components/Blockquote/Blockquote.tsx | 2 +-
components/Code/Code.module.css | 14 +--
components/CopyButton/CopyButton.tsx | 2 +-
components/Footer/Footer.tsx | 10 +-
components/Header/Header.tsx | 6 +-
components/Heading/Heading.module.css | 4 +-
.../HorizontalRule/HorizontalRule.module.css | 2 +-
components/Loading/Loading.module.css | 2 +-
components/MenuItem/MenuItem.tsx | 2 +-
components/PageTitle/PageTitle.tsx | 2 +-
components/SkipNav/SkipNav.module.css | 6 +-
notes/dark-mode/index.mdx | 2 +-
24 files changed, 104 insertions(+), 167 deletions(-)
delete mode 100644 app/themes.css
diff --git a/app/contact/form.module.css b/app/contact/form.module.css
index 743e9db3..0821bae8 100644
--- a/app/contact/form.module.css
+++ b/app/contact/form.module.css
@@ -2,15 +2,15 @@
width: 100%;
padding: 0.8em;
margin: 0.6em 0;
- border: 2px solid var(--colors-light);
+ border: 2px solid var(--color-gray-400);
border-radius: 0.6em;
color: var(--colors-text);
- background-color: var(--colors-super-duper-light);
+ background-color: var(--color-gray-100);
}
.input:focus {
outline: none;
- border-color: var(--colors-link);
+ border-color: var(--color-link);
}
.input.textarea {
@@ -21,12 +21,12 @@
}
.input.invalid {
- border-color: var(--colors-error);
+ border-color: var(--color-error);
}
.errorMessage {
font-size: 0.9em;
- color: var(--colors-error);
+ color: var(--color-error);
}
.actionRow {
@@ -48,13 +48,13 @@
user-select: none;
font-weight: 500;
color: var(--colors-text);
- background-color: var(--colors-kinda-light);
+ background-color: var(--color-gray-300);
}
.submitButton:hover,
.submitButton:focus-visible {
- color: var(--colors-super-duper-light);
- background-color: var(--colors-link);
+ color: var(--color-gray-100);
+ background-color: var(--color-link);
}
.submitIcon {
@@ -70,11 +70,11 @@
}
.result.success {
- color: var(--colors-success);
+ color: var(--color-success);
}
.result.error {
- color: var(--colors-error);
+ color: var(--color-error);
}
.resultIcon {
diff --git a/app/contact/page.tsx b/app/contact/page.tsx
index 1e03f0fd..e6803490 100644
--- a/app/contact/page.tsx
+++ b/app/contact/page.tsx
@@ -32,7 +32,7 @@ const Page = () => {
size="0.975em"
style={{
marginRight: "0.15em",
- stroke: "var(--colors-warning)",
+ stroke: "var(--color-warning)",
verticalAlign: "middle",
}}
/>{" "}
diff --git a/app/globals.css b/app/globals.css
index bdc52bbf..0e1d6e42 100644
--- a/app/globals.css
+++ b/app/globals.css
@@ -9,92 +9,66 @@
--container-default: var(--container-4xl);
--color-*: initial;
- --color-background-inner: #ffffff;
- --color-background-outer: #fcfcfc;
- --color-text: #202020;
- --color-medium-dark: #515151;
- --color-medium: #5e5e5e;
- --color-medium-light: #757575;
- --color-light: #d2d2d2;
- --color-kinda-light: #e3e3e3;
- --color-super-light: #f4f4f4;
- --color-super-duper-light: #fbfbfb;
- --color-link: #0e6dc2;
- --color-success: #44a248;
- --color-error: #ff1b1b;
- --color-warning: #f78200;
+ --color-background-inner: oklch(1 0 0);
+ --color-background-outer: oklch(0.99 0 0);
+ --color-gray-900: oklch(0.27 0 0);
+ /* --color-gray-800: */
+ --color-gray-700: oklch(0.39 0 0);
+ --color-gray-600: oklch(0.44 0 0);
+ --color-gray-500: oklch(0.53 0 0);
+ --color-gray-400: oklch(0.85 0 0);
+ --color-gray-300: oklch(0.9 0 0);
+ --color-gray-200: oklch(0.96 0 0);
+ --color-gray-100: oklch(0.99 0 0);
+ --color-link: oklch(0.57 0.17 255);
+ --color-success: oklch(0.68 0.16 142);
+ --color-error: oklch(0.65 0.26 25);
+ --color-warning: oklch(0.75 0.17 75);
--animate-wave: wave 5s ease 1s infinite;
--animate-heartbeat: heartbeat 10s ease 7.5s infinite;
@keyframes wave {
- 0% {
- transform: rotate(0deg);
- }
- 5% {
- transform: rotate(14deg);
- }
- 10% {
- transform: rotate(-8deg);
- }
- 15% {
- transform: rotate(14deg);
- }
- 20% {
- transform: rotate(-4deg);
- }
- 25% {
- transform: rotate(10deg);
- }
- 30% {
- transform: rotate(0deg);
- }
+ 0% { transform: rotate(0deg) }
+ 5% { transform: rotate(14deg) }
+ 10% { transform: rotate(-8deg) }
+ 15% { transform: rotate(14deg) }
+ 20% { transform: rotate(-4deg) }
+ 25% { transform: rotate(10deg) }
+ 30% { transform: rotate(0deg) }
/* pause for ~9 out of 10 seconds */
- 100% {
- transform: rotate(0deg);
- }
+ 100% { transform: rotate(0deg) }
}
@keyframes heartbeat {
- 0% {
- transform: scale(1);
- }
- 2% {
- transform: scale(1.25);
- }
- 4% {
- transform: scale(1);
- }
- 6% {
- transform: scale(1.2);
- }
- 8% {
- transform: scale(1);
- }
+ 0% { transform: scale(1) }
+ 2% { transform: scale(1.25) }
+ 4% { transform: scale(1) }
+ 6% { transform: scale(1.2) }
+ 8% { transform: scale(1) }
/* pause for ~9 out of 10 seconds */
- 100% {
- transform: scale(1);
- }
+ 100% { transform: scale(1) }
}
}
@custom-variant dark (&:where([data-theme=dark], [data-theme=dark] *));
[data-theme="dark"] {
- --color-background-inner: #1e1e1e;
- --color-background-outer: #252525;
- --color-text: #f1f1f1;
- --color-medium-dark: #d7d7d7;
- --color-medium: #b1b1b1;
- --color-medium-light: #959595;
- --color-light: #646464;
- --color-kinda-light: #535353;
- --color-super-light: #272727;
- --color-super-duper-light: #1f1f1f;
- --color-link: #88c7ff;
- --color-success: #78df55;
- --color-error: #ff5151;
- --color-warning: #f2b702;
+ --color-background-inner: oklch(0.2 0 0);
+ --color-background-outer: oklch(0.22 0 0);
+ --color-gray-900: oklch(0.95 0 0);
+ /* --color-gray-800: */
+ --color-gray-700: oklch(0.87 0 0);
+ --color-gray-600: oklch(0.74 0 0);
+ --color-gray-500: oklch(0.65 0 0);
+ --color-gray-400: oklch(0.46 0 0);
+ --color-gray-300: oklch(0.4 0 0);
+ --color-gray-200: oklch(0.23 0 0);
+ --color-gray-100: oklch(0.2 0 0);
+ --color-link: oklch(0.8 0.1 230);
+ --color-success: oklch(0.83 0.15 142);
+ --color-error: oklch(0.7 0.2 25);
+ --color-warning: oklch(0.85 0.15 85);
}
diff --git a/app/hillary/page.tsx b/app/hillary/page.tsx
index 8c20e236..4c4b41a1 100644
--- a/app/hillary/page.tsx
+++ b/app/hillary/page.tsx
@@ -57,7 +57,7 @@ const Page = () => {
fontSize: "0.9em",
lineHeight: 1.8,
margin: "1.25em 1em 0 1em",
- color: "var(--colors-medium-light)",
+ color: "var(--color-gray-500)",
}}
>
Video is property of{" "}
diff --git a/app/layout.tsx b/app/layout.tsx
index 96bc51d5..bb9e4cea 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -62,7 +62,7 @@ const RootLayout = ({ children }: Readonly<{ children: React.ReactNode }>) => {
/>
-
+
diff --git a/app/leo/page.tsx b/app/leo/page.tsx
index f1d615c7..4c1b1131 100644
--- a/app/leo/page.tsx
+++ b/app/leo/page.tsx
@@ -56,7 +56,7 @@ const Page = () => {
fontSize: "0.9em",
lineHeight: 1.8,
margin: "1.25em 1em 0 1em",
- color: "var(--colors-medium-light)",
+ color: "var(--color-gray-500)",
}}
>
Video is property of{" "}
diff --git a/app/notes/[slug]/page.module.css b/app/notes/[slug]/page.module.css
index 2719ca37..2b5df844 100644
--- a/app/notes/[slug]/page.module.css
+++ b/app/notes/[slug]/page.module.css
@@ -41,7 +41,7 @@
.meta .metaTag::before {
content: "\0023"; /* cosmetically hashtagify tags */
padding-right: 0.125em;
- color: var(--colors-light);
+ color: var(--color-gray-400);
}
.meta .metaTag:last-of-type {
@@ -66,7 +66,7 @@
.comments {
margin-top: 2em;
padding-top: 2em;
- border-top: 2px solid var(--colors-light);
+ border-top: 2px solid var(--color-gray-400);
min-height: 140px;
}
diff --git a/app/page.tsx b/app/page.tsx
index 23ad42f0..cd9cfe6b 100644
--- a/app/page.tsx
+++ b/app/page.tsx
@@ -123,7 +123,7 @@ const Page = () => {
>
the Tooth Fairy
- . I’ve improved a bit since then, I think? 🤷
+ . I’ve improved a bit since then, I think? 🤷
diff --git a/app/previously/page.mdx b/app/previously/page.mdx
index 6ae65948..aadfee5c 100644
--- a/app/previously/page.mdx
+++ b/app/previously/page.mdx
@@ -85,7 +85,7 @@ _Previously on the [Cringey Chronicles™](https://web.archive.org/web/20010
_[November 2001](https://jakejarvis.github.io/my-first-website/) ([view
source](https://github.com/jakejarvis/my-first-website))_
diff --git a/app/projects/page.tsx b/app/projects/page.tsx
index a6a43edc..c64345d3 100644
--- a/app/projects/page.tsx
+++ b/app/projects/page.tsx
@@ -31,7 +31,7 @@ const Page = async () => {
<>
Projects
-
+
{
"mx-auto mt-4 mb-8",
"[--activity-0:#ebedf0] [--activity-1:#9be9a8] [--activity-2:#40c463] [--activity-3:#30a14e] [--activity-4:#216e39]",
"dark:[--activity-0:#252525] dark:[--activity-1:#033a16] dark:[--activity-2:#196c2e] dark:[--activity-3:#2ea043] dark:[--activity-4:#56d364]",
- String.raw`[&_.react-activity-calendar\_\_count]:text-medium [&_.react-activity-calendar\_\_legend-month]:text-medium [&_.react-activity-calendar\_\_legend-colors]:text-medium-light`
+ String.raw`[&_.react-activity-calendar\_\_count]:text-gray-600 [&_.react-activity-calendar\_\_legend-colors]:text-gray-500 [&_.react-activity-calendar\_\_legend-month]:text-gray-600`
)}
>
-
+
{
-
+
{repos?.map((repo) => (
-
+
{repo!.name}
- {repo!.description &&
{repo!.description}
}
+ {repo!.description &&
{repo!.description}
}
-
+
{repo!.primaryLanguage && (
-
+
{repo!.primaryLanguage.color && (
{
)}
{repo!.stargazerCount > 0 && (
-
+
{
)}
{repo!.forkCount > 0 && (
-
+
{
)}
-
+
{
viewBox="0 0 24 24"
width="1.2em"
height="1.2em"
- className="fill-text mr-[0.1em] ml-[0.25em] inline h-[1.2em] w-[1.2em] align-text-top"
+ className="mr-[0.1em] ml-[0.25em] inline h-[1.2em] w-[1.2em] fill-gray-700 align-text-top"
>
{" "}
diff --git a/app/themes.css b/app/themes.css
deleted file mode 100644
index 57805c48..00000000
--- a/app/themes.css
+++ /dev/null
@@ -1,37 +0,0 @@
-:root {
- --colors-background-inner: #ffffff;
- --colors-background-outer: #fcfcfc;
- --colors-background-header: rgb(252 252 252 / 70%);
- --colors-text: #202020;
- --colors-medium-dark: #515151;
- --colors-medium: #5e5e5e;
- --colors-medium-light: #757575;
- --colors-light: #d2d2d2;
- --colors-kinda-light: #e3e3e3;
- --colors-super-light: #f4f4f4;
- --colors-super-duper-light: #fbfbfb;
- --colors-link: #0e6dc2;
- --colors-link-underline: #a6c5e7;
- --colors-success: #44a248;
- --colors-error: #ff1b1b;
- --colors-warning: #f78200;
-}
-
-[data-theme="dark"] {
- --colors-background-inner: #1e1e1e;
- --colors-background-outer: #252525;
- --colors-background-header: rgb(37 37 37 / 70%);
- --colors-text: #f1f1f1;
- --colors-medium-dark: #d7d7d7;
- --colors-medium: #b1b1b1;
- --colors-medium-light: #959595;
- --colors-light: #646464;
- --colors-kinda-light: #535353;
- --colors-super-light: #272727;
- --colors-super-duper-light: #1f1f1f;
- --colors-link: #88c7ff;
- --colors-link-underline: #496278;
- --colors-success: #78df55;
- --colors-error: #ff5151;
- --colors-warning: #f2b702;
-}
diff --git a/app/zip/page.tsx b/app/zip/page.tsx
index 1e1b14e2..6fb45598 100644
--- a/app/zip/page.tsx
+++ b/app/zip/page.tsx
@@ -32,14 +32,14 @@ const Page = () => {
>
diff --git a/components/Blockquote/Blockquote.tsx b/components/Blockquote/Blockquote.tsx
index 3d00cb0a..07376347 100644
--- a/components/Blockquote/Blockquote.tsx
+++ b/components/Blockquote/Blockquote.tsx
@@ -4,7 +4,7 @@ import type { ComponentPropsWithoutRef } from "react";
export type BlockquoteProps = ComponentPropsWithoutRef<"blockquote">;
const Blockquote = ({ className, ...rest }: BlockquoteProps) => (
-
+
);
export default Blockquote;
diff --git a/components/Code/Code.module.css b/components/Code/Code.module.css
index 5612590c..6b3a3369 100644
--- a/components/Code/Code.module.css
+++ b/components/Code/Code.module.css
@@ -7,8 +7,8 @@
font-size: 0.925em;
tab-size: 2px;
page-break-inside: avoid;
- background-color: var(--colors-background-header);
- border: 1px solid var(--colors-kinda-light);
+ background-color: var(--color-background-header);
+ border: 1px solid var(--color-gray-300);
border-radius: 0.6em;
}
@@ -55,7 +55,7 @@ figure .code[data-line-numbers] > [data-line]::before {
width: 1em;
margin-right: 1.5em;
text-align: right;
- color: var(--colors-medium-light);
+ color: var(--color-gray-500);
user-select: none;
counter-increment: line;
content: counter(line);
@@ -76,11 +76,11 @@ figure .code[data-line-numbers-max-digits="3"] > [data-line]::before {
height: 3em;
width: 3em;
padding: 0; /* iOS safari fix */
- color: var(--colors-medium-dark);
- border: 1px solid var(--colors-kinda-light);
+ color: var(--color-gray-700);
+ border: 1px solid var(--color-gray-300);
border-top-right-radius: 0.6em;
border-bottom-left-radius: 0.6em;
- background-color: var(--colors-background-header);
+ background-color: var(--color-background-header);
backdrop-filter: saturate(180%) blur(5px);
}
@@ -92,5 +92,5 @@ figure .code[data-line-numbers-max-digits="3"] > [data-line]::before {
.copyButton:hover,
.copyButton:focus-visible {
- color: var(--colors-link);
+ color: var(--color-link);
}
diff --git a/components/CopyButton/CopyButton.tsx b/components/CopyButton/CopyButton.tsx
index cf7fe211..b6260595 100644
--- a/components/CopyButton/CopyButton.tsx
+++ b/components/CopyButton/CopyButton.tsx
@@ -52,7 +52,7 @@ const CopyButton = ({ source, timeout = 2000, style, ...rest }: CopyButtonProps,
{...rest}
>
{copied ? (
-
+
) : (
)}
diff --git a/components/Footer/Footer.tsx b/components/Footer/Footer.tsx
index b4fcf19b..738ae487 100644
--- a/components/Footer/Footer.tsx
+++ b/components/Footer/Footer.tsx
@@ -10,17 +10,17 @@ export type FooterProps = ComponentPropsWithoutRef<"footer">;
const Footer = ({ className, ...rest }: FooterProps) => {
return (