style/code blocks/copy button: prevent overlapping with the code block's text

This commit is contained in:
Adorian Doran 2025-05-27 18:32:18 +03:00
parent 75ec3934af
commit b07ec68705

View File

@ -530,13 +530,19 @@ pre:not(.hljs) {
}
pre {
--copy-button-margin-size: .35em;
position: relative;
}
pre > button.copy-button {
position: absolute;
top: .35em;
right: .35em;
top: var(--copy-button-margin-size);
right: var(--copy-button-margin-size);
}
:root pre:has(> button.copy-button) > code {
margin-right: calc(var(--icon-button-size) + (var(--copy-button-margin-size) * 2));
}
pre > button.copy-button:hover {