Fix code copy button positioning
This commit is contained in:
parent
2b710f05b3
commit
862488569d
2 changed files with 21 additions and 0 deletions
18
docs/content/assets/css/code-copy.css
Normal file
18
docs/content/assets/css/code-copy.css
Normal 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue