/
ui.css
378 lines (305 loc) · 7.2 KB
/
ui.css
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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
#ui__ac {
&-inner {
overflow-x: hidden;
overflow-y: auto;
position: relative;
-webkit-overflow-scrolling: touch;
.menu-link {
@apply break-all rounded;
.has-help {
display: flex;
align-items: center;
justify-content: space-between;
small {
@apply cursor-help visible flex;
svg {
@apply opacity-30 hover:opacity-90;
}
}
}
&:hover, &.chosen {
background-color: or(--lx-gray-05, --ls-menu-hover-color, #f4f5f7);
.has-help small {
visibility: visible;
}
}
&:not(.chosen):hover {
background-color: unset !important;
color: or(--ls-autocomplete-color-hover, --lx-gray-12, --ls-primary-text-color);
}
}
}
}
.menu-link {
&.no-padding {
padding: 0 !important;
}
}
.ui__ac-group-name {
@apply p-2 text-xs text-popover-foreground/20 font-medium;
}
.search-all #ui__ac-inner {
max-height: none;
}
.ui__notifications {
position: fixed;
z-index: var(--ls-z-index-level-4);
width: 100%;
top: 3.2em;
pointer-events: none;
&-content {
@apply inset-0 flex items-end justify-center px-4 py-3
pointer-events-none sm:px-6 sm:py-3 sm:items-start
sm:justify-end;
}
.notification-area {
background-color: or(--logseq-of-notification-background, --lx-gray-04, --ls-tertiary-background-color, #fff);
color: or(--ls-notification-text-color, --lx-gray-11, --ls-primary-text-color);
}
}
.ui__toggle {
.wrapper {
@apply relative flex-shrink-0
h-6 w-11 border-2 border-transparent flex
rounded-full cursor-pointer focus:outline-none;
}
.switcher {
@apply inline-block h-5 w-5 rounded-full bg-white shadow;
}
&.is-small {
.wrapper {
@apply h-4 w-8;
}
.switcher {
@apply h-3 w-3;
}
}
}
.ui__modal {
@apply fixed px-4 pb-4 inset-0 flex items-baseline justify-center
top-12 sm:top-[calc(3vh+50px)];
&-overlay {
@apply fixed inset-0 transition-opacity;
}
&-overlay div {
--from: or(--ls-modal-overlay-gradient-start, --lx-gray-03, --ls-primary-background-color);
--to: or(--ls-modal-overlay-gradient-end, --lx-gray-06, --ls-quaternary-background-color);
background-image: linear-gradient(to bottom, var(--from), var(--to));
}
&-panel {
@apply relative rounded-md shadow-lg border border-gray-06 overflow-hidden;
background: or(--ls-modal-panel-color, --lx-gray-04, --ls-secondary-background-color);
.panel-content {
overflow-y: auto;
overflow-x: hidden;
width: calc(96vw - 2rem);
max-height: 89vh;
padding: 2rem 1.5rem;
@screen sm {
overflow-y: overlay;
max-height: 85vh;
padding: 2rem;
width: auto;
min-width: 600px;
.ls-card,
.ls-search {
width: 740px;
}
.ls-card {
min-height: 60vh;
}
.ls-search {
width: var(--ls-main-content-max-width);
}
}
@screen md {
min-width: 720px;
}
}
}
&-close {
@apply text-gray-400 hover:text-gray-500
focus:outline-none focus:text-gray-500
transition ease-in-out duration-150 opacity-60
hover:opacity-100;
&-wrap {
@apply z-10 absolute top-0 right-0 pt-2 pr-2;
}
}
&[label="ls-modal-align-center"] {
top: 0;
.ui__modal-panel {
top: 50vh;
transform: translateY(-52%);
}
}
&[label="diff__cp"] {
.panel-content {
padding: 2rem 1rem;
@screen sm {
padding: 2rem;
}
}
}
&[label="flashcards__cp"] {
.panel-content {
padding: 2rem 0;
@screen sm {
padding: 2rem 2rem;
}
}
}
&[label="instruction__cp"] {
.ui__modal-panel {
height: 90%;
}
.panel-content {
height: 100%;
}
}
}
.instruction {
height: 40%;
@screen sm {
height: 70%;
}
}
html.is-native-android,
html.is-native-iphone,
html.is-native-iphone-without-notch {
.references {
.blocks-container {
transform: translateX(-8px);
width: 104%;
}
}
.ls-card {
min-height: 65vh;
}
.ui__modal {
&[label="flashcards__cp"] {
.panel-content {
padding: 2rem 1rem 1rem;
width: 90vw;
.cards-review {
padding-left: 0px;
padding-right: 0px;
}
.blocks-container {
transform: translateX(-7px);
width: 103%;
}
}
}
}
}
html.is-mobile {
.ui__modal {
@apply bottom-0 inset-x-0 top-20;
&[label="ls-modal-search"] {
.panel-content {
padding-bottom: 0;
}
.ls-search {
padding-bottom: 0;
}
}
&[label="ls-modal-align-center"] {
.ui__modal-panel {
top: 8vh;
transform: translateY(-10%);
}
}
}
}
.ui__confirm-modal {
.sublabel {
display: flex;
padding: 2px 0;
align-items: center;
font-size: 14px;
input[type='checkbox'] {
margin-right: 8px;
}
}
}
.dropdown-wrapper {
@apply border min-w-[12rem] rounded-lg bg-popovelx overflow-hidden;
.menu-links-wrapper {
@apply border-0;
}
}
.dropdown-caret {
display: inline-block;
width: 0;
height: 0;
vertical-align: middle;
content: '';
border-top-style: solid;
border-top-width: 4px;
border-right: 4px solid transparent;
border-bottom: 0 solid transparent;
border-left: 4px solid transparent;
}
.form-select {
@apply block w-full pl-3 pr-10 py-2 text-base leading-6 rounded
border-gray-300 focus:outline-none sm:text-sm sm:leading-5;
background-color: or(--ls-form-select-background-color, --lx-gray-03, --ls-primary-background-color, transparent);
background-repeat: no-repeat;
border-width: 1px;
border-color: or(--ls-form-select-border-color, --lx-gray-07, --ls-border-color);
&.is-small {
@apply pl-2 py-1.5 sm:leading-4 sm:text-xs;
}
}
.form-input {
@apply block w-full pl-2
sm:text-sm sm:leading-5 rounded;
border-width: 1px;
border-color: or(--ls-form-input-border-color, --lx-gray-07, --ls-border-color);
&:focus {
box-shadow: 0 0 0 2px rgba(164, 202, 254, 0.45);
}
&.is-small {
@apply py-1.5 sm:leading-4 sm:text-xs;
}
}
.rotating-arrow.not-collapsed svg {
transform: rotate(90deg);
}
.rotating-arrow svg {
transition: all 100ms ease-in 0ms;
}
.bg-quaternary {
background-color: or(--ls-bg-quaternary, --lx-gray-06, --ls-quaternary-background-color);
}
.ui__icon {
display: inline-block;
}
.type-icon {
@apply text-base text-center flex items-center justify-center rounded border mr-2 relative;
width: 24px;
height: 24px;
flex-shrink: 0;
border-color: or(--ls-type-icon-border-color, --lx-gray-03, --ls-primary-background-color);
overflow: hidden;
color: or(--ls-type-icon-text-color, --lx-gray-12, --ls-primary-text-color);
.ti,
.tie {
z-index: 1;
}
&:before {
@apply block absolute inset-0 ;
background: or(--ls-type-icon-before-color, --lx-gray-03, --ls-primary-background-color);
content: " ";
}
}
.ui__radio-list {
@apply grid grid-flow-col gap-2;
}
.ui__toggle-background-on {
@apply bg-primary;
}
.ui__toggle-background-off {
background: or(--ls-toggle-off-background, --lx-gray-08, rgb(212, 212, 212));
}