Skip to content

Commit b287b8f

Browse files
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>
1 parent 025b20f commit b287b8f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/components/src/components/code-snippet/_code-snippet.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,6 @@
333333
position: absolute;
334334
top: 0;
335335
right: 0;
336-
z-index: 10;
337336

338337
// Override inherited rule in code snippet
339338
@include carbon--font-family('sans');
@@ -465,6 +464,7 @@
465464
.#{$prefix}--snippet--multi .#{$prefix}--copy-btn {
466465
top: $carbon--spacing-03;
467466
right: $carbon--spacing-03;
467+
z-index: 10;
468468
width: $carbon--spacing-07;
469469
height: $carbon--spacing-07;
470470
}

packages/components/src/components/copy-button/_copy-button.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@
107107
.#{$prefix}--copy-btn__feedback {
108108
@include tooltip--content('icon');
109109

110+
z-index: 3;
110111
display: none;
111112
box-sizing: content-box;
112113
margin: auto;

0 commit comments

Comments
 (0)