@jsb188/css 1.1.8 → 1.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/css/layout.css CHANGED
@@ -1,224 +1,402 @@
1
-
2
1
  /* Route based styles */
3
2
 
4
3
  body.p_auth {
5
- background-color: rgb(var(--color-bg-alt));
4
+ background-color: rgb(var(--color-bg-alt));
6
5
  }
7
6
 
8
7
  /* Content & Modal wrapper */
9
8
 
10
- .cw, .mw {
11
- width: 100%;
12
- margin-left: auto;
13
- margin-right: auto;
9
+ .cw,
10
+ .mw {
11
+ width: 100%;
12
+ }
13
+
14
+ .cw,
15
+ .mw,
16
+ .mx_auto {
17
+ margin-left: auto;
18
+ margin-right: auto;
14
19
  }
15
20
 
16
21
  .mw {
17
- max-height: calc(100vh - 50px);
18
- /* max-height: calc(100vh - var(--rem-medium) - var(--rem-medium)); */
22
+ --toolbar-ht: 50px;
23
+
24
+ max-height: calc(100vh - var(--toolbar-ht));
25
+ /* max-height: calc(100vh - var(--rem-medium) - var(--rem-medium)); */
19
26
  }
20
27
 
21
28
  .mw .scr_area {
22
- /* 45px is the height of modal header toolbar */
23
- max-height: calc(100vh - 50px - 45px);
24
- /* max-height: calc(100vh - var(--rem-medium) - var(--rem-medium) - 45px); */
29
+ max-height: calc(100vh - var(--toolbar-ht) - var(--toolbar-ht));
30
+ /* max-height: calc(100vh - var(--rem-medium) - var(--rem-medium) - 45px); */
31
+ }
32
+
33
+ .mw .scr_area.sm {
34
+ max-height: min(640px, 75vh);
35
+ }
36
+
37
+ .mw .scr_area.xs {
38
+ max-height: min(530px, 64vh);
39
+ }
40
+
41
+ /* "Almost" full, centered modal page */
42
+
43
+ .mw.centered_big {
44
+ flex: 1;
45
+ max-height: 800px;
46
+ max-width: 1440px;
47
+ }
48
+
49
+ /* Medium, centered modal page */
50
+
51
+ .mw.centered_medium {
52
+ flex: 1;
53
+ max-height: 600px;
54
+ max-width: 1080px;
55
+ }
56
+
57
+ /* Top-fixed position modal content wrappers */
58
+
59
+ .mw_page {
60
+ padding-top: 6vh;
25
61
  }
26
62
 
27
- .mw_adjust_center {
28
- padding-top: calc(25px * 2);
29
- /* padding-top: calc(var(--rem-medium) * 2); */
63
+ .mw_page .modal_main_content {
64
+ max-height: calc(94vh + 10px);
30
65
  }
31
66
 
32
- .mw_adjust_center .mw {
33
- /* This hides the bottom rounded corners */
34
- max-height: calc(100vh - 50px + 14px);
35
- /* max-height: calc(100vh - var(--rem-medium) - var(--rem-medium) + 14px); */
67
+ .mw_page .modal_fit_content {
68
+ height: calc(88vh - var(--toolbar-ht));
69
+ }
70
+
71
+ /* Special sizing for mobile */
72
+
73
+ .max_h_extend_bottom {
74
+ max-height: 87.5vh;
75
+ }
76
+ .mw_page .max_h_extend_bottom {
77
+ max-height: calc(94vh - var(--toolbar-ht) + 10);
78
+ padding-bottom: 10px;
36
79
  }
37
80
 
38
- .mw_adjust_center .mw .scr_area {
39
- /* 45px is the height of modal header toolbar */
40
- max-height: calc(100vh - 50px - 31px);
81
+ @media (max-height: 1140px) {
82
+ /* Designed for modal wrapper layout content while accounting for mobile header area */
83
+ .max_h_extend_bottom {
84
+ max-height: 85vh;
85
+ }
41
86
  }
42
87
 
43
- .cw.tn, .mw.tn {
44
- /* was .tiny */
45
- max-width: 380px;
88
+ @media (max-height: 1024px) {
89
+ /* Designed for modal wrapper layout content while accounting for mobile header area */
90
+ .max_h_extend_bottom {
91
+ max-height: 82.5vh;
92
+ }
93
+
94
+ /* .mw_page responsive design */
95
+ .mw_page {
96
+ padding-top: 7.5vh;
97
+ }
98
+ .mw_page .modal_main_content {
99
+ max-height: calc(92.5vh + 10px);
100
+ }
101
+ .mw_page .max_h_extend_bottom {
102
+ max-height: calc(92.5vh - var(--toolbar-ht) + 10);
103
+ }
46
104
  }
47
105
 
48
- .cw.xs, .mw.xs {
49
- max-width: 420px;
106
+ @media (max-height: 768px) {
107
+ /* Designed for modal wrapper layout content while accounting for mobile header area */
108
+ .max_h_extend_bottom {
109
+ max-height: 80vh;
110
+ }
50
111
  }
51
112
 
52
- .cw.sm, .mw.sm {
53
- /* was .default_alt */
54
- max-width: 640px;
113
+ @media (max-height: 640px) {
114
+ /* Designed for modal wrapper layout content while accounting for mobile header area */
115
+ .max_h_extend_bottom {
116
+ max-height: 75vh;
117
+ }
55
118
  }
56
119
 
57
- .cw.df, .mw.df {
58
- max-width: 780px;
120
+ /* Common, standardized content wrapper sizes */
121
+
122
+ .cw.tn,
123
+ .mw.tn {
124
+ /* was .tiny */
125
+ max-width: 380px;
59
126
  }
60
127
 
61
- .cw.md, .mw.md {
62
- max-width: 1140px;
128
+ .cw.xs,
129
+ .mw.xs {
130
+ max-width: 425px;
63
131
  }
64
132
 
65
- .cw.lg, .mw.lg {
66
- max-width: 1280px;
133
+ .cw.sm,
134
+ .mw.sm {
135
+ /* was .default_alt */
136
+ max-width: 640px;
67
137
  }
68
138
 
69
- .cw.xl, .mw.xl {
70
- max-width: 1440px;
139
+ .cw.df,
140
+ .mw.df {
141
+ max-width: 780px;
71
142
  }
72
143
 
73
- .cw.full, .mw.full, .mw.max {
74
- flex: 1;
75
- max-height: 100%;
144
+ .cw.md,
145
+ .mw.md {
146
+ max-width: 1140px;
76
147
  }
77
148
 
78
- .cw.full .cw, .mw.full .cw, .mw.max .cw {
79
- max-height: 100%;
149
+ .cw.lg,
150
+ .mw.lg {
151
+ max-width: 1280px;
80
152
  }
81
153
 
82
- /* Max size modals */
154
+ .cw.xl,
155
+ .mw.xl {
156
+ max-width: 1440px;
157
+ }
83
158
 
159
+ .cw.full,
160
+ .mw.full,
84
161
  .mw.max {
85
- background: radial-gradient(ellipse at center, rgba(var(--color-bg-alt), .9) 50%, rgba(var(--color-bg-alt), 0) 100%);
86
- background: radial-gradient(ellipse at center, rgba(var(--color-bg-active), .9) 50%, rgba(var(--color-bg-active), 0) 100%);
87
- background: radial-gradient(ellipse at center, rgba(var(--color-bg-medium), .9) 50%, rgba(var(--color-bg-medium), 0) 100%);
88
- background: radial-gradient(ellipse at center, rgba(var(--color-bg-strong), .9) 50%, rgba(var(--color-bg-strong), 0) 100%);
162
+ flex: 1;
163
+ max-height: 100%;
89
164
  }
90
165
 
91
- /* Sidebar */
166
+ .cw.full .cw,
167
+ .mw.full .cw,
168
+ .mw.max .cw {
169
+ max-height: 100%;
170
+ }
171
+
172
+ /* Toolbar */
92
173
 
93
- .w_lsidebar {
94
- padding-right: var(--sidebar-wt);
174
+ .toolbar_input_click:hover:before,
175
+ .toolbar_input_click.editing:before {
176
+ content: "";
177
+ inset: -3px -9px -1px -8px;
178
+ border-radius: 100vmax;
179
+ pointer-events: none;
180
+ position: absolute;
95
181
  }
96
182
 
183
+ .toolbar_input_click:hover:before {
184
+ outline: 3px dashed rgba(var(--color-main), 0.75);
185
+ }
186
+
187
+ .toolbar_input_click.editing:before,
188
+ .toolbar_input_click.editing:hover:before {
189
+ outline: 3px dashed rgb(var(--color-main));
190
+ }
191
+
192
+ /* Sidebar */
193
+
97
194
  /* Content with right <aside /> sticky sidebar */
98
195
 
99
196
  .w_app_side {
100
- padding-left: calc(var(--aside-wt) + 30px);
197
+ margin-right: var(--aside-wt);
101
198
  }
102
199
 
103
200
  .app_aside {
104
- position: absolute;
105
- width: var(--aside-wt);
106
- padding-right: 20px;
107
- max-height: calc(100vh - var(--toolbar-ht));
108
- top: var(--toolbar-ht); left: 0;
201
+ max-height: 100vh;
202
+ top: 0;
203
+ right: 0;
204
+ padding-top: var(--toolbar-ht);
109
205
  }
110
206
 
111
207
  /* Floating message */
112
208
 
113
209
  .floating_msg_cnt {
114
- transition: transform .2s ease-in-out, opacity .2s ease-in-out;
115
- transform: translateY(0);
116
- opacity: 0;
117
- }
118
-
119
- .floating_msg_cnt.active {
120
- transform: translateY(var(--toolbar-ht));
121
- opacity: 1;
210
+ pointer-events: none;
211
+ transition:
212
+ transform 0.2s ease-in-out,
213
+ opacity 0.2s ease-in-out;
214
+ width: max-content;
215
+ max-width: calc(100vw - 40px);
122
216
  }
123
217
 
124
218
  .floating_msg {
125
- margin: 0 -1rem;
219
+ pointer-events: auto;
126
220
  }
127
221
 
128
222
  /* Helpers, to work with layout variables */
129
223
 
130
224
  .min_h_toolbar_screen {
131
- min-height: calc(100vh - var(--toolbar-ht));
225
+ min-height: calc(100vh - var(--toolbar-ht));
132
226
  }
133
227
 
134
228
  .max_h_toolbar_screen {
135
- max-height: calc(100vh - var(--toolbar-ht));
136
- }
137
-
138
- /* App layout; toolbar title */
139
-
140
- #app_toolbar_title {
141
- height: var(--toolbar-ht);
142
- flex-shrink: 0;
229
+ max-height: calc(100vh - var(--toolbar-ht));
143
230
  }
144
231
 
145
232
  /* App layout; account nav */
146
233
 
147
234
  #app_toolbar_right {
148
- position: absolute;
149
- top: 0; right: 0; z-index: 50;
150
- height: var(--toolbar-ht);
235
+ position: absolute;
236
+ top: 0;
237
+ right: 0;
238
+ z-index: 50;
239
+ height: var(--toolbar-ht);
151
240
  }
152
241
 
153
242
  /* App layout; sidebar */
154
243
 
155
- #app_sidebar {
156
- position: relative;
157
- width: var(--sidebar-wt);
158
- transition: width ease .2s;
244
+ .app_sidebar_edge_reveal {
245
+ background: linear-gradient(
246
+ 90deg,
247
+ rgba(var(--color-main), 0.125),
248
+ rgba(0, 0, 0, 0)
249
+ );
159
250
  }
160
251
 
161
- .app_sidebar_inside {
162
- position: absolute;
163
- top: 0;
164
- left: 0;
165
- bottom: 0;
166
- width: var(--sidebar-wt);
167
- transition: left ease .2s;
252
+ #app_sidebar {
253
+ position: relative;
254
+ width: 0;
255
+ overflow: hidden;
256
+ transition: width ease 0.2s;
168
257
  }
169
258
 
170
- .app_sidebar_inside_width {
171
- width: calc(var(--sidebar-wt) - 27px);
259
+ .open #app_sidebar {
260
+ width: var(--sidebar-wt);
172
261
  }
173
262
 
174
- /* App layout; sidebar mobile responsive design */
175
-
176
- @media (max-width: 1024px) {
177
- #app_sidebar {
178
- width: 0;
179
- }
263
+ .overlayed #app_sidebar {
264
+ position: fixed;
265
+ z-index: 50;
266
+ top: 25px;
267
+ bottom: 25px;
268
+ left: 0;
269
+ width: 0;
270
+ overflow: visible;
180
271
  }
181
272
 
182
- /* App layout; main content (scroll area) */
273
+ .app_sidebar_inside {
274
+ position: absolute;
275
+ top: 0;
276
+ left: calc(var(--sidebar-wt) * -1);
277
+ bottom: 0;
278
+ width: var(--sidebar-wt);
279
+ transition: left ease 0.2s;
280
+ }
183
281
 
184
- .app_scr {
185
- /* position: relative; */
186
- overflow-x: hidden;
187
- overflow-y: scroll;
188
- -webkit-overflow-scrolling: touch;
189
- /* scroll-behavior: smooth; */
190
- /* After a recent update, this no longer works in Chrome */
191
- /* overflow-y: overlay; */
192
- scrollbar-gutter: auto;
193
- /* In "new" Google Chrome, this will make the scrollbar invisible, so we must turn it off. */
194
- /* scrollbar-width: thin; */
282
+ .open .app_sidebar_inside {
283
+ left: 0;
284
+ }
195
285
 
196
- /* This is for bottom-up chat style virtualized list */
197
- overflow-anchor: none;
286
+ .overlayed .app_sidebar_inside {
287
+ left: 0;
288
+ border-top-right-radius: var(--radius-default);
289
+ border-bottom-right-radius: var(--radius-default);
290
+ background-color: rgb(var(--color-bg));
291
+ box-shadow:
292
+ var(--shadow-line),
293
+ 0 0 0 1px rgba(0, 0, 0, 0.05),
294
+ 10px 0 20px rgba(0, 0, 0, 0.05);
198
295
  }
199
296
 
200
- .app_scr::-webkit-scrollbar {
201
- width: 18px;
202
- /* background-color: rgb(var(--color-bg-alt)); */
297
+ .overlayed.overlay_closing .app_sidebar_inside {
298
+ left: calc(var(--sidebar-wt) * -1);
203
299
  }
204
300
 
205
- .app_scr::-webkit-scrollbar-track {
206
- box-shadow: inset 0 0 0 5px rgb(var(--color-bg));
207
- border-radius: 9px;
301
+ .app_sidebar_inside_width {
302
+ width: calc(var(--sidebar-wt) - 23px);
208
303
  }
209
304
 
210
- .app_scr::-webkit-scrollbar-thumb {
211
- z-index: -1;
212
- /* Use this for invisible style */
213
- /* background-color: rgb(var(--color-bg-active)); */
214
- background-color: transparent;
215
- box-shadow: inset 0 0 0 5px rgb(var(--color-bg));
216
- /* transform: scale(.5); */
217
- border-radius: 9px;
218
- min-height: 100px;
305
+ /* App layout; sidebar mobile responsive design */
306
+
307
+ @media (--responsive-mobile-portrait) {
308
+ #app_sidebar {
309
+ width: 0;
310
+ }
219
311
  }
220
312
 
221
- .app_scr:hover::-webkit-scrollbar-thumb {
222
- /* background-color: rgb(var(--color-bg-medium)); */
223
- background-color: rgb(var(--color-bg-active));
313
+ /* App layout; main content (scroll area) */
314
+
315
+ .app_scr {
316
+ /* position: relative; */
317
+ overflow-x: hidden;
318
+ overflow-y: scroll;
319
+ }
320
+
321
+ .app_scr.auto_y {
322
+ overflow-y: auto;
323
+ }
324
+
325
+ .app_scr.of_x {
326
+ overflow-x: scroll;
327
+ }
328
+
329
+ .app_scr.of_x.auto_x {
330
+ overflow-x: auto;
331
+ }
332
+
333
+ .app_scr.hide_y {
334
+ overflow-x: scroll;
335
+ overflow-y: hidden;
336
+ }
337
+
338
+ @media (--gte-mobile-portrait) {
339
+ .app_scr {
340
+ -webkit-overflow-scrolling: touch;
341
+ /* scroll-behavior: smooth; */
342
+ /* After a recent update, this no longer works in Chrome */
343
+ /* overflow-y: overlay; */
344
+ scrollbar-gutter: auto;
345
+ /* In "new" Google Chrome, this will make the scrollbar invisible, so we must turn it off. */
346
+ /* scrollbar-width: thin; */
347
+
348
+ /* This is for bottom-up chat style virtualized list */
349
+ overflow-anchor: none;
350
+ }
351
+
352
+ .app_scr::-webkit-scrollbar {
353
+ /* This size must match SHEET_CANVAS_APP_SCROLLBAR_SIZE in @jsb188:sheet/src/modules/Sheet-Controller.tsx. */
354
+ width: 19px;
355
+ height: 19px;
356
+ background-color: rgb(var(--color-bg));
357
+ }
358
+
359
+ .app_scr::-webkit-scrollbar:vertical {
360
+ border-left: solid 1px rgb(var(--color-bg-active));
361
+ }
362
+
363
+ .app_scr::-webkit-scrollbar:horizontal {
364
+ border-top: solid 1px rgb(var(--color-bg-active));
365
+ }
366
+
367
+ .app_scr::-webkit-scrollbar-thumb:vertical {
368
+ border-left: solid 1px transparent;
369
+ }
370
+
371
+ .app_scr::-webkit-scrollbar-thumb:horizontal {
372
+ border-top: solid 1px transparent;
373
+ }
374
+
375
+ .app_scr::-webkit-scrollbar-thumb {
376
+ z-index: -1;
377
+ /* transform: scale(.5); */
378
+ border-radius: 10px;
379
+ min-height: 100px;
380
+ background-clip: padding-box;
381
+ background-color: rgb(var(--color-bg-active));
382
+ box-shadow: inset 0 0 0 5px rgb(var(--color-bg));
383
+ }
384
+
385
+ .app_scr:hover::-webkit-scrollbar-thumb {
386
+ /* background-color: rgb(var(--color-bg-medium)); */
387
+ background-color: rgb(var(--color-bg-active));
388
+ }
389
+
390
+ .app_scr::-webkit-scrollbar-thumb:active {
391
+ /* background-color: rgb(var(--color-bg-strong)); */
392
+ background-color: rgb(var(--color-bg-medium));
393
+ /* background-color: rgb(var(--color-bg-active)); */
394
+ }
395
+
396
+ .app_scr::-webkit-scrollbar-corner {
397
+ background-color: rgb(var(--color-bg));
398
+ border-top: solid 1px rgb(var(--color-bg-active));
399
+ border-left: solid 1px rgb(var(--color-bg-active));
400
+ box-shadow: 0 0 10px rgb(0, 0, 0, 0.125) inset;
401
+ }
224
402
  }