Skip to content

Commit 7c47eb7

Browse files
fix(session-ui): stop shell text showing through the copy button (#59901)
Co-authored-by: Brendonovich <14191578+Brendonovich@users.noreply.github.com>
1 parent c5d9c30 commit 7c47eb7

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

‎packages/session-ui/src/components/message-part.css‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,9 +778,27 @@
778778
margin: 4px;
779779
}
780780

781+
/* The ghost button is transparent, so paint the section's background behind it. It fades out to the left, top
782+
and bottom so text at its edges softens instead of being cut, and runs to the card edge on the right. It is
783+
solid only across the button's height and never takes pointer events, so there is no gutter and the lines
784+
below keep the full width. The top stops at the section edge, so it never covers the border above the output. */
785+
[data-slot="bash-copy"]::before {
786+
content: "";
787+
position: absolute;
788+
z-index: -1;
789+
inset: -4px -4px -8px -24px;
790+
background: var(--bash-section-background);
791+
mask-image:
792+
linear-gradient(to right, transparent, #000 24px),
793+
linear-gradient(transparent, #000 8px, #000 calc(100% - 8px), transparent);
794+
mask-composite: intersect;
795+
pointer-events: none;
796+
}
797+
781798
[data-slot="bash-result"] {
799+
--bash-section-background: var(--v2-background-bg-layer-01);
782800
border-block-start: 0.5px solid var(--v2-border-border-base);
783-
background: var(--v2-background-bg-layer-01);
801+
background: var(--bash-section-background);
784802
color: var(--v2-text-text-muted);
785803
}
786804

@@ -790,6 +808,7 @@
790808
}
791809

792810
[data-slot="bash-command"] {
811+
--bash-section-background: var(--v2-background-bg-base);
793812
color: var(--v2-text-text-base);
794813
}
795814
}

0 commit comments

Comments
 (0)