File tree 2 files changed +7
-2
lines changed
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 10
10
button . appendChild ( document . createTextNode ( "Click to copy" ) ) ;
11
11
button . classList . add ( "docsify-copy-code-button" ) ;
12
12
13
+ if ( vm . config . themeColor ) {
14
+ button . style . background = vm . config . themeColor ;
15
+ }
16
+
13
17
button . addEventListener ( "click" , function ( event ) {
14
18
var range = document . createRange ( ) ;
15
19
var codeBlock = element . querySelector ( "code" ) ;
Original file line number Diff line number Diff line change 1
1
.docsify-copy-code-button {
2
- background : rgba ( 243 , 112 , 70 , 1 ) ;
2
+ background : # ccc ;
3
3
color : # fff ;
4
4
position : absolute;
5
5
top : 0 ;
20
20
right : 100% ;
21
21
top : 0 ;
22
22
background : # ccc ;
23
- color : # 222 ;
23
+ color : # fff ;
24
24
padding : 5px ;
25
25
margin : 5px 10px 0 ;
26
26
font-size : 11px ;
27
27
z-index : 0 ;
28
28
transition : all 0.25s ease;
29
29
transform : translateX (120% ) scale (0 );
30
+ border-radius : 3px ;
30
31
}
31
32
32
33
.docsify-copy-code-button .success ::after {
You can’t perform that action at this time.
0 commit comments