diff --git a/.changeset/some-spiders-serve.md b/.changeset/some-spiders-serve.md new file mode 100644 index 0000000000..0fb7f92ee5 --- /dev/null +++ b/.changeset/some-spiders-serve.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-techdocs': patch +--- + +Code block "Copy to clipboard" button was not positioned correctly for docs built with `mkdocs-material>=9.7` diff --git a/plugins/techdocs/src/reader/transformers/copyToClipboard.tsx b/plugins/techdocs/src/reader/transformers/copyToClipboard.tsx index d34a05fa06..004995937e 100644 --- a/plugins/techdocs/src/reader/transformers/copyToClipboard.tsx +++ b/plugins/techdocs/src/reader/transformers/copyToClipboard.tsx @@ -67,7 +67,12 @@ const CopyToClipboardButton = ({ text }: CopyToClipboardButtonProps) => { leaveDelay={1000} > { /** * Recreates copy-to-clipboard functionality attached to snippets that * is native to mkdocs-material theme. + * + * Unlike native mkdocs-material theme, this is always enabled and does not respect the mkdocs's config `theme.features` `content.code.copy` setting. */ export const copyToClipboard = (theme: Theme): Transformer => { return dom => {