@jsb188/css 1.0.4 → 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,447 +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-highlight), 0 4px 10px var(--color-highlight); */
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: var(--color-error);
54
- background-color: 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
+ }
341
+
342
+ .form_el label .label_r .icon {
343
+ transform: translateY(1px);
344
+ }
345
+
346
+ /* Fieldset, radio group */
186
347
 
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); */
348
+ fieldset {
349
+ padding: 0;
350
+ margin: 0;
351
+ border: none;
191
352
  }
192
353
 
193
- /* Preset: fill large */
354
+ fieldset legend {
355
+ padding: 0 2px;
356
+ margin-left: -2px;
357
+ }
194
358
 
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);
359
+ fieldset input[type="radio"] {
360
+ display: none;
200
361
  }
201
362
 
202
- .form_el.fill_large.has_r input {
203
- padding-right: 3.25rem;
363
+ /* Clickable button at right; use this for inputs */
364
+
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));
204
373
  }
205
374
 
206
- .form_el.fill_large.has_r .form_el_r {
207
- right: .5rem;
375
+ .form_el.tiny.has_r .form_el_r {
376
+ width: 2.25rem;
377
+ padding-left: 0.15rem;
208
378
  }
209
379
 
210
- /* Preset: inside outline container */
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);
385
+ }
211
386
 
212
- .form_el.inside_outline {
213
- /* This is the difference between common padding minus container padding: 1rem - .58 */
214
- padding: 0 .42rem;
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;
394
+ }
395
+
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); */
215
411
  }
216
412
 
217
- .stripe_form_line {
218
- padding-bottom: .5rem;
219
- border-bottom: solid 1px var(--color-text-light);
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;
220
418
  }
221
419
 
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);
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);
230
431
  }
231
432
 
232
- .form_el.inside_outline input:focus {
233
- box-shadow: none;
234
- border-bottom-color: var(--color-text-bold)
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);
235
438
  }
236
439
 
237
- .form_el.inside_outline.error input {
238
- border-bottom-color: var(--color-error-active);
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);
496
+ background-color: var(--color-solid-hover) !important;
292
497
  }
293
498
 
294
- .btn.em:active, .btn.em:disabled {
295
- background-color: var(--color-solid-active);
296
- transform: translateY(2px);
297
- 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;
298
505
  }
299
506
 
300
- .btn.em:disabled {
301
- background-color: var(--color-solid-hover);
507
+ .btn.em:active {
508
+ background-color: var(--color-solid-active) !important;
509
+ }
510
+
511
+ .btn.em:disabled,
512
+ .btn.em.disabled {
513
+ color: var(--color-text-bold) !important;
514
+ background-color: var(--color-solid-hover) !important;
302
515
  }
303
516
 
304
517
  /* Opaque preset */
305
518
 
306
- .btn.subtle, .btn.cl_error {
307
- 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);
308
545
  }
309
546
 
