From 8dab9666957fe1ef3062ed2b4b79edc27fe34ffe Mon Sep 17 00:00:00 2001 From: Dimitri POSTOLOV Date: Thu, 1 Sep 2022 22:13:22 +0300 Subject: [PATCH] fix invisible copy button in code blocks (#770) --- .changeset/fifty-rocks-shake.md | 6 ++++++ packages/nextra/styles/code-block.css | 6 +----- 2 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 .changeset/fifty-rocks-shake.md diff --git a/.changeset/fifty-rocks-shake.md b/.changeset/fifty-rocks-shake.md new file mode 100644 index 0000000000..70596d35f5 --- /dev/null +++ b/.changeset/fifty-rocks-shake.md @@ -0,0 +1,6 @@ +--- +'nextra': patch +'nextra-theme-blog': patch +--- + +fix invisible copy button in code blocks diff --git a/packages/nextra/styles/code-block.css b/packages/nextra/styles/code-block.css index 142014db50..e86550ef64 100644 --- a/packages/nextra/styles/code-block.css +++ b/packages/nextra/styles/code-block.css @@ -47,7 +47,7 @@ pre { [data-rehype-pretty-code-fragment] { @apply relative; - &:hover > .nextra-copy-button { + &:hover .nextra-copy-button { @apply opacity-100; } } @@ -59,7 +59,3 @@ pre { @apply backdrop-blur-md bg-opacity-[.85] dark:bg-opacity-80; } } - -.nextra-copy-button { - @apply border border-black/5 dark:border-white/10; -}