-
Notifications
You must be signed in to change notification settings - Fork 156
Expand file tree
/
Copy pathcopyIcon.css
More file actions
79 lines (67 loc) · 1.23 KB
/
copyIcon.css
File metadata and controls
79 lines (67 loc) · 1.23 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
.code-block-wrapper {
position: relative;
margin: 1em 0;
}
.code-block-wrapper pre {
margin: 0;
}
.copy-button {
position: absolute;
top: 8px;
right: 8px;
display: flex;
align-items: center;
gap: 4px;
padding: 6px 10px;
background-color: rgba(255, 255, 255, 0.9);
border: 1px solid #d0d7de;
border-radius: 6px;
font-size: 12px;
font-weight: 500;
color: #24292f;
cursor: pointer;
opacity: 0;
transition: opacity 0.2s ease, background-color 0.2s ease;
z-index: 10;
}
.copy-button:hover {
background-color: #f6f8fa;
border-color: #b1b7c1;
}
.copy-button:active {
background-color: #e9ecef;
}
.copy-button.copied {
color: #1a7f37;
border-color: #1a7f37;
}
.copy-button svg {
flex-shrink: 0;
}
.copy-button .copy-text {
user-select: none;
}
.code-block-wrapper:hover .copy-button {
opacity: 1;
}
@media (hover: none) {
.copy-button {
opacity: 1;
}
}
/* Dark mode support */
@media (prefers-color-scheme: dark) {
.copy-button {
background-color: rgba(45, 51, 59, 0.95);
color: #c9d1d9;
border-color: #444c56;
}
.copy-button:hover {
background-color: #30363d;
border-color: #6e7681;
}
.copy-button.copied {
color: #57ab5a;
border-color: #57ab5a;
}
}