310
- .btn.subtle:disabled {
311
- color: var(--color-text-medium);
547
+ .btn.subtle:not(:disabled):not(.disabled):hover {
548
+ background-color: rgba(0, 0, 0, 0.2);
312
549
  }
313
550
 
314
- .btn.subtle:not(:disabled):hover, .btn.cl_error:not(:disabled):hover {
315
- background-color: rgba(0,0,0,.2);
551
+ .btn.bg:not(:disabled):not(.disabled):hover {
552
+ background-color: rgb(var(--color-bg-alt)) !important;
316
553
  }
317
554
 
318
- .btn.subtle:not(:disabled):active, .btn.cl_error:not(:disabled):active {
319
- 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;
320
561
  }
321
562
 
322
563
  /* Outline */
323
564
 
324
565
  .btn.outline {
325
- border: solid 2px var(--color-text-light);
326
- background-color: var(--color-bg-alt);
566
+ border: solid 2px var(--color-darker-light);
567
+ background-color: rgb(var(--color-bg-alt));
327
568
  }
328
569
 
329
- .btn.outline:not(:disabled):hover {
330
- background-color: var(--color-bg-active);
570
+ .btn.outline.bg {
571
+ background-color: rgb(var(--color-bg));
331
572
  }
332
573
 
333
- .btn.outline:not(:disabled):active {
334
- background-color: var(--color-bg-medium);
574
+ .btn.outline:not(:disabled):not(.disabled):hover {
575
+ background-color: rgb(var(--color-bg-active));
335
576
  }
336
577
 
337
- /* Inline button */
338
-
339
- .btn.il {
340
- position: relative;
341
- padding: .35rem .5rem;
342
- border-radius: 4px;
578
+ .btn.outline:not(:disabled):not(.disabled):active {
579
+ background-color: rgb(var(--color-bg-medium));
343
580
  }
344
581
 
345
- /* Normal button */
582
+ /* Subtle outline */
346
583
 
347
- .btn.df {
348
- /* padding: .7rem .7rem .7rem; */
349
- padding: .58rem;
350
- border-radius: var(--radius-small);
584
+ .btn.outline_subtle {
585
+ box-shadow: inset 0 0 0 2px var(--color-darker-light);
586
+ }
587
+
588
+ .btn.outline_subtle:not(:disabled):not(.disabled):hover {
589
+ background-color: var(--color-darker-soft);
351
590
  }
352
591
 
353
- .btn.df.ft_t {
354
- padding: .3rem .45rem;
592
+ /* Inline button */
593
+
594
+ .btn.il {
595
+ position: relative;
596
+ padding: 0.35rem 0.5rem;
597
+ border-radius: 4px;
355
598
  }
356
599
 
357
- /* Form break */
600
+ /* Button sizes */
358
601
 
359
- .form_break {
360
- position: relative;
361
- color: var(--color-text-medium);
602
+ .btn.xs {
603
+ min-width: 48px;
604
+ padding: 0.3rem 0.4rem;
605
+ border-radius: var(--radius-small);
362
606
  }
363
607
 
364
- .form_break .line:before {
365
- content: '.';
366
- color: transparent;
608
+ .btn.sm {
609
+ min-width: 52px;
610
+ padding: 0.35rem 0.45rem;
611
+ border-radius: var(--radius-small);
367
612
  }
368
613
 
369
- .form_break .text:before, .form_break .text:after, .form_break .line:after {
370
- content: ' ';
371
- position: absolute;
372
- top: 50%;
373
- height: 1px;
374
- background-color: var(--color-text-medium);
614
+ .btn.df {
615
+ min-width: 58px;
616
+ padding: 0.5rem 0.64rem;
617
+ border-radius: var(--radius-small);
375
618
  }
376
619
 
377
- .form_break .line:after {
378
- left: 0; right: 0;
620
+ .btn.md {
621
+ padding: 0.7rem 1.05rem 0.7rem;
622
+ border-radius: var(--radius-small-wrap);
379
623
  }
380
624
 
381
- .form_break .text:before {
382
- left: 0; right: 57%;
625
+ .btn.md.ft_md,
626
+ .btn.md.ft_lg {
627
+ padding-bottom: 0.8rem;
383
628
  }
384
629
 
385
- .form_break .text:after {
386
- left: 57%; right: 0;
630
+ .btn.lg {
631
+ padding: 0.9rem 1.2rem 0.9rem;
632
+ border-radius: var(--radius-small-wrap);
387
633
  }
388
634
 
389
635
  /* Side input button */
390
636
 
391
637
  .form_input_btn {
392
- align-self: stretch;
393
- padding: 0 .25rem;
394
- margin-left: .25rem;
395
- margin-right: .25rem;
638
+ align-self: stretch;
639
+ padding: 0 0.25rem;
640
+ margin-left: 0.25rem;
641
+ margin-right: 0.25rem;
396
642
  }
397
643
 
398
644
  .form_input_btn.r {
399
- margin-right: -.5rem;
645
+ margin-right: -0.5rem;
400
646
  }
401
647
 
402
648
  /* Alert count */
403
649
 
404
650
  .alert_ct {
405
- min-width: 18px; height: 18px;
406
- padding: 0 4px;
651
+ min-width: 18px;
652
+ height: 18px;
653
+ padding: 0 4px;
407
654
  }
408
655
 
409
656
  .form_input_btn .alert_ct {
410
- position: absolute;
411
- top: -2px; right: -4px;
657
+ position: absolute;
658
+ top: -2px;
659
+ right: -4px;
412
660
  }
413
661
 
414
662
  .form_el .alert_ct {
415
- position: absolute;
416
- top: -4px; right: -4px;
663
+ position: absolute;
664
+ top: -4px;
665
+ right: -4px;
417
666
  }
418
667
 
419
668
  /* Inline-block label (NOTE: must _not_ use vertical padding because this will affect line height) */
420
669
 
421
670
  .ib_label {
422
- position: relative;
423
- padding: 0 5px;
424
- margin: 0 5px;
671
+ position: relative;
672
+ padding: 0 5px;
673
+ margin: 0 2px 0 3px;
674
+ line-height: 1;
675
+ white-space: nowrap;
425
676
  }
426
677
 
427
678
  .ib_label .icon {
428
- margin: -5px -4px -3px;
429
- font-size: 1.5em;
679
+ font-size: 1rem;
680
+ margin: -4px -2px;
681
+ }
682
+
683
+ .ib_label .indicator {
684
+ display: block;
685
+ margin-left: 2px;
686
+ margin-right: 5px;
430
687
  }
431
688
 
432
689
  .ib_label:first-child {
433
- margin-left: 0;
690
+ margin-left: 0;
434
691
  }
435
692
 
436
693
  .ib_label:last-child {
437
- margin-right: 0;
694
+ margin-right: 0;
438
695
  }
439
696
 
440
- .ib_label:before, .btn.il:before {
441
- content: ' ';
442
- position: absolute;
443
- top: 50%; left: 0; right: 0;
444
- height: 1.5rem;
445
- transform: translateY(-.75rem);
446
- 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;
707
+ }
708
+
709
+ .ib_label.outline:before {
710
+ border: solid 1px var(--color-darker-light);
711
+ }
712
+
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;
447
728
  }