From 1ef0cdec905f57a2d591626719855c2e78beac45 Mon Sep 17 00:00:00 2001 From: vaporvee Date: Fri, 9 Feb 2024 12:09:26 +0100 Subject: [PATCH] styled copy button --- astro.config.mjs | 9 ++++++++- src/styles/main.scss | 17 +++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/astro.config.mjs b/astro.config.mjs index 42c5f4e..70ebf3b 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -19,7 +19,14 @@ export default defineConfig({ integrations: [ minify(), metaTags(), - expressiveCode({ themes: [codeTheme] }), + expressiveCode({ + themes: [codeTheme], + styleOverrides: { + frames: { + tooltipSuccessBackground: "#7ECA9C", + }, + }, + }), mdx(), lighthouse(), icon(), diff --git a/src/styles/main.scss b/src/styles/main.scss index d42b698..6743bdc 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -91,6 +91,23 @@ figure { figure { box-shadow: none !important; } + .copy { + button { + width: 30px !important; + height: 30px !important; + margin: 5px !important; + border-radius: 25px !important; + display: none; + } + } + &:hover { + .copy { + button { + display: inline; + } + } + } + position: relative; overflow: scroll; display: grid; margin: 0;