From 783b9a3a5f8a5c628067b40d6f3fb52e5fab00e1 Mon Sep 17 00:00:00 2001 From: "Sean (ANGRYxScotsman)" Date: Tue, 25 Aug 2026 06:49:24 +0100 Subject: [PATCH 1/2] Add hover/focus state to the code-block Copy button It had no visual feedback on hover or keyboard focus before this. --- src/styles/global.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/styles/global.css b/src/styles/global.css index 863a785b..209bddef 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -406,6 +406,14 @@ pre { border-radius: var(--radius); padding: 0.2rem 0.45rem; cursor: pointer; + transition: + background-color 0.15s ease, + border-color 0.15s ease; +} +.code-copy:hover, +.code-copy:focus-visible { + border-color: var(--accent); + background: #1c3140; } .table-scroll { overflow-x: auto; From 1b72918e9c6fb0aeba7d3bb9003bd42b27769e56 Mon Sep 17 00:00:00 2001 From: "Sean (ANGRYxScotsman)" Date: Thu, 27 Aug 2026 06:59:06 +0100 Subject: [PATCH 2/2] Use a CSS token for the code-copy hover background CodeRabbit flagged the hard-coded #1c3140 hover background as inconsistent with the project's custom CSS token system. Add --code-copy-hover-bg to :root and reference it instead. --- src/styles/global.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/styles/global.css b/src/styles/global.css index 209bddef..b82cb644 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -23,6 +23,7 @@ --accent-strong: #8addf8; --accent-ink: #04141c; --border: #2d4658; + --code-copy-hover-bg: #1c3140; --shadow: 0 10px 30px rgb(0 0 0 / 24%); --radius: 2px; --max: 1180px; @@ -413,7 +414,7 @@ pre { .code-copy:hover, .code-copy:focus-visible { border-color: var(--accent); - background: #1c3140; + background: var(--code-copy-hover-bg); } .table-scroll { overflow-x: auto;