Skip to content

Commit 6c06496

Browse files
style: fix copy btn position for snippets without filename
1 parent 81b3fc3 commit 6c06496

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/app/shared/components/copy-button/copy-button.component.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,19 @@
22
display: block;
33
position: relative;
44

5+
&.with-heading .clipboard {
6+
top: 65px;
7+
}
8+
59
.clipboard {
610
color: #dfdfdf;
711
cursor: pointer;
812
background: transparent;
913
border: none;
1014
padding: 10px;
1115
position: absolute;
16+
top: 20px;
1217
right: 10px;
13-
top: 65px;
1418
z-index: 10;
1519
opacity: 0.7;
1620

tools/transforms/content-package/services/renderer/code.renderer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export function applyCodeRenderer(renderer: Renderer) {
4040
filenameIndex,
4141
);
4242

43-
return `<app-copy-button>${output}</app-copy-button>`;
43+
return `<app-copy-button class="with-heading">${output}</app-copy-button>`;
4444
}
4545

4646
const switchKey = '@@switch';

0 commit comments

Comments
 (0)