From 4f5dcbe04d16e17e942c695a682844099b968442 Mon Sep 17 00:00:00 2001 From: Jake Jarvis Date: Tue, 1 Apr 2025 10:44:12 -0400 Subject: [PATCH] prevent copy button from covering up code in code blocks --- components/Code/Code.module.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/Code/Code.module.css b/components/Code/Code.module.css index 0a938b6c..07c7951e 100644 --- a/components/Code/Code.module.css +++ b/components/Code/Code.module.css @@ -29,6 +29,12 @@ figure:has(.highlighted) { text-decoration: var(--shiki-dark-text-decoration); } +.highlighted > [data-line]:nth-of-type(1), +.highlighted > [data-line]:nth-of-type(2) { + /* excessive right padding to prevent copy button from covering the first two lines of code */ + padding-right: 4em; +} + .highlighted[data-line-numbers] { counter-reset: line; }