style/code blocks/copy button: tweak appearance

This commit is contained in:
Adorian Doran 2025-05-27 18:18:16 +03:00
parent 6021d33317
commit 75ec3934af
2 changed files with 3 additions and 4 deletions

View File

@ -35,7 +35,7 @@ export async function formatCodeBlocks($container: JQuery<HTMLElement>) {
export function applyCopyToClipboardButton($codeBlock: JQuery<HTMLElement>) {
const $copyButton = $("<button>")
.addClass("bx component btn tn-tool-button bx-copy copy-button")
.addClass("bx component icon-action tn-tool-button bx-copy copy-button")
.attr("title", t("code_block.copy_title"))
.on("click", () => copyText($codeBlock.text()));
$codeBlock.parent().append($copyButton);

View File

@ -535,9 +535,8 @@ pre {
pre > button.copy-button {
position: absolute;
top: 1em;
right: 1em;
opacity: 0.8;
top: .35em;
right: .35em;
}
pre > button.copy-button:hover {