@jsb188/css 1.1.1 → 1.1.2

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