forked from MizuhaHimuraki/github-name-mapper
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontent.css
More file actions
182 lines (158 loc) · 4.8 KB
/
Copy pathcontent.css
File metadata and controls
182 lines (158 loc) · 4.8 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
/* GitHub Name Mapper - Content Styles */
/* 替换后的用户名基础样式 */
.gnm-replaced {
position: relative;
}
/* 微妙的视觉高亮效果(可通过开关控制) */
.gnm-replaced.gnm-highlight {
background: linear-gradient(135deg, rgba(88, 166, 255, 0.08) 0%, rgba(163, 113, 247, 0.08) 100%);
border-radius: 3px;
padding: 0 2px;
margin: 0 -2px;
box-decoration-break: clone;
-webkit-box-decoration-break: clone;
}
/* 悬停时更明显的效果 */
.gnm-replaced.gnm-highlight:hover {
background: linear-gradient(135deg, rgba(88, 166, 255, 0.15) 0%, rgba(163, 113, 247, 0.15) 100%);
}
/* 悬停时显示详细信息 */
.gnm-replaced::after {
content: attr(title);
display: none;
position: absolute;
bottom: calc(100% + 8px);
left: 50%;
transform: translateX(-50%);
padding: 8px 12px;
background: #1c2128;
border: 1px solid #30363d;
border-radius: 6px;
font-size: 12px;
white-space: pre-line;
color: #e6edf3;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
z-index: 9999;
pointer-events: none;
}
.gnm-replaced::before {
content: '';
display: none;
position: absolute;
bottom: calc(100% + 2px);
left: 50%;
transform: translateX(-50%);
border: 6px solid transparent;
border-top-color: #30363d;
z-index: 10000;
}
/* 基础光标样式 */
.gnm-replaced {
cursor: help;
}
/* ==================== 头像高亮样式 ==================== */
/* 头像高亮 - 使用多重样式确保可见性 */
img.gnm-avatar-highlight,
.gnm-avatar-highlight {
display: inline-block !important;
visibility: visible !important;
opacity: 1 !important;
border: 2px solid #58a6ff !important;
border-radius: 50% !important;
box-sizing: border-box !important;
box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2) !important;
transition: all 0.2s ease !important;
outline: none !important;
}
img.gnm-avatar-highlight:hover,
.gnm-avatar-highlight:hover {
border-color: #a371f7 !important;
box-shadow: 0 0 0 2px rgba(163, 113, 247, 0.3) !important;
}
/* 针对 PR conversation 页面的特殊样式加强 */
.timeline-comment-avatar img.gnm-avatar-highlight,
.timeline-comment img.gnm-avatar-highlight,
.TimelineItem-avatar img.gnm-avatar-highlight {
display: inline-block !important;
visibility: visible !important;
opacity: 1 !important;
border: 3px solid #58a6ff !important;
box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.3), 0 2px 8px rgba(88, 166, 255, 0.2) !important;
}
/* ==================== Mention 自动补全样式 ==================== */
.gnm-mention-popup {
background: #161b22 !important;
border: 1px solid #30363d !important;
border-radius: 8px !important;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
max-height: 300px !important;
min-width: 280px !important;
max-width: 400px !important;
overflow-y: auto !important;
overflow-x: hidden !important;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif !important;
font-size: 13px !important;
position: fixed !important;
z-index: 2147483647 !important; /* 最大 z-index */
pointer-events: auto !important;
visibility: visible !important;
opacity: 1 !important;
}
.gnm-mention-popup::-webkit-scrollbar {
width: 6px !important;
}
.gnm-mention-popup::-webkit-scrollbar-track {
background: transparent !important;
}
.gnm-mention-popup::-webkit-scrollbar-thumb {
background: #30363d !important;
border-radius: 3px !important;
}
.gnm-mention-popup .gnm-mention-item {
display: flex !important;
align-items: center !important;
gap: 8px !important;
padding: 10px 12px !important;
cursor: pointer !important;
transition: background-color 0.1s !important;
border-bottom: 1px solid #21262d !important;
background: transparent !important;
margin: 0 !important;
list-style: none !important;
}
.gnm-mention-popup .gnm-mention-item:last-child {
border-bottom: none !important;
}
.gnm-mention-popup .gnm-mention-item:hover,
.gnm-mention-popup .gnm-mention-item.selected {
background: #21262d !important;
}
.gnm-mention-popup .gnm-mention-item.selected {
background: #1f6feb44 !important;
}
.gnm-mention-popup .gnm-mention-github {
color: #58a6ff !important;
font-weight: 500 !important;
}
.gnm-mention-popup .gnm-mention-nick {
color: #a371f7 !important;
font-size: 12px !important;
}
.gnm-mention-popup .gnm-mention-domain {
color: #8b949e !important;
font-size: 11px !important;
margin-left: auto !important;
padding: 2px 6px !important;
background: #21262d !important;
border-radius: 4px !important;
}
/* 弹出框头部提示 */
.gnm-mention-popup::before {
content: '💡 @@ 触发 | ⌘/Ctrl+Shift+M 快捷键' !important;
display: block !important;
padding: 8px 12px !important;
font-size: 11px !important;
color: #8b949e !important;
border-bottom: 1px solid #30363d !important;
background: #0d1117 !important;
}