@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/form.css CHANGED
@@ -1,468 +1,728 @@
1
-
2
1
  /* Form elements */
3
2
 
4
3
  .form_el {
5
- display: flex;
6
- flex-direction: column;
7
- /* margin-top: .35rem; */
4
+ display: flex;
5
+ flex-direction: column;
6
+ }
7
+
8
+ .no_resize {
9
+ resize: none;
8
10
  }
9
11
 
10
12
  /* Form containers - same padding for all form elements */
11
13
 
12
14
  .form_cnt,
13
- .form_el input, .form_el textarea, .form_el .tx_virtualizer {
14
- padding: .58rem;
15
+ .form_el input,
16
+ .form_el .form_select,
17
+ .form_el textarea,
18
+ .form_el .tx_virtualizer {
19
+ padding: 0.58rem;
20
+ }
21
+
22
+ fieldset.form_cnt {
23
+ padding-bottom: 1rem;
24
+ }
25
+
26
+ .form_cnt.smaller,
27
+ .form_el.smaller input,
28
+ .form_el.smaller .form_select,
29
+ .form_el.smaller textarea,
30
+ .form_el.smaller .tx_virtualizer {
31
+ /* If less is needed, use .lh_1 .lh_2 to further flatten the height */
32
+ padding: 0.32rem 6px;
33
+ }
34
+
35
+ .form_cnt.tiny,
36
+ .form_el.tiny input,
37
+ .form_el.tiny .form_select,
38
+ .form_el.tiny textarea,
39
+ .form_el.tiny .tx_virtualizer {
40
+ padding: var(--form-tiny-padding-top, var(--form-tiny-padding-y, 2px)) var(--form-tiny-padding-x, 5px)
41
+ var(--form-tiny-padding-y, 2px);
15
42
  }
16
43
 
17
44
  /* Input */
18
45
 
19
46
  .form_cnt.outline,
20
- .form_el input, .form_el textarea, .form_el .tx_virtualizer {
21
- border: solid 1px var(--color-text-light);
22
- background-color: transparent;
23
- /* opacity: .2; */
24
- /* box-shadow: 0 2px 4px var(--color-main), 0 4px 10px var(--color-main); */
47
+ .form_el input,
48
+ .form_el .form_select,
49
+ .form_el textarea,
50
+ .form_el .tx_virtualizer {
51
+ border: solid 1px var(--color-darker-light);
52
+ background-color: transparent;
25
53
  }
26
54
 
27
- /* Input */
55
+ .form_el .form_select {
56
+ outline: 2px solid transparent;
57
+ }
58
+
59
+ /* Invisible input (use this to make inputs clickable with separate render component) */
28
60
 
29
- /* I like it better without the gray
30
- input.is_disabled, textarea.is_disabled {
31
- color: var(--color-text-medium);
32
- } */
61
+ .invis_input {
62
+ border: none;
63
+ padding: 0;
64
+ margin: 0;
65
+ color: rgba(0, 0, 0, 0);
66
+ background-color: rgba(0, 0, 0, 0);
67
+ }
33
68
 
34
- .form_el input::placeholder, .form_el textarea::placeholder {
35
- color: var(--color-text-medium);
69
+ .invis_input:focus,
70
+ .stock:focus {
71
+ outline: none;
36
72
  }
37
73
 
38
- .form_el input:focus, .form_el textarea:focus, [contenteditable='true']:focus {
39
- outline: none;
74
+ .invis_input::selection {
75
+ background: rgba(0, 0, 0, 0);
76
+ color: rgba(0, 0, 0, 0);
40
77
  }
41
78
 
42
- .form_el input:focus, .form_el textarea:focus {
43
- /* Consider adding theme colors here */
44
- box-shadow: var(--shadow-light);
79
+ input.invis_input[type="number"] {
80
+ appearance: none;
81
+ -webkit-appearance: none;
82
+ -moz-appearance: textfield;
45
83
  }
46
84
 
47
- [contenteditable='true']:empty:before {
48
- content: attr(data-placeholder);
49
- color: var(--color-text-light);
85
+ input.invis_input::-webkit-outer-spin-button,
86
+ input.invis_input::-webkit-inner-spin-button {
87
+ -webkit-appearance: none;
88
+ margin: 0;
50
89
  }
51
90
 
52
- .form_el.error input {
53
- border-color: rgb(var(--color-error));
54
- background-color: rgb(var(--color-error-faded));
91
+ /* Number input with native increment and decrement controls hidden */
92
+
93
+ input.no_number_spinner[type="number"] {
94
+ appearance: textfield;
95
+ -moz-appearance: textfield;
55
96
  }
56
97
 
57
- .form_el.c input {
58
- text-align: center;
98
+ input.no_number_spinner::-webkit-outer-spin-button,
99
+ input.no_number_spinner::-webkit-inner-spin-button {
100
+ -webkit-appearance: none;
101
+ margin: 0;
59
102
  }
60
103
 
61
- /* Input: subtle */
104
+ /* Input width follows its current value within the available container width */
62
105
 
63
- .form_el.subtle input {
64
- width: 120px;
65
- padding: .35rem;
106
+ .input_field_sizing {
107
+ field-sizing: content;
108
+ min-width: 1ch;
109
+ max-width: 100%;
66
110
  }
67
111
 
68
- /* Use this for file input click, etc */
112
+ /* Outlined input container shrink-wraps its field and trailing content */
69
113
 
70
- .invis_input {
71
- visibility: hidden;
72
- position: absolute;
114
+ .input_with_postfix {
115
+ display: inline-flex;
116
+ width: fit-content;
117
+ max-width: 100%;
73
118
  }
74
119
 
75
- /* Textarea */
120
+ /* Native checkbox rendered as a toggle switch */
76
121
 
77
- .form_el textarea {
78
- position: relative;
79
- z-index: 1;
80
- min-height: 150px;
122
+ input.toggle_switch {
123
+ appearance: none;
124
+ -webkit-appearance: none;
125
+ box-sizing: border-box;
126
+ border: 0;
127
+ padding: 0;
128
+ width: calc(var(--toggle-switch-height) * 1.75);
129
+ height: var(--toggle-switch-height);
130
+ cursor: pointer;
131
+ transition:
132
+ background-color 0.15s ease-in-out,
133
+ outline-color 0.125s ease-in-out;
81
134
  }
82
135
 
83
- .form_el.in_modal textarea {
84
- width: 300px;
85
- max-width: 100%;
86
- resize: none;
136
+ input.toggle_switch.av_xxxs {
137
+ --toggle-switch-height: calc(1.5rem * 0.7142857);
138
+ }
139
+ input.toggle_switch.av_xs {
140
+ --toggle-switch-height: calc(var(--av-xsmall) * 0.7142857);
141
+ }
142
+ input.toggle_switch.av_sm {
143
+ --toggle-switch-height: calc(var(--av-small) * 0.7142857);
144
+ }
145
+ input.toggle_switch.av_df {
146
+ --toggle-switch-height: calc(var(--av-default) * 0.7142857);
147
+ }
148
+ input.toggle_switch.av_md {
149
+ --toggle-switch-height: calc(var(--av-medium) * 0.7142857);
150
+ }
151
+ input.toggle_switch.av_lg {
152
+ --toggle-switch-height: calc(var(--av-large) * 0.7142857);
153
+ }
154
+ input.toggle_switch.av_xl {
155
+ --toggle-switch-height: calc(var(--av-xlarge) * 0.7142857);
87
156
  }
88
157
 
89
- .form_el.in_modal_large textarea {
90
- width: 375px;
91
- max-width: 100%;
92
- min-height: 400px;
93
- resize: none;
158
+ input.toggle_switch:not(:checked) {
159
+ background-color: rgba(var(--color-darker-rgb), 0.1);
94
160
  }
95
161
 
96
- .form_el.fs textarea {
97
- width: 100% !important;
162
+ input.toggle_switch:not(:checked):hover {
163
+ background-color: rgba(var(--color-darker-rgb), 0.15);
98
164
  }
99
165
 
100
- .form_el .tx_virtualizer {
101
- position: absolute; z-index: -1;
102
- top: 0; left: 0; right: 0;
103
- visibility: hidden;
166
+ input.toggle_switch::after {
167
+ content: "";
168
+ position: absolute;
169
+ top: 10%;
170
+ left: 0;
171
+ height: 80%;
172
+ aspect-ratio: 1;
173
+ border-radius: 50%;
174
+ background-color: rgb(var(--color-bg));
175
+ box-shadow: 0 1px 3px rgba(var(--color-darker-rgb), 0.3);
176
+ transform: translateX(12.5%);
177
+ transition: transform 0.15s ease-in-out;
104
178
  }
105
179
 
106
- .form_el .tx_virtualizer:after {
107
- /* This allows trailing empty line breaks to be calculated */
108
- content: '.';
180
+ input.toggle_switch:checked::after {
181
+ transform: translateX(106.25%);
109
182
  }
110
183
 
111
- /* Label */
184
+ input.toggle_switch:disabled {
185
+ cursor: not-allowed;
186
+ opacity: 0.5;
187
+ }
112
188
 
113
- .form_el label .label_r .icon {
114
- transform: translateY(1px);
189
+ /* Input; focus, placeholder */
190
+
191
+ input.error,
192
+ textarea.error,
193
+ [contenteditable="true"].error,
194
+ .form_el.error .form_input,
195
+ .form_el .form_input.error {
196
+ border-color: rgb(var(--color-error)) !important;
197
+ background-color: rgba(var(--color-error-faded), 0.1) !important;
198
+ }
199
+ input.error:focus,
200
+ textarea.error:focus,
201
+ [contenteditable="true"].error:focus,
202
+ .form_el.error .form_input:focus,
203
+ .form_el .form_input.error:focus {
204
+ outline: 2px solid rgb(var(--color-error)) !important;
115
205
  }
116
206
 
117
- /* Fieldset, radio group */
207
+ input:not(.stock):not(.toggle_switch):focus,
208
+ .form_select:focus,
209
+ .form_select.active,
210
+ textarea:not(.stock):focus,
211
+ [contenteditable="true"]:not(.stock):focus,
212
+ .form_el input.focus:not(.toggle_switch),
213
+ .form_el.focused textarea.form_el,
214
+ .form_el.focused input:not(.toggle_switch),
215
+ .form_el.focused .form_select,
216
+ .form_el.focused textarea,
217
+ .form_el.error.focused .form_input,
218
+ .form_el.focused .form_input.error {
219
+ outline: 2px solid rgb(var(--color-main));
220
+ border-color: rgb(var(--color-main)) !important;
221
+ /* box-shadow: 0 0 20px rgba(0,0,0,.05); */
222
+ box-shadow: 0 0 40px rgba(var(--color-main), 0.1);
223
+ }
118
224
 
119
- fieldset {
120
- padding: 0;
121
- margin: 0;
122
- border: none;
225
+ input:is([type="checkbox"], [type="radio"]):focus:not(:focus-visible) {
226
+ outline: none;
227
+ box-shadow: none;
228
+ }
123
229
 
230
+ .form_input:not(.disabled):not(.error):hover,
231
+ .form_el:hover .form_input:not(.disabled):not(.error),
232
+ .form_el_hv:hover {
233
+ background-color: rgba(var(--color-main), 0.04);
124
234
  }
125
235
 
126
- fieldset input[type="radio"] {
127
- display: none;
236
+ input:not(.error):not(.disabled):not(.stock):not(.toggle_switch):focus,
237
+ .form_select:not(.error):not(.disabled):focus,
238
+ .form_select.active:not(.error):not(.disabled),
239
+ textarea:not(.error):not(.disabled):not(.stock):focus,
240
+ [contenteditable="true"]:not(.error):not(.disabled):not(.stock):focus,
241
+ .form_input:not(.disabled):not(.error):focus:hover,
242
+ .form_el.focused .form_input:not(.error):not(.disabled) {
243
+ /* background-color: rgba(var(--color-main), .075) !important; */
244
+ background-color: rgba(var(--color-main), 0.075);
128
245
  }
129
246
 
130
- .form_opt {
131
- padding: .3rem .3rem .4rem;
247
+ input.focus_bg:focus,
248
+ textarea.focus_bg:focus,
249
+ [contenteditable="true"].focus_bg:focus {
250
+ background-color: rgb(var(--color-bg)) !important;
132
251
  }
133
252
 
134
- .form_opt:hover {
135
- background-color: var(--opaque-default);
253
+ .form_not_allowed input,
254
+ .form_not_allowed textarea,
255
+ .form_not_allowed [role="button"] {
256
+ cursor: not-allowed !important;
136
257
  }
137
258
 
138
- .form_opt .ic_cnt {
139
- width: 25px;
259
+ .form_el:not(.disabled):hover .form_el_r,
260
+ .form_el:not(.disabled).focused .form_el_r {
261
+ background: linear-gradient(to left, var(--color-main-bg) 50%, rgba(var(--color-main), 0)) !important;
140
262
  }
141
263
 
142
- /* Clickable button at right; use this for inputs */
264
+ [contenteditable="true"]:empty:before {
265
+ content: attr(data-placeholder);
266
+ color: var(--color-text-light);
267
+ }
143
268
 
144
- .form_el.has_r input {
145
- padding-right: 3rem;
269
+ .form_el.c input,
270
+ .form_el.c .form_select {
271
+ text-align: center;
146
272
  }
147
273
 
148
- .form_el.has_r .form_el_r {
149
- position: absolute;
150
- top: 0; right: 0; bottom: 0;
151
- width: 3rem;
152
- padding-left: .5rem;
274
+ /* Input preset: lighter */
275
+
276
+ .form_el.lighter .form_input,
277
+ .form_el.lighter .tx_virtualizer {
278
+ border: solid 1px var(--color-darker-light);
153
279
  }
154
280
 
155
- .form_el.has_r .form_el_r.a_r {
156
- width: 3rem;
157
- text-decoration: underline;
158
- padding-left: 0;
159
- padding-right: .5875rem;
281
+ /* Input preset: subtle */
282
+
283
+ .form_el.subtle input,
284
+ .form_el.subtle .form_select {
285
+ width: 120px;
286
+ padding: 0.35rem;
160
287
  }
161
288
 
162
- .form_el_r {
163
- color: var(--color-text-medium);
289
+ /* Input preset; condensed */
290
+
291
+ .form_el.condensed {
292
+ margin-top: 0.9rem;
164
293
  }
165
294
 
166
- .form_el_r:hover {
167
- color: var(--color-text);
295
+ .form_el.condensed label {
296
+ position: absolute;
297
+ z-index: 5;
298
+ top: -9px;
299
+ left: 9px;
300
+ padding: 0 1px !important;
301
+ font-size: var(--text-xxsmall);
302
+ background-color: rgb(var(--color-bg));
168
303
  }
169
304
 
170
- .btn:active:not(:disabled) {
171
- transform: translateY(1px);
305
+ /* Textarea */
306
+
307
+ .form_el.fs textarea {
308
+ width: 100% !important;
172
309
  }
173
310
 
174
- /* Preset; none */
311
+ .form_el .tx_virtualizer {
312
+ position: absolute;
313
+ z-index: -1;
314
+ top: 0;
315
+ left: 0;
316
+ right: 0;
317
+ visibility: hidden;
318
+ /* Match native textarea wrapping, including indentation and unbroken URLs. */
319
+ white-space: pre-wrap;
320
+ overflow-wrap: break-word;
321
+ }
175
322
 
176
- .form_el.none input, .form_el.none textarea {
177
- border: none;
178
- background-color: transparent;
323
+ .form_el .tx_virtualizer:after {
324
+ /* This allows trailing empty line breaks to be calculated */
325
+ content: " ";
179
326
  }
180
327
 
181
- .form_el.none input:focus, .form_el.none textarea:focus {
182
- box-shadow: none;
328
+ /* Label */
329
+
330
+ .form_el label,
331
+ label.form_el {
332
+ color: var(--color-text-medium);
183
333
  }
184
334
 
185
- /* Preset: fill */
335
+ .form_el.focused label,
336
+ .form_el:has(input:focus) label,
337
+ .form_el:has(.form_select:focus) label,
338
+ .form_el:has(.form_select.active) label {
339
+ color: var(--color-text-bold);
340
+ }
186
341
 
187
- .form_el.fill input, .form_el.fill textarea {
188
- border: none;
189
- background-color: var(--color-bg-alt);
190
- /* border-radius: var(--radius-default); */
342
+ .form_el label .label_r .icon {
343
+ transform: translateY(1px);
191
344
  }
192
345
 
193
- /* Preset: fill large */
346
+ /* Fieldset, radio group */
194
347
 
195
- .form_el.fill_large input {
196
- border: none;
197
- background-color: var(--color-reverse-opaque);
198
- padding: var(--rem-default);
199
- font-size: var(--text-xlarge);
348
+ fieldset {
349
+ padding: 0;
350
+ margin: 0;
351
+ border: none;
200
352
  }
201
353
 
202
- .form_el.fill_large.has_r input {
203
- padding-right: 3.25rem;
354
+ fieldset legend {
355
+ padding: 0 2px;
356
+ margin-left: -2px;
204
357
  }
205
358
 
206
- .form_el.fill_large.has_r .form_el_r {
207
- right: .5rem;
359
+ fieldset input[type="radio"] {
360
+ display: none;
208
361
  }
209
362
 
210
- /* Preset: inside outline container */
363
+ /* Clickable button at right; use this for inputs */
211
364
 
212
- .form_el.inside_outline {
213
- /* This is the difference between common padding minus container padding: 1rem - .58 */
214
- padding: 0 .42rem;
365
+ .form_el.has_r .form_el_r {
366
+ position: absolute;
367
+ top: 1px;
368
+ right: 1px;
369
+ bottom: 1px;
370
+ width: 3.5rem;
371
+ padding-left: 1.5rem;
372
+ background: linear-gradient(to left, rgba(var(--color-bg), 1) 50%, rgba(var(--color-bg), 0));
215
373
  }
216
374
 
217
- .stripe_form_line {
218
- padding-bottom: .5rem;
219
- border-bottom: solid 1px var(--color-text-light);
375
+ .form_el.tiny.has_r .form_el_r {
376
+ width: 2.25rem;
377
+ padding-left: 0.15rem;
220
378
  }
221
379
 
222
- .form_el.inside_outline input {
223
- border: none;
224
- border-radius: 0;
225
- border-bottom: solid 1px var(--color-text-light);
226
- /* background-color: var(--color-bg-alt); */
227
- padding-top: 0; padding-left: 0; padding-right: 0;
228
- margin-bottom: .05rem;
229
- transform: translateY(-.1rem);
380
+ /* .active is for <PopOverButton /> active state, not ::active */
381
+ .active .form_el_r,
382
+ .focused .form_el_r,
383
+ .form_el_r.btn:hover {
384
+ color: var(--color-text);
230
385
  }
231
386
 
232
- .form_el.inside_outline input:focus {
233
- box-shadow: none;
234
- border-bottom-color: var(--color-text-bold)
387
+ /* Preset; none */
388
+
389
+ .form_el.none input,
390
+ .form_el.none .form_select,
391
+ .form_el.none textarea {
392
+ border: none;
393
+ background-color: transparent;
235
394
  }
236
395
 
237
- .form_el.inside_outline.error input {
238
- border-bottom-color: rgb(var(--color-error-active));
396
+ .form_el.none input:focus,
397
+ .form_el.none .form_select:focus,
398
+ .form_el.none .form_select.active,
399
+ .form_el.none textarea:focus {
400
+ box-shadow: none;
401
+ }
402
+
403
+ /* Preset: fill */
404
+
405
+ .form_el.fill input,
406
+ .form_el.fill .form_select,
407
+ .form_el.fill textarea {
408
+ border: none;
409
+ background-color: rgb(var(--color-bg-alt));
410
+ /* border-radius: var(--radius-default); */
411
+ }
412
+
413
+ /* Preset: inside outline container */
414
+
415
+ .form_el.inside_outline {
416
+ /* This is the difference between common padding minus container padding: 1rem - .58 */
417
+ padding: 0 0.42rem;
418
+ }
419
+
420
+ .form_el.inside_outline input,
421
+ .form_el.inside_outline .form_select {
422
+ border: none;
423
+ border-radius: 0;
424
+ border-bottom: solid 1px var(--color-darker-light);
425
+ /* background-color: rgb(var(--color-bg-alt)); */
426
+ padding-top: 0;
427
+ padding-left: 0;
428
+ padding-right: 0;
429
+ margin-bottom: 0.05rem;
430
+ transform: translateY(-0.1rem);
431
+ }
432
+
433
+ .form_el.inside_outline input:focus,
434
+ .form_el.inside_outline .form_select:focus,
435
+ .form_el.inside_outline .form_select.active {
436
+ box-shadow: none;
437
+ border-bottom-color: var(--color-text-bold);
438
+ }
439
+
440
+ .form_el.inside_outline.error input,
441
+ .form_el.inside_outline.error .form_select {
442
+ border-bottom-color: rgb(var(--color-error-active));
239
443
  }
240
444
 
241
445
  .form_cnt.outline .form_el.inside_outline:last-child {
242
- margin-bottom: .25rem;
446
+ margin-bottom: 0.25rem;
243
447
  }
244
448
 
245
449
  /* Inline button at right of search input (for enter key prompt) */
246
450
 
247
451
  .form_el_inline_btn {
248
- position: absolute;
249
- top: 50%;
250
- right: .55rem;
251
- /* Can't use 1px transform depressed effect becuase of the absolute positioning */
252
- transform: translateY(-50%) !important;
452
+ position: absolute;
453
+ top: 50%;
454
+ right: 0.55rem;
455
+ /* Can't use 1px transform depressed effect becuase of the absolute positioning */
456
+ transform: translateY(-50%) !important;
253
457
  }
254
458
 
255
459
  /* Full width button */
256
460
 
257
461
  .btn.fw {
258
- min-width: 70px;
259
- height: 2.64em;
260
- padding: 0 var(--rem-small);
261
- /* border-bottom-width: 4px; */
262
- /* background-color: var(--color-bg); */
462
+ min-width: 70px;
463
+ height: 2.64em;
464
+ padding: 0 var(--rem-small);
465
+ /* border-bottom-width: 4px; */
466
+ /* background-color: rgb(var(--color-bg)); */
263
467
  }
264
468
 
265
469
  .btn.full {
266
- width: 100%;
470
+ width: 100%;
267
471
  }
268
472
 
269
473
  .btn.fw .bl {
270
- width: 24px;
474
+ width: 24px;
271
475
  }
272
476
 
273
- .btn.fw:hover:not(:disabled), .btn.fw:active:not(:disabled) {
274
- background-color: var(--color-bg-alt);
477
+ .btn.fw:hover:not(:disabled),
478
+ .btn.fw:active:not(:disabled) {
479
+ background-color: rgb(var(--color-bg-alt));
275
480
  }
276
481
 
277
482
  .btn.fw:active:not(:disabled) {
278
- transform: translateY(1px);
483
+ transform: translateY(1px);
279
484
  }
280
485
 
281
486
  /* Emphasize preset */
282
487
 
283
488
  .btn.em {
284
- background-color: var(--color-solid);
285
- border: solid 2px var(--color-text-bold);
286
- box-shadow: 0 2px var(--color-text-bold);
287
- /* box-shadow: 0 2px var(--color-text), 0 2px 4px rgba(0,0,0,.1); */
489
+ background-color: var(--color-solid);
490
+ border: solid 2px var(--color-text-bold);
491
+ box-shadow: 0 2px var(--color-text-bold);
492
+ /* box-shadow: 0 2px var(--color-text), 0 2px 4px rgba(0,0,0,.1); */
288
493
  }
289
494
 
290
495
  .btn.em:hover {
291
- background-color: var(--color-solid-hover) !important;
496
+ background-color: var(--color-solid-hover) !important;
292
497
  }
293
498
 
294
- .btn.em:active, .btn.em:disabled {
295
- transform: translateY(2px);
296
- box-shadow: none;
499
+ /*.btn.em:active, .btn.em:disabled, .btn.em.disabled {*/
500
+ .btn.em:active:not(:disabled):not(.disabled),
501
+ .btn.em.loading:disabled,
502
+ .btn.em.loading.disabled {
503
+ transform: translateY(2px);
504
+ box-shadow: none;
297
505
  }
298
506
 
299
507
  .btn.em:active {
300
- background-color: var(--color-solid-active) !important;
508
+ background-color: var(--color-solid-active) !important;
301
509
  }
302
510
 
303
- .btn.em:disabled {
304
- background-color: var(--color-solid-hover) !important;
511
+ .btn.em:disabled,
512
+ .btn.em.disabled {
513
+ color: var(--color-text-bold) !important;
514
+ background-color: var(--color-solid-hover) !important;
305
515
  }
306
516
 
307
517
  /* Opaque preset */
308
518
 
309
- .btn.subtle, .btn.cl_err {
310
- background-color: rgba(0,0,0,.1);
519
+ .btn.subtle {
520
+ background-color: rgba(0, 0, 0, 0.1);
521
+ }
522
+
523
+ .btn.bg {
524
+ background-color: rgb(var(--color-bg));
525
+ }
526
+
527
+ a.btn.subtle,
528
+ a.btn.bg,
529
+ a.btn.outline {
530
+ color: inherit;
531
+ }
532
+
533
+ .btn.subtle:disabled,
534
+ .btn.subtle.disabled {
535
+ background-color: rgba(0, 0, 0, 0.064);
536
+ /* color: var(--color-text-medium); */
537
+ color: rgba(0, 0, 0, 0.275);
538
+ }
539
+
540
+ .btn.bg:disabled,
541
+ .btn.bg.disabled {
542
+ background-color: rgb(var(--color-bg-fade));
543
+ /* color: var(--color-text-medium); */
544
+ color: rgba(0, 0, 0, 0.275);
311
545
  }
312
546
 
313
- .btn.subtle:disabled {
314
- color: var(--color-text-medium);
547
+ .btn.subtle:not(:disabled):not(.disabled):hover {
548
+ background-color: rgba(0, 0, 0, 0.2);
315
549
  }
316
550
 
317
- .btn.subtle:not(:disabled):hover, .btn.cl_err:not(:disabled):hover {
318
- background-color: rgba(0,0,0,.2);
551
+ .btn.bg:not(:disabled):not(.disabled):hover {
552
+ background-color: rgb(var(--color-bg-alt)) !important;
319
553
  }
320
554
 
321
- .btn.subtle:not(:disabled):active, .btn.cl_err:not(:disabled):active {
322
- background-color: rgba(0,0,0,.25);
555
+ .btn.subtle:not(:disabled):not(.disabled):active {
556
+ background-color: rgba(0, 0, 0, 0.25);
557
+ }
558
+
559
+ .btn.bg:not(:disabled):not(.disabled):active {
560
+ background-color: rgb(var(--color-bg-active)) !important;
323
561
  }
324
562
 
325
563
  /* Outline */
326
564
 
327
565
  .btn.outline {
328
- border: solid 2px var(--color-text-light);
329
- background-color: var(--color-bg-alt);
566
+ border: solid 2px var(--color-darker-light);
567
+ background-color: rgb(var(--color-bg-alt));
330
568
  }
331
569
 
332
- .btn.outline:not(:disabled):hover {
333
- background-color: var(--color-bg-active);
570
+ .btn.outline.bg {
571
+ background-color: rgb(var(--color-bg));
334
572
  }
335
573
 
336
- .btn.outline:not(:disabled):active {
337
- background-color: var(--color-bg-medium);
574
+ .btn.outline:not(:disabled):not(.disabled):hover {
575
+ background-color: rgb(var(--color-bg-active));
338
576
  }
339
577
 
340
- /* Inline button */
341
-
342
- .btn.il {
343
- position: relative;
344
- padding: .35rem .5rem;
345
- border-radius: 4px;
578
+ .btn.outline:not(:disabled):not(.disabled):active {
579
+ background-color: rgb(var(--color-bg-medium));
346
580
  }
347
581
 
348
- /* Normal button */
582
+ /* Subtle outline */
349
583
 
350
- .btn.df {
351
- /* padding: .7rem .7rem .7rem; */
352
- padding: .58rem;
353
- border-radius: var(--radius-small);
584
+ .btn.outline_subtle {
585
+ box-shadow: inset 0 0 0 2px var(--color-darker-light);
354
586
  }
355
587
 
356
- .btn.df.ft_xs {
357
- padding: .3rem .45rem;
588
+ .btn.outline_subtle:not(:disabled):not(.disabled):hover {
589
+ background-color: var(--color-darker-soft);
358
590
  }
359
591
 
360
- /* Form break */
592
+ /* Inline button */
361
593
 
362
- .form_break {
363
- position: relative;
364
- color: var(--color-text-medium);
594
+ .btn.il {
595
+ position: relative;
596
+ padding: 0.35rem 0.5rem;
597
+ border-radius: 4px;
365
598
  }
366
599
 
367
- .form_break .line:before {
368
- content: '.';
369
- color: transparent;
600
+ /* Button sizes */
601
+
602
+ .btn.xs {
603
+ min-width: 48px;
604
+ padding: 0.3rem 0.4rem;
605
+ border-radius: var(--radius-small);
370
606
  }
371
607
 
372
- .form_break .text:before, .form_break .text:after, .form_break .line:after {
373
- content: ' ';
374
- position: absolute;
375
- top: 50%;
376
- height: 1px;
377
- background-color: var(--color-text-medium);
608
+ .btn.sm {
609
+ min-width: 52px;
610
+ padding: 0.35rem 0.45rem;
611
+ border-radius: var(--radius-small);
378
612
  }
379
613
 
380
- .form_break .line:after {
381
- left: 0; right: 0;
614
+ .btn.df {
615
+ min-width: 58px;
616
+ padding: 0.5rem 0.64rem;
617
+ border-radius: var(--radius-small);
382
618
  }
383
619
 
384
- .form_break .text:before {
385
- left: 0; right: 57%;
620
+ .btn.md {
621
+ padding: 0.7rem 1.05rem 0.7rem;
622
+ border-radius: var(--radius-small-wrap);
386
623
  }
387
624
 
388
- .form_break .text:after {
389
- left: 57%; right: 0;
625
+ .btn.md.ft_md,
626
+ .btn.md.ft_lg {
627
+ padding-bottom: 0.8rem;
628
+ }
629
+
630
+ .btn.lg {
631
+ padding: 0.9rem 1.2rem 0.9rem;
632
+ border-radius: var(--radius-small-wrap);
390
633
  }
391
634
 
392
635
  /* Side input button */
393
636
 
394
637
  .form_input_btn {
395
- align-self: stretch;
396
- padding: 0 .25rem;
397
- margin-left: .25rem;
398
- margin-right: .25rem;
638
+ align-self: stretch;
639
+ padding: 0 0.25rem;
640
+ margin-left: 0.25rem;
641
+ margin-right: 0.25rem;
399
642
  }
400
643
 
401
644
  .form_input_btn.r {
402
- margin-right: -.5rem;
645
+ margin-right: -0.5rem;
403
646
  }
404
647
 
405
648
  /* Alert count */
406
649
 
407
650
  .alert_ct {
408
- min-width: 18px; height: 18px;
409
- padding: 0 4px;
651
+ min-width: 18px;
652
+ height: 18px;
653
+ padding: 0 4px;
410
654
  }
411
655
 
412
656
  .form_input_btn .alert_ct {
413
- position: absolute;
414
- top: -2px; right: -4px;
657
+ position: absolute;
658
+ top: -2px;
659
+ right: -4px;
415
660
  }
416
661
 
417
662
  .form_el .alert_ct {
418
- position: absolute;
419
- top: -4px; right: -4px;
663
+ position: absolute;
664
+ top: -4px;
665
+ right: -4px;
420
666
  }
421
667
 
422
668
  /* Inline-block label (NOTE: must _not_ use vertical padding because this will affect line height) */
423
669
 
424
670
  .ib_label {
425
- position: relative;
426
- padding: 0 5px;
427
- margin: 0 2px 0 3px;
428
- line-height: 1;
671
+ position: relative;
672
+ padding: 0 5px;
673
+ margin: 0 2px 0 3px;
674
+ line-height: 1;
675
+ white-space: nowrap;
429
676
  }
430
677
 
431
678
  .ib_label .icon {
432
- margin: -5px -4px -3px;
433
- font-size: 1.6em;
679
+ font-size: 1rem;
680
+ margin: -4px -2px;
434
681
  }
435
682
 
436
683
  .ib_label .indicator {
437
- display: block;
438
- width: 10px;
439
- height: 1em;
440
- margin-left: 2px;
441
- margin-right: 5px;
442
- border-radius: 3px;
684
+ display: block;
685
+ margin-left: 2px;
686
+ margin-right: 5px;
443
687
  }
444
688
 
445
689
  .ib_label:first-child {
446
- margin-left: 0;
690
+ margin-left: 0;
447
691
  }
448
692
 
449
693
  .ib_label:last-child {
450
- margin-right: 0;
694
+ margin-right: 0;
451
695
  }
452
696
 
453
- .ib_label:before, .btn.il:before {
454
- content: ' ';
455
- position: absolute;
456
- top: 50%; left: 0; right: 0;
457
- height: 1.6rem;
458
- transform: translateY(-.85rem);
459
- border-radius: 5px;
697
+ .ib_label:before,
698
+ .btn.il:before {
699
+ content: " ";
700
+ position: absolute;
701
+ top: 50%;
702
+ left: 0;
703
+ right: 0;
704
+ height: 1.6rem;
705
+ transform: translateY(-0.85rem);
706
+ border-radius: 5px;
460
707
  }
461
708
 
462
- .ib_label.outline {
463
- transform: translateX(-1px);
709
+ .ib_label.outline:before {
710
+ border: solid 1px var(--color-darker-light);
464
711
  }
465
712
 
466
- .ib_label.outline:before {
467
- border: solid 1px var(--color-darker-light);
468
- }
713
+ .ib_label.outline.bg_bf:before {
714
+ border-color: var(--color-darker-medium);
715
+ }
716
+
717
+ /* Color indicators */
718
+
719
+ .ib_label .indicator,
720
+ .color_indicator {
721
+ width: 10px;
722
+ /*
723
+ height: 1em;
724
+ 14px is 1em of .ft_xs. I wanted it to be pixels so .ft_sm and .ft_xs has the same indicator height.
725
+ */
726
+ height: 14px;
727
+ border-radius: 3px;
728
+ }