Skip to content

Commit 5acef97

Browse files
committed
Increase right padding if scrollbar is present
1 parent 4b3ad26 commit 5acef97

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

layouts/partials/scripts.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@
77
document.querySelectorAll('div.highlight').forEach(block => {
88
// Create a wrapper for the button and message
99
const wrapper = document.createElement('div');
10-
wrapper.style = 'position:absolute;top:10px;right:10px;z-index:1;display:flex;align-items:center;gap:6px;';
1110

11+
if (block.parentElement.classList.contains("expand-content")) {
12+
wrapper.style = 'position:absolute;top:10px;right:20px;z-index:1;display:flex;align-items:center;gap:6px;';
13+
} else {
14+
wrapper.style = 'position:absolute;top:10px;right:10px;z-index:1;display:flex;align-items:center;gap:6px;';
15+
}
1216
// Create the copy button
1317
const button = document.createElement('button');
1418
button.innerHTML = `

0 commit comments

Comments
 (0)