@bwui/css 0.1.3 → 0.1.5
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/dist/brickwork.css +405 -91
- package/package.json +4 -3
- package/src/components.css +2 -2
- package/src/document-a11y.css +15 -7
- package/src/layers/components.css +278 -70
- package/src/layout.css +2 -9
- package/src/primitives.css +3 -1
- package/src/reset.css +6 -1
- package/src/wave-e.css +1 -1
package/dist/brickwork.css
CHANGED
|
@@ -46,15 +46,41 @@
|
|
|
46
46
|
--bw-component-icon-size-lg: 1.5rem;
|
|
47
47
|
--bw-component-icon-size-xl: 2rem;
|
|
48
48
|
--bw-component-icon-size-2xl: 2.5rem;
|
|
49
|
-
--bw-size-
|
|
49
|
+
--bw-size-step-xs: 0.75;
|
|
50
|
+
--bw-size-step-sm: 0.875;
|
|
51
|
+
--bw-size-step-md: 1;
|
|
52
|
+
--bw-size-step-lg: 1.125;
|
|
53
|
+
--bw-size-step-xl: 1.25;
|
|
54
|
+
--bw-size-control-height-xs: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xs)));
|
|
55
|
+
--bw-size-control-height-sm: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-sm)));
|
|
50
56
|
--bw-size-control-height-md: var(--bw-density-control-height);
|
|
51
|
-
--bw-size-control-height-lg:
|
|
57
|
+
--bw-size-control-height-lg: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-lg)));
|
|
58
|
+
--bw-size-control-height-xl: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xl)));
|
|
59
|
+
--bw-size-control-padding-inline-xs: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xs));
|
|
60
|
+
--bw-size-control-padding-inline-sm: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-sm));
|
|
61
|
+
--bw-size-control-padding-inline-md: var(--bw-density-control-padding-inline);
|
|
62
|
+
--bw-size-control-padding-inline-lg: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-lg));
|
|
63
|
+
--bw-size-control-padding-inline-xl: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xl));
|
|
64
|
+
--bw-size-control-icon-xs: calc(var(--bw-component-icon-size-sm) * var(--bw-size-step-xs));
|
|
65
|
+
--bw-size-control-icon-sm: calc(var(--bw-component-icon-size-sm) * var(--bw-size-step-sm));
|
|
66
|
+
--bw-size-control-icon-md: var(--bw-component-icon-size-sm);
|
|
67
|
+
--bw-size-control-icon-lg: calc(var(--bw-component-icon-size-sm) * var(--bw-size-step-lg));
|
|
68
|
+
--bw-size-control-icon-xl: calc(var(--bw-component-icon-size-sm) * var(--bw-size-step-xl));
|
|
69
|
+
--bw-size-control-gap-xs: var(--bw-space-1-5);
|
|
70
|
+
--bw-size-control-gap-sm: var(--bw-space-2);
|
|
71
|
+
--bw-size-control-gap-md: var(--bw-space-2);
|
|
72
|
+
--bw-size-control-gap-lg: var(--bw-space-3);
|
|
73
|
+
--bw-size-control-gap-xl: var(--bw-space-3);
|
|
52
74
|
--bw-size-touch-target-min: 2.75rem;
|
|
53
75
|
--bw-size-max-width-prose: 65ch;
|
|
54
76
|
--bw-size-max-width-form: 32rem;
|
|
55
77
|
--bw-size-max-width-modal-sm: 28rem;
|
|
56
78
|
--bw-size-max-width-modal-md: 32rem;
|
|
57
79
|
--bw-size-max-width-modal-lg: 48rem;
|
|
80
|
+
--bw-control-height: var(--bw-size-control-height-md);
|
|
81
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-md);
|
|
82
|
+
--bw-control-icon-size: var(--bw-size-control-icon-md);
|
|
83
|
+
--bw-control-gap: var(--bw-size-control-gap-md);
|
|
58
84
|
--bw-component-icon-size-sm: 1rem;
|
|
59
85
|
--bw-component-icon-size-md: 1.25rem;
|
|
60
86
|
--bw-component-icon-size-lg: 1.5rem;
|
|
@@ -601,6 +627,30 @@
|
|
|
601
627
|
--bw-density-section-gap: 2rem;
|
|
602
628
|
--bw-density-card-padding: 1rem;
|
|
603
629
|
--bw-density-page-gutter-inline: 1.5rem;
|
|
630
|
+
--bw-size-control-height-xs: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xs)));
|
|
631
|
+
--bw-size-control-height-sm: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-sm)));
|
|
632
|
+
--bw-size-control-height-md: var(--bw-density-control-height);
|
|
633
|
+
--bw-size-control-height-lg: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-lg)));
|
|
634
|
+
--bw-size-control-height-xl: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xl)));
|
|
635
|
+
--bw-size-control-padding-inline-xs: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xs));
|
|
636
|
+
--bw-size-control-padding-inline-sm: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-sm));
|
|
637
|
+
--bw-size-control-padding-inline-md: var(--bw-density-control-padding-inline);
|
|
638
|
+
--bw-size-control-padding-inline-lg: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-lg));
|
|
639
|
+
--bw-size-control-padding-inline-xl: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xl));
|
|
640
|
+
--bw-size-control-icon-xs: calc(var(--bw-component-icon-size-sm) * var(--bw-size-step-xs));
|
|
641
|
+
--bw-size-control-icon-sm: calc(var(--bw-component-icon-size-sm) * var(--bw-size-step-sm));
|
|
642
|
+
--bw-size-control-icon-md: var(--bw-component-icon-size-sm);
|
|
643
|
+
--bw-size-control-icon-lg: calc(var(--bw-component-icon-size-sm) * var(--bw-size-step-lg));
|
|
644
|
+
--bw-size-control-icon-xl: calc(var(--bw-component-icon-size-sm) * var(--bw-size-step-xl));
|
|
645
|
+
--bw-size-control-gap-xs: var(--bw-space-1-5);
|
|
646
|
+
--bw-size-control-gap-sm: var(--bw-space-2);
|
|
647
|
+
--bw-size-control-gap-md: var(--bw-space-2);
|
|
648
|
+
--bw-size-control-gap-lg: var(--bw-space-3);
|
|
649
|
+
--bw-size-control-gap-xl: var(--bw-space-3);
|
|
650
|
+
--bw-control-height: var(--bw-size-control-height-md);
|
|
651
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-md);
|
|
652
|
+
--bw-control-icon-size: var(--bw-size-control-icon-md);
|
|
653
|
+
--bw-control-gap: var(--bw-size-control-gap-md);
|
|
604
654
|
}
|
|
605
655
|
|
|
606
656
|
[data-density="compact"] {
|
|
@@ -617,6 +667,30 @@
|
|
|
617
667
|
--bw-density-section-gap: 1.5rem;
|
|
618
668
|
--bw-density-card-padding: 0.75rem;
|
|
619
669
|
--bw-density-page-gutter-inline: 1rem;
|
|
670
|
+
--bw-size-control-height-xs: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xs)));
|
|
671
|
+
--bw-size-control-height-sm: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-sm)));
|
|
672
|
+
--bw-size-control-height-md: var(--bw-density-control-height);
|
|
673
|
+
--bw-size-control-height-lg: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-lg)));
|
|
674
|
+
--bw-size-control-height-xl: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xl)));
|
|
675
|
+
--bw-size-control-padding-inline-xs: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xs));
|
|
676
|
+
--bw-size-control-padding-inline-sm: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-sm));
|
|
677
|
+
--bw-size-control-padding-inline-md: var(--bw-density-control-padding-inline);
|
|
678
|
+
--bw-size-control-padding-inline-lg: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-lg));
|
|
679
|
+
--bw-size-control-padding-inline-xl: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xl));
|
|
680
|
+
--bw-size-control-icon-xs: calc(var(--bw-component-icon-size-sm) * var(--bw-size-step-xs));
|
|
681
|
+
--bw-size-control-icon-sm: calc(var(--bw-component-icon-size-sm) * var(--bw-size-step-sm));
|
|
682
|
+
--bw-size-control-icon-md: var(--bw-component-icon-size-sm);
|
|
683
|
+
--bw-size-control-icon-lg: calc(var(--bw-component-icon-size-sm) * var(--bw-size-step-lg));
|
|
684
|
+
--bw-size-control-icon-xl: calc(var(--bw-component-icon-size-sm) * var(--bw-size-step-xl));
|
|
685
|
+
--bw-size-control-gap-xs: var(--bw-space-1-5);
|
|
686
|
+
--bw-size-control-gap-sm: var(--bw-space-2);
|
|
687
|
+
--bw-size-control-gap-md: var(--bw-space-2);
|
|
688
|
+
--bw-size-control-gap-lg: var(--bw-space-3);
|
|
689
|
+
--bw-size-control-gap-xl: var(--bw-space-3);
|
|
690
|
+
--bw-control-height: var(--bw-size-control-height-md);
|
|
691
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-md);
|
|
692
|
+
--bw-control-icon-size: var(--bw-size-control-icon-md);
|
|
693
|
+
--bw-control-gap: var(--bw-size-control-gap-md);
|
|
620
694
|
}
|
|
621
695
|
|
|
622
696
|
[data-density="spacious"] {
|
|
@@ -633,6 +707,30 @@
|
|
|
633
707
|
--bw-density-section-gap: 3rem;
|
|
634
708
|
--bw-density-card-padding: 1.5rem;
|
|
635
709
|
--bw-density-page-gutter-inline: 2rem;
|
|
710
|
+
--bw-size-control-height-xs: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xs)));
|
|
711
|
+
--bw-size-control-height-sm: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-sm)));
|
|
712
|
+
--bw-size-control-height-md: var(--bw-density-control-height);
|
|
713
|
+
--bw-size-control-height-lg: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-lg)));
|
|
714
|
+
--bw-size-control-height-xl: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xl)));
|
|
715
|
+
--bw-size-control-padding-inline-xs: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xs));
|
|
716
|
+
--bw-size-control-padding-inline-sm: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-sm));
|
|
717
|
+
--bw-size-control-padding-inline-md: var(--bw-density-control-padding-inline);
|
|
718
|
+
--bw-size-control-padding-inline-lg: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-lg));
|
|
719
|
+
--bw-size-control-padding-inline-xl: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xl));
|
|
720
|
+
--bw-size-control-icon-xs: calc(var(--bw-component-icon-size-sm) * var(--bw-size-step-xs));
|
|
721
|
+
--bw-size-control-icon-sm: calc(var(--bw-component-icon-size-sm) * var(--bw-size-step-sm));
|
|
722
|
+
--bw-size-control-icon-md: var(--bw-component-icon-size-sm);
|
|
723
|
+
--bw-size-control-icon-lg: calc(var(--bw-component-icon-size-sm) * var(--bw-size-step-lg));
|
|
724
|
+
--bw-size-control-icon-xl: calc(var(--bw-component-icon-size-sm) * var(--bw-size-step-xl));
|
|
725
|
+
--bw-size-control-gap-xs: var(--bw-space-1-5);
|
|
726
|
+
--bw-size-control-gap-sm: var(--bw-space-2);
|
|
727
|
+
--bw-size-control-gap-md: var(--bw-space-2);
|
|
728
|
+
--bw-size-control-gap-lg: var(--bw-space-3);
|
|
729
|
+
--bw-size-control-gap-xl: var(--bw-space-3);
|
|
730
|
+
--bw-control-height: var(--bw-size-control-height-md);
|
|
731
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-md);
|
|
732
|
+
--bw-control-icon-size: var(--bw-size-control-icon-md);
|
|
733
|
+
--bw-control-gap: var(--bw-size-control-gap-md);
|
|
636
734
|
}
|
|
637
735
|
|
|
638
736
|
:root {
|
|
@@ -763,7 +861,12 @@ body {
|
|
|
763
861
|
font-size: var(--bw-text-body-md-size, 1rem);
|
|
764
862
|
-webkit-font-smoothing: antialiased;
|
|
765
863
|
color: var(--bw-color-fg);
|
|
766
|
-
|
|
864
|
+
/* Page ground (icvoss/brickwork#26): the surface token. A prior
|
|
865
|
+
* var(--bw-color-bg) named a token no theme defines, so the declaration was
|
|
866
|
+
* invalid at computed-value time and the body stayed transparent (a white
|
|
867
|
+
* canvas under dark text colours). Surface is white in light and near-black
|
|
868
|
+
* in dark, so light output is unchanged and dark now paints its own ground. */
|
|
869
|
+
background-color: var(--bw-color-surface);
|
|
767
870
|
}
|
|
768
871
|
|
|
769
872
|
img,
|
|
@@ -947,8 +1050,10 @@ a:hover {
|
|
|
947
1050
|
.bw-fg-subtle {
|
|
948
1051
|
color: var(--bw-color-fg-subtle);
|
|
949
1052
|
}
|
|
1053
|
+
/* Page ground; the same token as the body (icvoss/brickwork#26). There is no
|
|
1054
|
+
* --bw-color-bg token, so this resolves to the surface role. */
|
|
950
1055
|
.bw-bg {
|
|
951
|
-
background-color: var(--bw-color-
|
|
1056
|
+
background-color: var(--bw-color-surface);
|
|
952
1057
|
}
|
|
953
1058
|
.bw-surface {
|
|
954
1059
|
background-color: var(--bw-color-surface);
|
|
@@ -1076,15 +1181,8 @@ a:hover {
|
|
|
1076
1181
|
text-transform: uppercase;
|
|
1077
1182
|
}
|
|
1078
1183
|
|
|
1079
|
-
/*
|
|
1080
|
-
.bw-btn--
|
|
1081
|
-
background-color: var(--bw-color-accent);
|
|
1082
|
-
color: var(--bw-color-accent-fg);
|
|
1083
|
-
border-color: transparent;
|
|
1084
|
-
}
|
|
1085
|
-
.bw-btn--solid:hover {
|
|
1086
|
-
background-color: var(--bw-color-accent-hover, var(--bw-color-accent));
|
|
1087
|
-
}
|
|
1184
|
+
/* .bw-btn--solid (the early-draft name of primary) is a deprecated alias of
|
|
1185
|
+
* .bw-btn--primary and lives with the button rules in layers/components.css. */
|
|
1088
1186
|
|
|
1089
1187
|
|
|
1090
1188
|
/* ==== layer: shell ==== */
|
|
@@ -3124,16 +3222,32 @@ a:hover {
|
|
|
3124
3222
|
* Logical CSS properties throughout (RTL via `dir`). Nothing here needs JS.
|
|
3125
3223
|
*/
|
|
3126
3224
|
|
|
3127
|
-
/* --- Buttons
|
|
3225
|
+
/* --- Buttons (docs/components/button.md) ----------------------------------- */
|
|
3226
|
+
|
|
3227
|
+
/* Operable guard. A state rule (hover, press) applies only to a control that is
|
|
3228
|
+
* operable and not busy: not the .bw-btn--disabled class (the non-button
|
|
3229
|
+
* elements), not :disabled (a real <button>), not aria-disabled, not
|
|
3230
|
+
* aria-busy. :not() takes the specificity of its most specific argument, so
|
|
3231
|
+
* the guard weighs the same as the single :not(.bw-btn--disabled) it replaces
|
|
3232
|
+
* and no existing cascade relationship moves. The resting shadow rules use a
|
|
3233
|
+
* narrower guard (not disabled, but a busy control keeps its resting shadow).
|
|
3234
|
+
* Before this guard a disabled or loading <button> still took the hover fill,
|
|
3235
|
+
* ring and (for ghost) the full ink: .bw-btn:disabled weighs 0,2,0 and the
|
|
3236
|
+
* hover rules weighed 0,3,0 (GAP-BTN-1). */
|
|
3128
3237
|
|
|
3129
3238
|
.bw-btn {
|
|
3130
3239
|
display: inline-flex;
|
|
3131
3240
|
align-items: center;
|
|
3132
3241
|
justify-content: center;
|
|
3133
|
-
|
|
3242
|
+
/* ADR-126 section 4: the button reads only the four control role variables.
|
|
3243
|
+
* They are declared on :root and in every [data-density] block (md at the
|
|
3244
|
+
* density in force) and are inherited here, so a bare .bw-btn is md, a size
|
|
3245
|
+
* class re-points them, and a control container can set one step for its
|
|
3246
|
+
* children. The button never reads a density or step token itself. */
|
|
3247
|
+
gap: var(--bw-control-gap);
|
|
3134
3248
|
padding-block: 0;
|
|
3135
|
-
padding-inline: var(--bw-
|
|
3136
|
-
block-size: var(--bw-
|
|
3249
|
+
padding-inline: var(--bw-control-padding-inline);
|
|
3250
|
+
block-size: var(--bw-control-height);
|
|
3137
3251
|
border: var(--bw-size-border-hairline) solid transparent;
|
|
3138
3252
|
border-radius: var(--bw-component-button-radius);
|
|
3139
3253
|
font: inherit;
|
|
@@ -3142,6 +3256,9 @@ a:hover {
|
|
|
3142
3256
|
font-weight: var(--bw-text-label-weight);
|
|
3143
3257
|
line-height: var(--bw-text-label-line-height);
|
|
3144
3258
|
letter-spacing: var(--bw-text-label-tracking);
|
|
3259
|
+
/* One line, always (BTN-014): the block size is fixed, so a wrapped label
|
|
3260
|
+
* would spill out of the control (GAP-BTN-4). */
|
|
3261
|
+
white-space: nowrap;
|
|
3145
3262
|
cursor: pointer;
|
|
3146
3263
|
text-decoration: none;
|
|
3147
3264
|
transition:
|
|
@@ -3149,37 +3266,83 @@ a:hover {
|
|
|
3149
3266
|
var(--bw-transition-shadow),
|
|
3150
3267
|
var(--bw-transition-transform);
|
|
3151
3268
|
}
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3269
|
+
/* The reset underlines every a:hover (0,1,1), which outweighs the 0,1,0 above,
|
|
3270
|
+
* so a link-button underlined on hover (GAP-BTN-2). */
|
|
3271
|
+
.bw-btn:hover {
|
|
3272
|
+
text-decoration: none;
|
|
3155
3273
|
}
|
|
3156
|
-
/*
|
|
3157
|
-
*
|
|
3158
|
-
*
|
|
3159
|
-
* base
|
|
3160
|
-
*
|
|
3161
|
-
*
|
|
3162
|
-
*
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3274
|
+
/* Size classes (ADR-125 section 6, ADR-126 section 4): the grammar is
|
|
3275
|
+
* bw-<component>--size-<step>, and a size class only re-points the four control
|
|
3276
|
+
* role variables at the resolved step tokens. The step tokens are the density
|
|
3277
|
+
* control base times the kit-wide multiplier (--bw-size-step-*), so every
|
|
3278
|
+
* density keeps three distinct heights; no rule here computes a multiplier.
|
|
3279
|
+
* xs and xl exist in the token scale and Button does not ship them (BTN-003).
|
|
3280
|
+
*
|
|
3281
|
+
* The bare spelling (bw-btn--sm, and the same for gauge, icon, modal,
|
|
3282
|
+
* slide-over, stat and stat-comparison) is DEPRECATED. Both selectors stay in
|
|
3283
|
+
* one grouped rule for the deprecation window; the bare ones are removed in
|
|
3284
|
+
* the next major of django-brickwork and in the @bwui/css release shipped with
|
|
3285
|
+
* it. Templates, React, Vue and the gallery emit the new class.
|
|
3286
|
+
*
|
|
3287
|
+
* md has its own rule (icvoss/django-brickwork#130) so the class that markup
|
|
3288
|
+
* emits is named in the stylesheet, and so a button that names md keeps md
|
|
3289
|
+
* inside a container that scoped a different step. */
|
|
3290
|
+
.bw-btn--sm, .bw-btn--size-sm {
|
|
3291
|
+
--bw-control-height: var(--bw-size-control-height-sm);
|
|
3292
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-sm);
|
|
3293
|
+
--bw-control-icon-size: var(--bw-size-control-icon-sm);
|
|
3294
|
+
--bw-control-gap: var(--bw-size-control-gap-sm);
|
|
3295
|
+
}
|
|
3296
|
+
.bw-btn--md, .bw-btn--size-md {
|
|
3297
|
+
--bw-control-height: var(--bw-size-control-height-md);
|
|
3298
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-md);
|
|
3299
|
+
--bw-control-icon-size: var(--bw-size-control-icon-md);
|
|
3300
|
+
--bw-control-gap: var(--bw-size-control-gap-md);
|
|
3301
|
+
}
|
|
3302
|
+
.bw-btn--lg, .bw-btn--size-lg {
|
|
3303
|
+
--bw-control-height: var(--bw-size-control-height-lg);
|
|
3304
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-lg);
|
|
3305
|
+
--bw-control-icon-size: var(--bw-size-control-icon-lg);
|
|
3306
|
+
--bw-control-gap: var(--bw-size-control-gap-lg);
|
|
3307
|
+
}
|
|
3308
|
+
/* The glyph and the label are one line of content. The icon is a bw-icon, and
|
|
3309
|
+
* a bare .bw-icon (wave-e) paints a raised box and a muted ink, which showed
|
|
3310
|
+
* as a white square and a grey glyph on a primary button (GAP-BTN-3). Inside
|
|
3311
|
+
* a button the icon is a plain glyph in the button's own ink. Two classes
|
|
3312
|
+
* outrank .bw-icon whatever the layer order. */
|
|
3313
|
+
.bw-btn .bw-btn__icon {
|
|
3314
|
+
background: transparent;
|
|
3315
|
+
border-radius: 0;
|
|
3316
|
+
color: inherit;
|
|
3166
3317
|
}
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3318
|
+
/* The glyph and the busy spinner follow the control's step through the role
|
|
3319
|
+
* variable (ADR-125 section 5: an icon inside a control follows its step). The
|
|
3320
|
+
* box is set directly, not through --bw-icon-size, because {% bw_icon %} writes
|
|
3321
|
+
* that custom property inline and an inline declaration would outrank this
|
|
3322
|
+
* rule. Markup in a button carries no inline size. */
|
|
3323
|
+
.bw-btn .bw-btn__icon,
|
|
3324
|
+
.bw-btn .bw-spinner {
|
|
3325
|
+
inline-size: var(--bw-control-icon-size);
|
|
3326
|
+
block-size: var(--bw-control-icon-size);
|
|
3170
3327
|
}
|
|
3171
3328
|
/* Solid buttons carry a border in their own hue (0.7.0 craft): 80% of the fill
|
|
3172
3329
|
* toward black is the Radix solid-button edge, a shade the fill visibly sits
|
|
3173
3330
|
* inside (decorative against the fill at 1.59:1 light / 1.73:1 dark; it also
|
|
3174
3331
|
* defines the button against the surface at 8.10:1 / 4.12:1 for primary and
|
|
3175
3332
|
* 7.74:1 / 3.00:1 for danger). The edge deliberately outlives hover: the
|
|
3176
|
-
* hover fill (89% toward black) stays lighter than the 80% edge.
|
|
3177
|
-
|
|
3333
|
+
* hover fill (89% toward black) stays lighter than the 80% edge.
|
|
3334
|
+
*
|
|
3335
|
+
* .bw-btn--solid is the early-draft name of primary. It is DEPRECATED, kept
|
|
3336
|
+
* here as an alias through :is() (class weight) for the window ADR-125 sets
|
|
3337
|
+
* for the bare size classes, and removed with them. Its old standalone rule
|
|
3338
|
+
* read --bw-color-accent-fg, which is not a token, so it needed a per-page
|
|
3339
|
+
* shim (GAP-BTN-6). */
|
|
3340
|
+
:is(.bw-btn--primary, .bw-btn--solid) {
|
|
3178
3341
|
background: var(--bw-color-accent);
|
|
3179
3342
|
color: var(--bw-color-fg-on-accent);
|
|
3180
3343
|
border-color: color-mix(in oklab, var(--bw-color-accent) 80%, black);
|
|
3181
3344
|
}
|
|
3182
|
-
.bw-btn--primary:not(.bw-btn--disabled):hover {
|
|
3345
|
+
:is(.bw-btn--primary, .bw-btn--solid):not(.bw-btn--disabled, :disabled, [aria-disabled="true"], [aria-busy="true"]):hover {
|
|
3183
3346
|
background: var(--bw-color-accent-hover);
|
|
3184
3347
|
box-shadow: var(--bw-component-button-elevation-hover), inset 0 1px 0 0 oklch(1 0 0 / 0.12);
|
|
3185
3348
|
transform: translateY(var(--bw-component-button-hover-translate));
|
|
@@ -3193,10 +3356,10 @@ a:hover {
|
|
|
3193
3356
|
color: var(--bw-color-fg);
|
|
3194
3357
|
border-color: var(--bw-color-border);
|
|
3195
3358
|
}
|
|
3196
|
-
.bw-btn--secondary:not(.bw-btn--disabled) {
|
|
3359
|
+
.bw-btn--secondary:not(.bw-btn--disabled, :disabled:not([aria-busy="true"]), [aria-disabled="true"]:not([aria-busy="true"])) {
|
|
3197
3360
|
box-shadow: var(--bw-component-button-elevation);
|
|
3198
3361
|
}
|
|
3199
|
-
.bw-btn--secondary:not(.bw-btn--disabled):hover {
|
|
3362
|
+
.bw-btn--secondary:not(.bw-btn--disabled, :disabled, [aria-disabled="true"], [aria-busy="true"]):hover {
|
|
3200
3363
|
border-color: var(--bw-color-border-strong);
|
|
3201
3364
|
background-color: var(--bw-color-surface-sunken);
|
|
3202
3365
|
box-shadow: var(--bw-component-button-elevation-hover);
|
|
@@ -3208,7 +3371,7 @@ a:hover {
|
|
|
3208
3371
|
* weight; steps up to full fg on hover. */
|
|
3209
3372
|
color: var(--bw-color-fg-muted);
|
|
3210
3373
|
}
|
|
3211
|
-
.bw-btn--ghost:not(.bw-btn--disabled):hover {
|
|
3374
|
+
.bw-btn--ghost:not(.bw-btn--disabled, :disabled, [aria-disabled="true"], [aria-busy="true"]):hover {
|
|
3212
3375
|
background-color: var(--bw-state-hover-overlay);
|
|
3213
3376
|
color: var(--bw-color-fg);
|
|
3214
3377
|
}
|
|
@@ -3218,7 +3381,7 @@ a:hover {
|
|
|
3218
3381
|
/* Same 80%-toward-black edge as primary, in the danger hue (ratios above). */
|
|
3219
3382
|
border-color: color-mix(in oklab, var(--bw-color-danger) 80%, black);
|
|
3220
3383
|
}
|
|
3221
|
-
.bw-btn--danger:not(.bw-btn--disabled):hover {
|
|
3384
|
+
.bw-btn--danger:not(.bw-btn--disabled, :disabled, [aria-disabled="true"], [aria-busy="true"]):hover {
|
|
3222
3385
|
background-image: linear-gradient(var(--bw-state-hover-overlay), var(--bw-state-hover-overlay));
|
|
3223
3386
|
box-shadow: var(--bw-component-button-elevation-hover), inset 0 1px 0 0 oklch(1 0 0 / 0.12);
|
|
3224
3387
|
transform: translateY(var(--bw-component-button-hover-translate));
|
|
@@ -3226,12 +3389,12 @@ a:hover {
|
|
|
3226
3389
|
/* Filled action buttons carry physical weight: resting elevation plus a faint
|
|
3227
3390
|
* top bevel; pressing swaps to an inset shadow so the button visibly sinks.
|
|
3228
3391
|
* Elevation is the per-button token (#649); the inset highlight is craft. */
|
|
3229
|
-
.bw-btn--primary:not(.bw-btn--disabled),
|
|
3230
|
-
.bw-btn--danger:not(.bw-btn--disabled) {
|
|
3392
|
+
:is(.bw-btn--primary, .bw-btn--solid):not(.bw-btn--disabled, :disabled:not([aria-busy="true"]), [aria-disabled="true"]:not([aria-busy="true"])),
|
|
3393
|
+
.bw-btn--danger:not(.bw-btn--disabled, :disabled:not([aria-busy="true"]), [aria-disabled="true"]:not([aria-busy="true"])) {
|
|
3231
3394
|
box-shadow: var(--bw-component-button-elevation), inset 0 1px 0 0 oklch(1 0 0 / 0.12);
|
|
3232
3395
|
}
|
|
3233
|
-
.bw-btn--primary:not(.bw-btn--disabled):active,
|
|
3234
|
-
.bw-btn--danger:not(.bw-btn--disabled):active {
|
|
3396
|
+
:is(.bw-btn--primary, .bw-btn--solid):not(.bw-btn--disabled, :disabled, [aria-disabled="true"], [aria-busy="true"]):active,
|
|
3397
|
+
.bw-btn--danger:not(.bw-btn--disabled, :disabled, [aria-disabled="true"], [aria-busy="true"]):active {
|
|
3235
3398
|
box-shadow: inset 0 1px 2px 0 oklch(0 0 0 / 0.2);
|
|
3236
3399
|
transform: none;
|
|
3237
3400
|
}
|
|
@@ -3240,12 +3403,12 @@ a:hover {
|
|
|
3240
3403
|
* hovers so it wins the background-image cascade; instant so the press reads
|
|
3241
3404
|
* immediately. Ghost is excluded (its states are solid overlay fills, so a
|
|
3242
3405
|
* stacked image would double the tint) and gets its own solid active fill. */
|
|
3243
|
-
.bw-btn:not(.bw-btn--disabled):not(.bw-btn--ghost):active {
|
|
3406
|
+
.bw-btn:not(.bw-btn--disabled, :disabled, [aria-disabled="true"], [aria-busy="true"]):not(.bw-btn--ghost):active {
|
|
3244
3407
|
background-image: linear-gradient(var(--bw-state-active-overlay), var(--bw-state-active-overlay));
|
|
3245
3408
|
transition-duration: var(--bw-duration-instant);
|
|
3246
3409
|
transform: none;
|
|
3247
3410
|
}
|
|
3248
|
-
.bw-btn--ghost:not(.bw-btn--disabled):active {
|
|
3411
|
+
.bw-btn--ghost:not(.bw-btn--disabled, :disabled, [aria-disabled="true"], [aria-busy="true"]):active {
|
|
3249
3412
|
background-color: var(--bw-state-active-overlay);
|
|
3250
3413
|
background-image: none;
|
|
3251
3414
|
transition-duration: var(--bw-duration-instant);
|
|
@@ -3253,28 +3416,36 @@ a:hover {
|
|
|
3253
3416
|
/* Hover-lift is opt-in via --bw-component-button-hover-translate (#649).
|
|
3254
3417
|
* Prefer no transform when the user asks for reduced motion. */
|
|
3255
3418
|
@media (prefers-reduced-motion: reduce) {
|
|
3256
|
-
.bw-btn--primary:not(.bw-btn--disabled):hover,
|
|
3257
|
-
.bw-btn--secondary:not(.bw-btn--disabled):hover,
|
|
3258
|
-
.bw-btn--danger:not(.bw-btn--disabled):hover {
|
|
3419
|
+
:is(.bw-btn--primary, .bw-btn--solid):not(.bw-btn--disabled, :disabled, [aria-disabled="true"], [aria-busy="true"]):hover,
|
|
3420
|
+
.bw-btn--secondary:not(.bw-btn--disabled, :disabled, [aria-disabled="true"], [aria-busy="true"]):hover,
|
|
3421
|
+
.bw-btn--danger:not(.bw-btn--disabled, :disabled, [aria-disabled="true"], [aria-busy="true"]):hover {
|
|
3259
3422
|
transform: none;
|
|
3260
3423
|
}
|
|
3261
3424
|
}
|
|
3262
3425
|
.bw-btn--icon-only {
|
|
3263
|
-
inline-size: var(--bw-
|
|
3426
|
+
inline-size: var(--bw-control-height);
|
|
3264
3427
|
padding-inline: 0;
|
|
3265
3428
|
}
|
|
3266
|
-
/* Exact square at every size (0.7.0 craft): the
|
|
3267
|
-
*
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3429
|
+
/* Exact square at every size (0.7.0 craft): the role variable carries the
|
|
3430
|
+
* step's height, so the optical padding is identical on all four sides with no
|
|
3431
|
+
* per-size rule. */
|
|
3432
|
+
/* fit (ADR-126 section 3): auto is the default and emits no class; fill takes
|
|
3433
|
+
* the width of its container. After the icon-only rule so the two never fight.
|
|
3434
|
+
* Django and React reject fit="fill" with icon_only: an icon-only control is a
|
|
3435
|
+
* square, so fill would be a silent no-op (ADR-060 section 3). */
|
|
3436
|
+
.bw-btn--fit-fill {
|
|
3437
|
+
inline-size: 100%;
|
|
3273
3438
|
}
|
|
3274
3439
|
/* Flat disabled colours (COL-018 / #282), not opacity: opacity failed
|
|
3275
|
-
* contrast on most surfaces and cannot be gated under brand overrides.
|
|
3276
|
-
|
|
3277
|
-
|
|
3440
|
+
* contrast on most surfaces and cannot be gated under brand overrides. Three
|
|
3441
|
+
* spellings, one look: the disabled attribute (a <button>), the class (the
|
|
3442
|
+
* non-navigable <span> a disabled link-button renders as) and aria-disabled
|
|
3443
|
+
* (any other host). A busy control is not flat: it holds its variant colours
|
|
3444
|
+
* (BTN-031) and is told apart by the spinner, the not-operable cursor and
|
|
3445
|
+
* aria-busy, so a loading primary does not flash grey. */
|
|
3446
|
+
.bw-btn:disabled:not([aria-busy="true"]),
|
|
3447
|
+
.bw-btn--disabled:not([aria-busy="true"]),
|
|
3448
|
+
.bw-btn[aria-disabled="true"]:not([aria-busy="true"]) {
|
|
3278
3449
|
background: var(--bw-color-action-disabled-bg);
|
|
3279
3450
|
background-image: none;
|
|
3280
3451
|
color: var(--bw-color-action-disabled-text);
|
|
@@ -3282,6 +3453,9 @@ a:hover {
|
|
|
3282
3453
|
box-shadow: none;
|
|
3283
3454
|
cursor: not-allowed;
|
|
3284
3455
|
}
|
|
3456
|
+
.bw-btn[aria-busy="true"] {
|
|
3457
|
+
cursor: progress;
|
|
3458
|
+
}
|
|
3285
3459
|
|
|
3286
3460
|
.bw-spinner {
|
|
3287
3461
|
/* Sized via --bw-icon-size (set inline to a size token), the same mechanism
|
|
@@ -3551,11 +3725,14 @@ select.bw-input {
|
|
|
3551
3725
|
[dir="rtl"] select.bw-input {
|
|
3552
3726
|
background-position: left var(--bw-density-control-padding-inline) center;
|
|
3553
3727
|
}
|
|
3728
|
+
/* background-color, not the shorthand: the shorthand also reset
|
|
3729
|
+
* background-image, so a disabled select.bw-input lost its chevron (the
|
|
3730
|
+
* select rule is less specific than these state rules). */
|
|
3554
3731
|
.bw-input[readonly] {
|
|
3555
|
-
background: var(--bw-color-surface-sunken);
|
|
3732
|
+
background-color: var(--bw-color-surface-sunken);
|
|
3556
3733
|
}
|
|
3557
3734
|
.bw-input:disabled {
|
|
3558
|
-
background: var(--bw-color-action-disabled-bg);
|
|
3735
|
+
background-color: var(--bw-color-action-disabled-bg);
|
|
3559
3736
|
color: var(--bw-color-action-disabled-text);
|
|
3560
3737
|
border-color: var(--bw-color-action-disabled-border);
|
|
3561
3738
|
cursor: not-allowed;
|
|
@@ -5495,11 +5672,11 @@ a.bw-stat:hover {
|
|
|
5495
5672
|
consumer stylesheet that selects .bw-stat__trend directly; #334). */
|
|
5496
5673
|
/* size arg (VIZ-027): modifiers re-point the value-size component token, so
|
|
5497
5674
|
the numeral rule itself never forks. */
|
|
5498
|
-
.bw-stat--sm {
|
|
5675
|
+
.bw-stat--sm, .bw-stat--size-sm {
|
|
5499
5676
|
--bw-component-stat-tile-value-size: var(--bw-font-size-2xl);
|
|
5500
5677
|
padding: var(--bw-space-3);
|
|
5501
5678
|
}
|
|
5502
|
-
.bw-stat--lg {
|
|
5679
|
+
.bw-stat--lg, .bw-stat--size-lg {
|
|
5503
5680
|
--bw-component-stat-tile-value-size: var(--bw-font-size-4xl);
|
|
5504
5681
|
padding: var(--bw-space-6);
|
|
5505
5682
|
}
|
|
@@ -5514,8 +5691,11 @@ a.bw-stat:hover {
|
|
|
5514
5691
|
padding: 0;
|
|
5515
5692
|
}
|
|
5516
5693
|
.bw-stat--chrome-plain.bw-stat--sm,
|
|
5694
|
+
.bw-stat--chrome-plain.bw-stat--size-sm,
|
|
5517
5695
|
.bw-stat--chrome-plain.bw-stat--lg,
|
|
5518
|
-
.bw-stat--chrome-plain.bw-stat--
|
|
5696
|
+
.bw-stat--chrome-plain.bw-stat--size-lg,
|
|
5697
|
+
.bw-stat--chrome-plain.bw-stat--md,
|
|
5698
|
+
.bw-stat--chrome-plain.bw-stat--size-md {
|
|
5519
5699
|
padding: 0;
|
|
5520
5700
|
}
|
|
5521
5701
|
a.bw-stat--chrome-plain:hover {
|
|
@@ -5689,11 +5869,11 @@ a.bw-stat--chrome-plain:hover {
|
|
|
5689
5869
|
/* size arg (mirrors _stat.html's VIZ-027 seam): modifiers re-point the
|
|
5690
5870
|
same value-size component token _stat.html uses, so a comparison tile
|
|
5691
5871
|
sits at the same scale as a plain stat tile sharing its grid. */
|
|
5692
|
-
.bw-stat-comparison--sm {
|
|
5872
|
+
.bw-stat-comparison--sm, .bw-stat-comparison--size-sm {
|
|
5693
5873
|
--bw-component-stat-tile-value-size: var(--bw-font-size-2xl);
|
|
5694
5874
|
padding: var(--bw-space-3);
|
|
5695
5875
|
}
|
|
5696
|
-
.bw-stat-comparison--lg {
|
|
5876
|
+
.bw-stat-comparison--lg, .bw-stat-comparison--size-lg {
|
|
5697
5877
|
--bw-component-stat-tile-value-size: var(--bw-font-size-4xl);
|
|
5698
5878
|
padding: var(--bw-space-6);
|
|
5699
5879
|
}
|
|
@@ -5998,15 +6178,15 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
5998
6178
|
}
|
|
5999
6179
|
/* size arg (VIZ-010): modifiers re-point the diameter component token, the
|
|
6000
6180
|
same mechanism .bw-stat--sm/--lg use for their own value-size token. */
|
|
6001
|
-
.bw-gauge--sm {
|
|
6181
|
+
.bw-gauge--sm, .bw-gauge--size-sm {
|
|
6002
6182
|
inline-size: var(--bw-component-gauge-diameter-sm);
|
|
6003
6183
|
block-size: var(--bw-component-gauge-diameter-sm);
|
|
6004
6184
|
}
|
|
6005
|
-
.bw-gauge--md {
|
|
6185
|
+
.bw-gauge--md, .bw-gauge--size-md {
|
|
6006
6186
|
inline-size: var(--bw-component-gauge-diameter-md);
|
|
6007
6187
|
block-size: var(--bw-component-gauge-diameter-md);
|
|
6008
6188
|
}
|
|
6009
|
-
.bw-gauge--lg {
|
|
6189
|
+
.bw-gauge--lg, .bw-gauge--size-lg {
|
|
6010
6190
|
inline-size: var(--bw-component-gauge-diameter-lg);
|
|
6011
6191
|
block-size: var(--bw-component-gauge-diameter-lg);
|
|
6012
6192
|
}
|
|
@@ -6765,16 +6945,16 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
6765
6945
|
/* Size modifiers (CMP-020): sm/lg re-point the max-width token (the floor
|
|
6766
6946
|
* panel honours them too); full is full-viewport, gutterless, radius
|
|
6767
6947
|
* squared off, and only means anything as an overlay. */
|
|
6768
|
-
.bw-modal--sm .bw-modal__panel {
|
|
6948
|
+
.bw-modal--sm .bw-modal__panel, .bw-modal--size-sm .bw-modal__panel {
|
|
6769
6949
|
max-inline-size: var(--bw-size-max-width-modal-sm);
|
|
6770
6950
|
}
|
|
6771
|
-
.bw-modal--lg .bw-modal__panel {
|
|
6951
|
+
.bw-modal--lg .bw-modal__panel, .bw-modal--size-lg .bw-modal__panel {
|
|
6772
6952
|
max-inline-size: var(--bw-size-max-width-modal-lg);
|
|
6773
6953
|
}
|
|
6774
|
-
.bw-modal--full:is(.bw-modal--open, [data-bw-open]) {
|
|
6954
|
+
.bw-modal--full:is(.bw-modal--open, [data-bw-open]), .bw-modal--size-full:is(.bw-modal--open, [data-bw-open]) {
|
|
6775
6955
|
padding: 0;
|
|
6776
6956
|
}
|
|
6777
|
-
.bw-modal--full:is(.bw-modal--open, [data-bw-open]) .bw-modal__panel {
|
|
6957
|
+
.bw-modal--full:is(.bw-modal--open, [data-bw-open]) .bw-modal__panel, .bw-modal--size-full:is(.bw-modal--open, [data-bw-open]) .bw-modal__panel {
|
|
6778
6958
|
max-inline-size: none;
|
|
6779
6959
|
block-size: 100%;
|
|
6780
6960
|
border-radius: var(--bw-radius-none);
|
|
@@ -6983,17 +7163,17 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
6983
7163
|
}
|
|
6984
7164
|
}
|
|
6985
7165
|
/* Size modifiers: reuse the modal's own width ramp. */
|
|
6986
|
-
.bw-slide-over--sm .bw-slide-over__panel {
|
|
7166
|
+
.bw-slide-over--sm .bw-slide-over__panel, .bw-slide-over--size-sm .bw-slide-over__panel {
|
|
6987
7167
|
max-inline-size: var(--bw-size-max-width-modal-sm);
|
|
6988
7168
|
}
|
|
6989
7169
|
/* --md is the DOCUMENTED DEFAULT and the template emits it unconditionally, so
|
|
6990
7170
|
* it needs a real rule: without one the default size resolved to the panel's
|
|
6991
7171
|
* base width by accident rather than by declaration (the #120 defect class,
|
|
6992
7172
|
* found in the 3.0.0 options audit). */
|
|
6993
|
-
.bw-slide-over--md .bw-slide-over__panel {
|
|
7173
|
+
.bw-slide-over--md .bw-slide-over__panel, .bw-slide-over--size-md .bw-slide-over__panel {
|
|
6994
7174
|
max-inline-size: var(--bw-size-max-width-modal-md);
|
|
6995
7175
|
}
|
|
6996
|
-
.bw-slide-over--lg .bw-slide-over__panel {
|
|
7176
|
+
.bw-slide-over--lg .bw-slide-over__panel, .bw-slide-over--size-lg .bw-slide-over__panel {
|
|
6997
7177
|
max-inline-size: var(--bw-size-max-width-modal-lg);
|
|
6998
7178
|
}
|
|
6999
7179
|
/* Sticky header: title plus the always-present close control, divided
|
|
@@ -7261,6 +7441,13 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
7261
7441
|
* list too (compose, never duplicate); only combobox-specific physics live
|
|
7262
7442
|
* here. */
|
|
7263
7443
|
.bw-combobox {
|
|
7444
|
+
/* Chip block size (CMB-038): the control height less the frame's own
|
|
7445
|
+
* block padding, never below the 1.5rem WCAG 2.5.8 target plus the chip's
|
|
7446
|
+
* hairline border. Shared by the chip and the multiple-mode input. */
|
|
7447
|
+
--bw-combobox-chip-size: max(
|
|
7448
|
+
calc(1.5rem + 2 * var(--bw-size-border-hairline)),
|
|
7449
|
+
calc(var(--bw-density-control-height) - 2 * var(--bw-space-2))
|
|
7450
|
+
);
|
|
7264
7451
|
position: relative;
|
|
7265
7452
|
}
|
|
7266
7453
|
/* Chips and the input share one wrapping row; the absolutely positioned
|
|
@@ -7278,6 +7465,90 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
7278
7465
|
inline-size: auto;
|
|
7279
7466
|
min-inline-size: 0;
|
|
7280
7467
|
}
|
|
7468
|
+
/* Placeholder colour (CMB-035, GAP-CMB-15): the shipped bundle had no
|
|
7469
|
+
* placeholder rule, so the UA default applied. Scoped to the combobox input;
|
|
7470
|
+
* opacity is reset because Firefox dims ::placeholder on top of its colour.
|
|
7471
|
+
* fg-muted, not fg-subtle: composed on the frame fill fg-subtle measures
|
|
7472
|
+
* 2.62:1 light and 3.84:1 dark, under the 4.5:1 text floor (AC-CMB-019),
|
|
7473
|
+
* where fg-muted clears it in both themes (combobox.md 4.3). */
|
|
7474
|
+
.bw-combobox__input::placeholder {
|
|
7475
|
+
color: var(--bw-color-fg-muted);
|
|
7476
|
+
opacity: 1;
|
|
7477
|
+
}
|
|
7478
|
+
/* A disabled control prompts in its disabled ink, not the live placeholder
|
|
7479
|
+
* colour, so the whole field reads as one inactive surface. */
|
|
7480
|
+
.bw-combobox__input:disabled::placeholder {
|
|
7481
|
+
color: var(--bw-color-action-disabled-text);
|
|
7482
|
+
}
|
|
7483
|
+
/* Multiple-mode frame (CMB-031, deliberate break, combobox.md 13.3): the chips
|
|
7484
|
+
* and the input share ONE frame. The frame moves from the input to the field
|
|
7485
|
+
* wrapper (the shared .bw-input recipe restated: control border, radius-md,
|
|
7486
|
+
* inset hairline, hover pre-light, accent border plus halo on focus) and
|
|
7487
|
+
* grows with wrapped chips (min-block-size, never a fixed height). The input
|
|
7488
|
+
* goes borderless so it reads as part of the field. Single mode is untouched:
|
|
7489
|
+
* it keeps the bare .bw-input frame (CMB-030). */
|
|
7490
|
+
.bw-combobox--multiple .bw-combobox__field {
|
|
7491
|
+
min-block-size: var(--bw-density-control-height);
|
|
7492
|
+
padding-block: var(--bw-space-1);
|
|
7493
|
+
padding-inline: var(--bw-density-control-padding-inline);
|
|
7494
|
+
background: var(--bw-color-surface);
|
|
7495
|
+
border: var(--bw-size-border-hairline) solid var(--bw-color-border-control);
|
|
7496
|
+
border-radius: var(--bw-radius-md);
|
|
7497
|
+
box-shadow: inset 0 1px 2px 0 oklch(0 0 0 / 0.04);
|
|
7498
|
+
transition: var(--bw-transition-colors), var(--bw-transition-shadow);
|
|
7499
|
+
}
|
|
7500
|
+
.bw-combobox--multiple .bw-combobox__field:hover:where(
|
|
7501
|
+
:not(:focus-within):not(:has(.bw-combobox__input:disabled, .bw-combobox__input[readonly]))
|
|
7502
|
+
) {
|
|
7503
|
+
border-color: color-mix(in oklab, var(--bw-color-border-control) 82%, var(--bw-color-fg));
|
|
7504
|
+
}
|
|
7505
|
+
.bw-combobox--multiple .bw-combobox__field:focus-within {
|
|
7506
|
+
border-color: var(--bw-color-accent);
|
|
7507
|
+
box-shadow:
|
|
7508
|
+
inset 0 1px 2px 0 oklch(0 0 0 / 0.04),
|
|
7509
|
+
0 0 0 3px color-mix(in oklab, var(--bw-color-accent) 18%, transparent);
|
|
7510
|
+
}
|
|
7511
|
+
/* The global ring (reset.css :focus-visible) moves from the input to the
|
|
7512
|
+
* frame so keyboard focus is outlined at the control edge, once. */
|
|
7513
|
+
.bw-combobox--multiple .bw-combobox__field:has(.bw-combobox__input:focus-visible) {
|
|
7514
|
+
outline: 2px solid var(--bw-color-focus-ring, var(--bw-color-accent));
|
|
7515
|
+
outline-offset: 2px;
|
|
7516
|
+
}
|
|
7517
|
+
/* Declared after focus so the danger border persists while focused, as for
|
|
7518
|
+
* .bw-input. */
|
|
7519
|
+
.bw-combobox--multiple .bw-combobox__field:has(.bw-combobox__input[aria-invalid="true"]) {
|
|
7520
|
+
border-color: var(--bw-color-danger);
|
|
7521
|
+
}
|
|
7522
|
+
.bw-combobox--multiple .bw-combobox__field:has(.bw-combobox__input[readonly]) {
|
|
7523
|
+
background: var(--bw-color-surface-sunken);
|
|
7524
|
+
}
|
|
7525
|
+
.bw-combobox--multiple .bw-combobox__field:has(.bw-combobox__input:disabled) {
|
|
7526
|
+
background: var(--bw-color-action-disabled-bg);
|
|
7527
|
+
border-color: var(--bw-color-action-disabled-border);
|
|
7528
|
+
cursor: not-allowed;
|
|
7529
|
+
}
|
|
7530
|
+
.bw-combobox--multiple .bw-combobox__input,
|
|
7531
|
+
.bw-combobox--multiple .bw-combobox__input:hover,
|
|
7532
|
+
.bw-combobox--multiple .bw-combobox__input:focus-visible,
|
|
7533
|
+
.bw-combobox--multiple .bw-combobox__input:disabled,
|
|
7534
|
+
.bw-combobox--multiple .bw-combobox__input[readonly] {
|
|
7535
|
+
/* The frame owns border, fill, well and ring; the input only types. The
|
|
7536
|
+
* block-size mirrors a chip so a wrapped row keeps one baseline rhythm. */
|
|
7537
|
+
/* A length literal: a typing run beside chips, no sizing-ramp step. Wide
|
|
7538
|
+
* enough for a short placeholder ("Add team"), so a row with no room wraps
|
|
7539
|
+
* the input to its own line instead of clipping the prompt. */
|
|
7540
|
+
flex-basis: 6rem;
|
|
7541
|
+
block-size: auto;
|
|
7542
|
+
min-block-size: var(--bw-combobox-chip-size, 1.5rem);
|
|
7543
|
+
padding-inline: var(--bw-space-1);
|
|
7544
|
+
background: transparent;
|
|
7545
|
+
border: 0;
|
|
7546
|
+
box-shadow: none;
|
|
7547
|
+
outline: none;
|
|
7548
|
+
}
|
|
7549
|
+
.bw-combobox--multiple .bw-combobox__input:disabled {
|
|
7550
|
+
color: var(--bw-color-action-disabled-text);
|
|
7551
|
+
}
|
|
7281
7552
|
/* The listbox mirrors the dropdown panel exactly (DESIGN.md reserved rows):
|
|
7282
7553
|
* raised surface, elevation-3 at z-dropdown, radius-lg, menu min-width, the
|
|
7283
7554
|
* light-theme top-light (dark reset at the end of this file), bw-fade-in-up
|
|
@@ -7319,6 +7590,7 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
7319
7590
|
* stamps it on: the target listbox itself, or the requesting input beside
|
|
7320
7591
|
* it. First consumer of --bw-component-htmx-indicator-opacity. */
|
|
7321
7592
|
.bw-combobox__listbox.htmx-request,
|
|
7593
|
+
.bw-combobox__listbox[aria-busy="true"],
|
|
7322
7594
|
.bw-combobox__input.htmx-request ~ .bw-combobox__listbox {
|
|
7323
7595
|
opacity: var(--bw-component-htmx-indicator-opacity);
|
|
7324
7596
|
}
|
|
@@ -7349,19 +7621,47 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
7349
7621
|
.bw-combobox__option[aria-selected="true"] {
|
|
7350
7622
|
font-weight: var(--bw-font-weight-medium);
|
|
7351
7623
|
}
|
|
7624
|
+
/* Disabled option (CMB-016): stays visible and filterable, paints the flat
|
|
7625
|
+
* disabled colours, shows no hover wash and cannot be chosen (the behaviour
|
|
7626
|
+
* skips it). The state is also carried by aria-disabled, not colour alone. */
|
|
7627
|
+
.bw-combobox__option[aria-disabled="true"] {
|
|
7628
|
+
color: var(--bw-color-action-disabled-text);
|
|
7629
|
+
cursor: not-allowed;
|
|
7630
|
+
}
|
|
7631
|
+
.bw-combobox__option[aria-disabled="true"]:hover {
|
|
7632
|
+
background-color: transparent;
|
|
7633
|
+
}
|
|
7634
|
+
/* Create row (CMB-020, GAP-CMB-16): the lead word is quiet and the echoed
|
|
7635
|
+
* query carries the weight, so the row reads "Create <query>". */
|
|
7636
|
+
.bw-combobox__option--create {
|
|
7637
|
+
color: var(--bw-color-fg-muted);
|
|
7638
|
+
}
|
|
7639
|
+
.bw-combobox__create-query {
|
|
7640
|
+
color: var(--bw-color-fg);
|
|
7641
|
+
font-weight: var(--bw-font-weight-medium);
|
|
7642
|
+
overflow-wrap: anywhere;
|
|
7643
|
+
}
|
|
7352
7644
|
.bw-combobox__empty {
|
|
7353
7645
|
padding: var(--bw-space-2) var(--bw-space-3);
|
|
7354
7646
|
color: var(--bw-color-fg-muted);
|
|
7355
7647
|
font-size: var(--bw-text-body-sm-size);
|
|
7356
7648
|
line-height: var(--bw-text-body-sm-line-height);
|
|
7357
7649
|
}
|
|
7650
|
+
/* Server-filter failure row (CMB-019): the same row shape as the empty
|
|
7651
|
+
* message, in the text-duty danger tier (the .bw-field__error precedent). */
|
|
7652
|
+
.bw-combobox__error {
|
|
7653
|
+
padding: var(--bw-space-2) var(--bw-space-3);
|
|
7654
|
+
color: var(--bw-color-danger-fg);
|
|
7655
|
+
font-size: var(--bw-text-body-sm-size);
|
|
7656
|
+
line-height: var(--bw-text-body-sm-line-height);
|
|
7657
|
+
}
|
|
7358
7658
|
/* Selected-value chips (multiple mode, CMP-028): the selected wash at
|
|
7359
|
-
* radius-full,
|
|
7360
|
-
*
|
|
7361
|
-
* control beside it. */
|
|
7659
|
+
* radius-full, sized by --bw-combobox-chip-size (CMB-038) so a chip row sits
|
|
7660
|
+
* inside the control's height rather than stretching it. */
|
|
7362
7661
|
.bw-combobox__chip {
|
|
7363
7662
|
display: inline-flex;
|
|
7364
7663
|
align-items: center;
|
|
7664
|
+
block-size: var(--bw-combobox-chip-size, 1.5rem);
|
|
7365
7665
|
gap: var(--bw-space-1);
|
|
7366
7666
|
padding-inline: var(--bw-space-3) var(--bw-space-1);
|
|
7367
7667
|
background: var(--bw-state-selected-bg);
|
|
@@ -7374,13 +7674,19 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
7374
7674
|
display: inline-flex;
|
|
7375
7675
|
align-items: center;
|
|
7376
7676
|
justify-content: center;
|
|
7377
|
-
|
|
7378
|
-
|
|
7677
|
+
/* 1.5rem is the WCAG 2.5.8 floor (CMB-053); the chip sizes to it, so the
|
|
7678
|
+
* remove control no longer pushes a chip taller than the control (CMB-038,
|
|
7679
|
+
* GAP-CMB-10). It fills the chip's inner block size. */
|
|
7680
|
+
block-size: 100%;
|
|
7681
|
+
min-block-size: 1.5rem;
|
|
7682
|
+
min-inline-size: 1.5rem;
|
|
7379
7683
|
padding: var(--bw-space-1);
|
|
7380
7684
|
background: transparent;
|
|
7381
7685
|
border: 0;
|
|
7382
7686
|
border-radius: var(--bw-radius-full);
|
|
7383
|
-
|
|
7687
|
+
/* fg-muted, not icon-muted: composed on the chip fill icon-muted measures
|
|
7688
|
+
* 2.39:1 in light, under the 3:1 non-text floor (AC-CMB-019, CMB-054). */
|
|
7689
|
+
color: var(--bw-color-fg-muted);
|
|
7384
7690
|
cursor: pointer;
|
|
7385
7691
|
transition: var(--bw-transition-colors);
|
|
7386
7692
|
}
|
|
@@ -13625,7 +13931,7 @@ same pattern as .bw-bio__profile-link. */
|
|
|
13625
13931
|
line-height: 1;
|
|
13626
13932
|
}
|
|
13627
13933
|
|
|
13628
|
-
.bw-icon--lg {
|
|
13934
|
+
.bw-icon--lg, .bw-icon--size-lg {
|
|
13629
13935
|
inline-size: 2.5rem;
|
|
13630
13936
|
block-size: 2.5rem;
|
|
13631
13937
|
font-size: var(--bw-text-heading-md-size);
|
|
@@ -13776,13 +14082,21 @@ same pattern as .bw-bio__profile-link. */
|
|
|
13776
14082
|
color-scheme: dark;
|
|
13777
14083
|
}
|
|
13778
14084
|
|
|
13779
|
-
|
|
13780
|
-
|
|
13781
|
-
|
|
13782
|
-
|
|
13783
|
-
|
|
13784
|
-
|
|
13785
|
-
|
|
14085
|
+
/* Zero specificity on purpose (icvoss/brickwork#25): this is a fallback for
|
|
14086
|
+
* unstyled native controls. As a bare selector its seven :not() terms scored
|
|
14087
|
+
* about (0,7,1) and outranked .bw-input:disabled and .bw-input[readonly]
|
|
14088
|
+
* (0,2,0), so disabled and read-only inputs kept the enabled fill and ink.
|
|
14089
|
+
* :where() keeps the repair for plain controls and lets every component rule
|
|
14090
|
+
* win. */
|
|
14091
|
+
:where(
|
|
14092
|
+
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(
|
|
14093
|
+
[type="file"]
|
|
14094
|
+
):not([type="hidden"]):not([type="submit"]):not([type="button"]):not(
|
|
14095
|
+
[type="reset"]
|
|
14096
|
+
):not([type="image"]):not([type="color"]),
|
|
14097
|
+
textarea,
|
|
14098
|
+
select
|
|
14099
|
+
) {
|
|
13786
14100
|
background-color: var(--bw-color-surface);
|
|
13787
14101
|
color: var(--bw-color-fg);
|
|
13788
14102
|
}
|