From 5f48bb98627a67ed6e9ab669eb7eb97e2f44d5ea Mon Sep 17 00:00:00 2001 From: Nicolas Merget <104347736+nmerget@users.noreply.github.com> Date: Mon, 15 Apr 2024 17:12:05 +0200 Subject: [PATCH] fix: issue with copy-button in patternhub (#2520) --- showcases/patternhub/styles/globals.scss | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/showcases/patternhub/styles/globals.scss b/showcases/patternhub/styles/globals.scss index e39438f3459..ba4f0a9c3d6 100644 --- a/showcases/patternhub/styles/globals.scss +++ b/showcases/patternhub/styles/globals.scss @@ -405,20 +405,31 @@ h6 { .code { overflow: auto; position: absolute; + z-index: 20; inset: 0; - z-index: 1; margin: variables.$db-spacing-fixed-md; display: flex; flex-direction: column; gap: variables.$db-spacing-fixed-sm; + code { + display: block; + white-space: pre-wrap; + } + .tab-container { position: relative; .copy-button { position: absolute; + z-index: 20; inset-inline-end: variables.$db-spacing-fixed-sm; - inset-block-start: variables.$db-spacing-fixed-sm; + inset-block-end: variables.$db-spacing-fixed-sm; + + @include screen-sizes.screen("md") { + inset-block-end: auto; + inset-block-start: variables.$db-spacing-fixed-sm; + } } } }