Skip to content

Commit 51054a0

Browse files
author
Jesse Haigh
committed
modify position/padding on copy button to fix on single line code blocks
1 parent 17f7572 commit 51054a0

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/components/ContentNode/CodeListing.vue

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -254,21 +254,20 @@ pre {
254254
255255
.copy-button {
256256
position: absolute;
257-
top: 0.5em;
258-
right: 0.5em;
259-
transform: translateX(0);
257+
top: 0.2em;
258+
right: 0.2em;
259+
width: 24px;
260+
height: 24px;
260261
background: var(--color-fill-gray-tertiary);
261262
border: none;
262-
border-radius: 6px;
263-
padding: 7px 6px;
263+
border-radius: 4px;
264+
padding: 4px;
264265
cursor: pointer;
265266
opacity: 1;
266267
transition: all 0.2s ease-in-out;
267268
}
268269
269270
.copy-button svg {
270-
width: 24px;
271-
height: 24px;
272271
opacity: 0.8;
273272
}
274273

0 commit comments

Comments
 (0)