Repository navigation
Expand file tree
/
Copy pathcommand.css
More file actions
88 lines (88 loc) · 4.14 KB
/
Copy pathcommand.css
File metadata and controls
88 lines (88 loc) · 4.14 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
/* 命令栏的样子:颜色和侧边栏一样,都由当前空间的主题色 --accent 调出来(这几行和 sidepanel.css 开头一致) */
:root {
color-scheme: light dark;
--accent: #6b7cff;
--bg1: color-mix(in oklch, var(--accent) 26%, #fff);
--bg2: color-mix(in oklch, var(--accent) 13%, #f7f7f9);
--fg: color-mix(in oklch, var(--accent) 22%, #14151a);
--fg-2: color-mix(in srgb, var(--fg) 62%, transparent);
--fg-3: color-mix(in srgb, var(--fg) 38%, transparent);
--fill: color-mix(in srgb, var(--fg) 6%, transparent);
--line: color-mix(in srgb, var(--fg) 11%, transparent);
--card: rgba(255, 255, 255, 0.92);
--shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.08), 0 3px 8px rgba(0, 0, 0, 0.05);
}
@media (prefers-color-scheme: dark) {
:root {
--bg1: color-mix(in oklch, var(--accent) 24%, #17181c);
--bg2: color-mix(in oklch, var(--accent) 9%, #131417);
--fg: color-mix(in oklch, var(--accent) 12%, #f2f3f7);
--card: rgba(255, 255, 255, 0.17);
--shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.1), 0 1px 3px rgba(0, 0, 0, 0.35);
}
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
display: flex;
flex-direction: column;
background: linear-gradient(180deg, var(--bg1), var(--bg2)) fixed;
color: var(--fg);
font: 500 13px/1.35 system-ui, -apple-system, "PingFang SC", sans-serif;
/* 和侧边栏一样用系统默认的画字方式(sidepanel.css 的说明) */
-webkit-font-smoothing: auto;
user-select: none;
}
.bar {
display: flex;
align-items: center;
gap: 12px;
height: 58px;
flex: none;
padding: 0 20px;
border-bottom: 1px solid var(--line);
color: var(--fg-3);
}
#q {
flex: 1;
min-width: 0;
height: 100%;
border: 0;
background: none;
color: var(--fg);
font: inherit;
font-size: 18px;
font-weight: 500;
outline: none;
}
#q::placeholder { color: var(--fg-3); font-weight: 400; }
#list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 10px 24px; scrollbar-width: thin; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent); }
.group { margin: 10px 10px 4px; color: var(--fg-3); font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
.row {
display: flex;
align-items: center;
gap: 12px;
height: 40px;
padding: 0 12px;
border-radius: 10px;
cursor: pointer;
}
.row.sel { background: var(--card); box-shadow: var(--shadow); }
.row .icon { width: 18px; height: 18px; flex: none; border-radius: 4px; }
.row .i { width: 18px; height: 18px; flex: none; display: grid; place-items: center; color: var(--fg-2); }
.row .i svg { width: 16px; height: 16px; }
.row .dot { width: 10px; height: 10px; margin: 4px; flex: none; border-radius: 50%; }
.row .emoji { width: 18px; flex: none; font-size: 15px; line-height: 1; text-align: center; }
.row .title { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* 和搜索词一样的那一段加粗(见 src/command.js 的 rowEl)。中文字由苹方显示,苹方最粗只到 Semibold,和正文的 Medium 只差一档,
加粗看不出来:有中文的匹配再换成主题色(中文搜索结果常见的标法)。主题色可能很浅(黄色空间、从 Arc 导入的颜色),
亮度夹一下:亮色时不浅于 0.5,暗色时不深于 0.78,和底色拉开 */
.row .title mark { background: none; color: inherit; font-weight: 700; }
.row .title mark.cjk { color: oklch(from var(--accent) min(l, 0.5) c h); }
@media (prefers-color-scheme: dark) { .row .title mark.cjk { color: oklch(from var(--accent) max(l, 0.78) c h); } }
.row .sub { flex: none; max-width: 40%; overflow: hidden; color: var(--fg-3); font-size: 12px; font-weight: 400; white-space: nowrap; text-overflow: ellipsis; }
.row.sel .sub { color: var(--fg-2); }
/* 每一行都给回车标签留着位置(没选中时看不见),选中时右边那一列不左右跳 */
.row .enter { flex: none; visibility: hidden; padding: 1px 6px; border-radius: 5px; background: var(--fill); color: var(--fg-2); font-size: 11px; }
.row.sel .enter { visibility: visible; }
.empty { margin: 24px; color: var(--fg-3); text-align: center; }