-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
algolia.scss
230 lines (199 loc) · 4.37 KB
/
algolia.scss
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
.algolia {
[command-root] {
padding: 8px;
}
[command-input] {
font-family: var(--font-sans);
width: 100%;
font-size: 18px;
padding: 12px;
outline: none;
background: var(--bg);
color: var(--gray12);
border-bottom: 1px solid var(--gray6);
border-radius: 4px;
caret-color: var(--vcp-c-brand);
margin: 0;
border: 1px solid var(--vcp-c-brand);
&::placeholder {
color: var(--gray9);
}
}
[command-list] {
height: var(--command-list-height);
max-height: 360px;
overflow: auto;
overscroll-behavior: contain;
transition: 100ms ease;
transition-property: height;
}
[command-item] {
position: relative;
content-visibility: auto;
cursor: pointer;
height: 56px;
font-size: 14px;
display: flex;
align-items: center;
gap: 12px;
padding: 0px 16px;
color: var(--gray12);
user-select: none;
will-change: background, color;
transition: all 150ms ease;
transition-property: none;
border-radius: 4px;
margin-top: 4px;
&:first-child {
margin-top: 0px;
}
&[aria-selected='true'],
&:hover {
background: var(--vcp-c-brand);
color: #fff;
svg {
color: #fff;
}
[command-linear-shortcuts] {
display: flex;
margin-left: auto;
gap: 8px;
kbd {
font-family: var(--font-sans);
font-size: 13px;
color: var(--gray11);
}
}
}
&[aria-disabled='true'] {
color: var(--gray8);
cursor: not-allowed;
}
&:active {
transition-property: background;
background: var(--gray4);
}
svg {
width: 16px;
height: 16px;
color: var(--gray10);
}
}
[command-empty=''] {
font-size: 14px;
display: flex;
align-items: center;
justify-content: center;
height: 64px;
white-space: pre-wrap;
color: var(--gray11);
}
[command-dialog-mask] {
background-color: rgba(75, 75, 75, 0.8);
}
[command-dialog-header] {
padding: 12px;
}
[command-dialog-body] {
padding: 0 12px 12px;
}
[command-dialog-footer] {
align-items: center;
border-radius: 0 0 8px 8px;
box-shadow: 0 -1px 0 0 #e0e3e8, 0 -3px 6px 0 rgba(69, 98, 155, 0.12);
display: flex;
flex-direction: row-reverse;
flex-shrink: 0;
height: 44px;
justify-content: space-between;
padding: 0 12px;
position: relative;
user-select: none;
width: 100%;
z-index: 300;
}
[command-group-heading] {
color: var(--vcp-c-brand);
font-size: 0.85em;
font-weight: 600;
line-height: 32px;
margin: 0 -4px;
padding: 8px 4px 0;
top: 0;
z-index: 10;
width: 100%;
}
.command-palette-commands {
color: var(--docsearch-muted-color);
display: flex;
list-style: none;
margin: 0;
padding: 0;
li {
display: flex;
align-items: center;
}
li:not(:last-of-type) {
margin-right: 0.8em;
}
}
.command-palette-logo {
a {
display: flex;
align-items: center;
gap: 8px;
}
svg {
height: 24px;
width: 24px;
}
}
.command-palette-commands-key {
align-items: center;
background: var(--gray3);
border-radius: 2px;
display: flex;
height: 18px;
justify-content: center;
margin-right: 0.4em;
padding: 0 0 1px;
color: var(--gray11);
border: 0;
width: 20px;
}
}
.dark .algolia [command-dialog-footer] {
box-shadow: none;
}
// transition for command-dialog
.command-dialog-enter-active,
.command-dialog-leave-active {
transition: opacity 0.2s ease-in-out;
}
.command-dialog-enter-from,
.command-dialog-leave-to {
opacity: 0;
}
.command-dialog-enter-active {
transition-duration: 0.5s;
}
// transition for command-dialog-wrapper
.command-dialog-enter-active [command-dialog-wrapper] {
transition-delay: 0.2s;
}
.command-dialog-enter-from [command-dialog-wrapper],
.command-dialog-leave-to [command-dialog-wrapper] {
opacity: 0;
transform: translateY(10px) scale(0.95);
}
.command-dialog-enter-active [command-dialog-wrapper] {
transition: transform ease-out 0.3s;
}
.command-dialog-enter-to [command-dialog-wrapper],
.command-dialog-leave-from [command-dialog-wrapper] {
opacity: 1;
transform: translateY(0) scale(1);
}
.command-dialog-leave-active [command-dialog-wrapper] {
transition: transfrom ease-in 0.2s;
}