File tree 2 files changed +8
-5
lines changed
2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -52,15 +52,18 @@ div.highlight {
52
52
display : none;
53
53
position : absolute;
54
54
top : 4px ;
55
- right : 16px ;
56
- color : var (--secondary );
55
+ right : 4px ;
56
+ color : rgba (255 , 255 , 255 , 0.8 );
57
+ background : rgba (78 , 78 , 78 , 0.8 );
58
+ border-radius : var (--radius );
59
+ padding : 0 5px ;
60
+ font-size : 14px ;
57
61
}
58
62
59
63
div .highlight : hover .copy-code {
60
64
display : block;
61
65
}
62
66
63
67
.copy-code : hover {
64
- cursor : pointer;
65
68
text-decoration : underline;
66
69
}
Original file line number Diff line number Diff line change 102
102
document . querySelectorAll ( 'pre > code' ) . forEach ( ( codeblock ) => {
103
103
const container = codeblock . parentNode . parentNode ;
104
104
105
- const copybutton = document . createElement ( 'div ' ) ;
105
+ const copybutton = document . createElement ( 'button ' ) ;
106
106
copybutton . classList . add ( 'copy-code' ) ;
107
- copybutton . innerHTML = 'copy' ;
107
+ copybutton . innerText = 'copy' ;
108
108
109
109
function copyingDone ( ) {
110
110
copybutton . innerText = 'copied!' ;
You can’t perform that action at this time.
0 commit comments