1
0
Fork 0

Fix code copy button positioning

This commit is contained in:
Anurag Ekkati 2026-01-09 07:56:04 -08:00 committed by GitHub
parent 2b710f05b3
commit 862488569d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,18 @@
/* Fix positioning of the built-in clipboard button for code blocks.
* In this theme, the button can end up positioned relative to <body>,
* so anchor it to the code block container instead.
*/
.md-typeset pre.highlight {
position: relative;
}
.md-typeset pre.highlight > button.md-clipboard {
position: absolute;
top: .25rem;
right: .25rem;
z-index: 10;
opacity: 1;
visibility: visible;
}

View file

@ -20,6 +20,8 @@ theme:
logo: assets/img/traefikproxy-vertical-logo-color.svg logo: assets/img/traefikproxy-vertical-logo-color.svg
feature: feature:
tabs: false tabs: false
features:
- content.code.copy
palette: palette:
primary: 'cyan' primary: 'cyan'
accent: 'cyan' accent: 'cyan'
@ -35,6 +37,7 @@ extra_javascript:
extra_css: extra_css:
- assets/css/menu-icons.css - assets/css/menu-icons.css
- assets/css/code-copy.css
plugins: plugins:
- search - search