unimprove code links

This commit is contained in:
Cory LaViska
2025-07-02 15:51:46 -04:00
parent 2f6554d6b9
commit be4d5c4c7e
2 changed files with 1 additions and 18 deletions

View File

@@ -32,8 +32,7 @@ export function copyCodePlugin(eleventyConfig, options = {}) {
}
// Add a copy button
pre.innerHTML += `<wa-button href="#${preId}" class="block-link-icon" appearance="plain" size="small"><wa-icon name="link" label="Copy link"></wa-icon></wa-button>
<wa-copy-button from="${codeId}" class="copy-button wa-dark"></wa-copy-button>`;
pre.innerHTML += `<wa-copy-button from="${codeId}" class="copy-button wa-dark"></wa-copy-button>`;
});
return doc.toString();

View File

@@ -50,19 +50,3 @@ wa-copy-button.copy-button {
opacity: 1;
}
}
.block-link-icon {
position: absolute;
inset-block-start: 0;
inset-inline-end: calc(100% + var(--wa-space-s));
transition: var(--wa-transition-slow);
&:not(:hover, :focus) {
opacity: 50%;
}
:not(:hover, :focus-within) > & {
opacity: 0;
}
}