forked from sumn2u/learn-javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcopy-code.css
More file actions
59 lines (51 loc) · 1.11 KB
/
copy-code.css
File metadata and controls
59 lines (51 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.code-wrapper {
position: relative;
}
.copy-code-button {
position: absolute;
top: 6px;
right: 6px;
padding: 6px;
background-color: #f7f7f7;
border: 1px solid transparent;
border-radius: 4px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
color: #6a737d;
opacity: 0.8;
transition: all 0.2s ease;
z-index: 10;
}
.copy-code-button:hover {
opacity: 1;
background-color: #eeeeee;
border-color: #d1d5da;
color: #24292e;
}
.copy-code-button.success {
color: #28a745;
}
.copy-code-button svg {
display: block;
}
.code-wrapper pre {
margin-top: 0 !important;
padding-right: 42px !important;
}
html.dark-mode .copy-code-button {
background-color: rgba(255, 255, 255, 0.06);
border-color: rgba(255, 255, 255, 0.08);
color: #9daab6;
opacity: 0.9;
backdrop-filter: blur(2px);
}
html.dark-mode .copy-code-button:hover {
background-color: rgba(255, 255, 255, 0.1);
border-color: rgba(255, 255, 255, 0.14);
color: #d7e2ea;
}
html.dark-mode .copy-code-button.success {
color: #7ee787;
}