UX: Make codeblock buttons 'flat' (#29603)

This commit is contained in:
Jordan Vidrine 2024-11-05 14:45:08 -06:00 committed by GitHub
parent 758de8167b
commit cf350ba54c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -110,7 +110,7 @@ export default class CodeblockButtons {
if (this.showCopy) {
const copyButton = document.createElement("button");
copyButton.classList.add("btn", "nohighlight", "copy-cmd");
copyButton.classList.add("btn", "nohighlight", "copy-cmd", "btn-flat");
copyButton.ariaLabel = I18n.t("copy_codeblock.copy");
copyButton.innerHTML = iconHTML("copy");
wrapperEl.appendChild(copyButton);
@ -121,7 +121,12 @@ export default class CodeblockButtons {
if (this.showFullscreen && !Mobile.isMobileDevice) {
const fullscreenButton = document.createElement("button");
fullscreenButton.classList.add("btn", "nohighlight", "fullscreen-cmd");
fullscreenButton.classList.add(
"btn",
"nohighlight",
"fullscreen-cmd",
"btn-flat"
);
fullscreenButton.ariaLabel = I18n.t("copy_codeblock.fullscreen");
fullscreenButton.innerHTML = iconHTML("discourse-expand");
wrapperEl.appendChild(fullscreenButton);