-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
104 lines (91 loc) · 2.7 KB
/
Copy pathstyle.css
File metadata and controls
104 lines (91 loc) · 2.7 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
:root {
--math-copy-btn-bg: #343541;
--math-copy-btn-text: #ffffff;
--math-copy-btn-hover-bg: #40414f;
--math-copy-border: #dadce0;
--math-copy-shadow: rgba(0, 0, 0, 0.2);
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme='light']) {
--math-copy-btn-bg: #40414f;
--math-copy-btn-text: #ffffff;
--math-copy-btn-hover-bg: #4d4d5e;
--math-copy-border: #5f6368;
--math-copy-shadow: rgba(0, 0, 0, 0.5);
}
}
[data-theme='dark'] :root,
body.dark-theme,
.dark-mode,
.dark {
--math-copy-btn-bg: #40414f;
--math-copy-btn-text: #ffffff;
--math-copy-btn-hover-bg: #4d4d5e;
--math-copy-border: #5f6368;
--math-copy-shadow: rgba(0, 0, 0, 0.5);
}
.formula-copy-btn {
position: absolute;
top: -4px !important;
right: 0 !important;
transform: translateY(-100%);
background-color: var(--math-copy-btn-bg) !important;
color: var(--math-copy-btn-text) !important;
border: 1px solid var(--math-copy-border) !important;
border-radius: 4px;
padding: 6px 12px;
font-size: 11px;
font-weight: 500;
font-family: system-ui, -apple-system, sans-serif;
cursor: pointer;
display: none;
z-index: 10000;
transition: all 0.2s ease;
white-space: nowrap;
width: max-content;
pointer-events: auto;
box-shadow: 0 1px 3px var(--math-copy-shadow);
}
.has-copy-btn {
position: relative !important;
overflow: visible !important;
}
.has-copy-btn:hover {
outline: 1px solid var(--math-copy-border) !important;
border-radius: 4px;
cursor: pointer !important;
background-color: rgba(0, 0, 0, 0.02) !important;
}
[data-theme='dark'] .has-copy-btn:hover,
body.dark-theme .has-copy-btn:hover,
.dark .has-copy-btn:hover {
background-color: rgba(255, 255, 255, 0.05) !important;
}
.has-copy-btn:hover>.formula-copy-btn {
display: flex !important;
align-items: center;
justify-content: center;
}
.formula-copy-btn:hover {
background-color: var(--math-copy-btn-hover-bg) !important;
transform: translateY(calc(-100% - 2px));
box-shadow: 0 4px 6px var(--math-copy-shadow);
}
.math-block.has-copy-btn,
.katex-display.has-copy-btn {
display: block !important;
width: 100% !important;
box-sizing: border-box !important;
padding: 12px 0 !important;
margin-top: 36px !important;
min-height: 48px;
overflow: visible !important;
}
.formula-copy-btn.copied {
background-color: #0b9d58 !important;
border-color: #0b9d58 !important;
}
.formula-copy-btn.error {
background-color: #d93025 !important;
border-color: #d93025 !important;
}