From b287b8ff8db83e3fd4f89cff81d36e191c6e7065 Mon Sep 17 00:00:00 2001 From: TJ Egan Date: Tue, 26 Jan 2021 12:34:48 -0800 Subject: [PATCH] fix(CopyButton): ensure copy text is placed over icons (#7611) * fix(CopyButton): ensure copy text is placed over icons * fix(CodeSnippet): fix tooltip positioning with multiple codesnippets * fix(CodeSnippet): only set z-index on multi snippet Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- .../components/src/components/code-snippet/_code-snippet.scss | 2 +- .../components/src/components/copy-button/_copy-button.scss | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/components/src/components/code-snippet/_code-snippet.scss b/packages/components/src/components/code-snippet/_code-snippet.scss index fc98b7186cfc..eaa62f3b72a8 100644 --- a/packages/components/src/components/code-snippet/_code-snippet.scss +++ b/packages/components/src/components/code-snippet/_code-snippet.scss @@ -333,7 +333,6 @@ position: absolute; top: 0; right: 0; - z-index: 10; // Override inherited rule in code snippet @include carbon--font-family('sans'); @@ -465,6 +464,7 @@ .#{$prefix}--snippet--multi .#{$prefix}--copy-btn { top: $carbon--spacing-03; right: $carbon--spacing-03; + z-index: 10; width: $carbon--spacing-07; height: $carbon--spacing-07; } diff --git a/packages/components/src/components/copy-button/_copy-button.scss b/packages/components/src/components/copy-button/_copy-button.scss index 8c113acf3577..b300f56d47ec 100644 --- a/packages/components/src/components/copy-button/_copy-button.scss +++ b/packages/components/src/components/copy-button/_copy-button.scss @@ -107,6 +107,7 @@ .#{$prefix}--copy-btn__feedback { @include tooltip--content('icon'); + z-index: 3; display: none; box-sizing: content-box; margin: auto;