fixed a copy button position on scrolled code blocks (#399)

This commit is contained in:
trean
2023-11-10 20:26:36 +01:00
committed by GitHub
parent 738dd1cca0
commit 989817f4a8
4 changed files with 10 additions and 4 deletions
@@ -1,3 +1,6 @@
.highlight {
position: relative;
}
.highlight + .highlight {
display: none;
}
@@ -10,11 +10,14 @@
.copy-code__btn {
padding: 4px;
background: none;
background: var(--brand-light);
i {
color: var(--brand-secondary);
}
}
.copy-code__btn:hover {
background: #dcdcdc;
background: white;
}
.copy-code__btn_light {
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
(function () {
let codeBlocks = document.querySelectorAll('pre > code');
let codeBlocks = document.querySelectorAll('.highlight > pre');
const codeClipboard = new ClipboardJS('.copy-code__btn');