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;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue