FIX: Copy & Fullscreen button edits in codeblocks (#20483)

This commit is contained in:
Jordan Vidrine 2023-02-28 10:54:24 -06:00 committed by GitHub
parent 5138caf525
commit 366f5e08d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 8 deletions

View File

@ -113,6 +113,9 @@ export default class CodeblockButtons {
copyButton.ariaLabel = I18n.t("copy_codeblock.copy"); copyButton.ariaLabel = I18n.t("copy_codeblock.copy");
copyButton.innerHTML = iconHTML("copy"); copyButton.innerHTML = iconHTML("copy");
wrapperEl.appendChild(copyButton); wrapperEl.appendChild(copyButton);
wrapperEl.style.right = `${
codeBlock.offsetWidth - codeBlock.clientWidth
}px`;
} }
if ( if (

View File

@ -1022,15 +1022,7 @@ pre {
.codeblock-button-wrapper { .codeblock-button-wrapper {
position: absolute; position: absolute;
right: 0;
display: flex; display: flex;
.copy-cmd {
right: 0;
}
.copy-fullscreen {
right: 28px;
}
} }
.copy-cmd, .copy-cmd,
@ -1042,8 +1034,10 @@ pre {
min-height: 0; min-height: 0;
font-size: var(--font-down-2); font-size: var(--font-down-2);
opacity: 0.7; opacity: 0.7;
cursor: pointer;
&.action-complete { &.action-complete {
cursor: auto;
.d-icon { .d-icon {
color: var(--tertiary); color: var(--tertiary);
} }