@allxsmith/bestax-bulma 5.50.0 → 5.52.0

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.
Files changed (65) hide show
  1. package/dist/bestax.css +1 -1
  2. package/dist/bestax.css.map +1 -1
  3. package/dist/esm/components/Command.js +637 -0
  4. package/dist/esm/components/Command.js.map +1 -0
  5. package/dist/esm/components/EmptyState.js +2 -2
  6. package/dist/esm/components/Timeline.js +5 -5
  7. package/dist/esm/components/TreeView.js +3 -3
  8. package/dist/esm/components/TreeView.js.map +1 -1
  9. package/dist/esm/elements/DescriptionList.js +133 -0
  10. package/dist/esm/elements/DescriptionList.js.map +1 -0
  11. package/dist/esm/form/Autocomplete.js +2 -2
  12. package/dist/esm/form/CheckboxCard.js +118 -0
  13. package/dist/esm/form/CheckboxCard.js.map +1 -0
  14. package/dist/esm/form/Checkboxes.js +14 -3
  15. package/dist/esm/form/Checkboxes.js.map +1 -1
  16. package/dist/esm/form/RadioCard.js +85 -0
  17. package/dist/esm/form/RadioCard.js.map +1 -0
  18. package/dist/esm/form/Radios.js +14 -3
  19. package/dist/esm/form/Radios.js.map +1 -1
  20. package/dist/esm/form/groupFieldset.js +38 -0
  21. package/dist/esm/form/groupFieldset.js.map +1 -0
  22. package/dist/esm/form/useAutoLabelId.js +1 -1
  23. package/dist/esm/helpers/useComboboxEngine.js +3 -3
  24. package/dist/esm/helpers/useFocusTrap.js +2 -2
  25. package/dist/esm/helpers/useFocusTrap.js.map +1 -1
  26. package/dist/extras.css +1 -1
  27. package/dist/extras.css.map +1 -1
  28. package/dist/index.cjs +2685 -1694
  29. package/dist/index.cjs.map +1 -1
  30. package/dist/index.esm.js +4 -0
  31. package/dist/index.esm.js.map +1 -1
  32. package/dist/types/components/Command.d.ts +318 -0
  33. package/dist/types/elements/DescriptionList.d.ts +185 -0
  34. package/dist/types/form/CheckboxCard.d.ts +94 -0
  35. package/dist/types/form/Checkboxes.d.ts +13 -0
  36. package/dist/types/form/RadioCard.d.ts +81 -0
  37. package/dist/types/form/Radios.d.ts +13 -0
  38. package/dist/types/form/groupFieldset.d.ts +32 -0
  39. package/dist/types/index.d.ts +4 -0
  40. package/dist/types-cjs/components/Command.d.ts +318 -0
  41. package/dist/types-cjs/elements/DescriptionList.d.ts +185 -0
  42. package/dist/types-cjs/form/CheckboxCard.d.ts +94 -0
  43. package/dist/types-cjs/form/Checkboxes.d.ts +13 -0
  44. package/dist/types-cjs/form/RadioCard.d.ts +81 -0
  45. package/dist/types-cjs/form/Radios.d.ts +13 -0
  46. package/dist/types-cjs/form/groupFieldset.d.ts +32 -0
  47. package/dist/types-cjs/index.d.ts +4 -0
  48. package/dist/versions/bestax-no-dark-mode.css +1 -1
  49. package/dist/versions/bestax-no-dark-mode.css.map +1 -1
  50. package/dist/versions/bestax-no-helpers-prefixed.css +1 -1
  51. package/dist/versions/bestax-no-helpers-prefixed.css.map +1 -1
  52. package/dist/versions/bestax-no-helpers.css +1 -1
  53. package/dist/versions/bestax-no-helpers.css.map +1 -1
  54. package/dist/versions/bestax-prefixed.css +1 -1
  55. package/dist/versions/bestax-prefixed.css.map +1 -1
  56. package/package.json +1 -1
  57. package/src/scss/components/_command.scss +259 -0
  58. package/src/scss/components/_index.scss +1 -0
  59. package/src/scss/elements/_descriptionlist.scss +153 -0
  60. package/src/scss/elements/_index.scss +1 -0
  61. package/src/scss/form/_checkbox.scss +44 -0
  62. package/src/scss/form/_checkboxcard.scss +355 -0
  63. package/src/scss/form/_index.scss +2 -0
  64. package/src/scss/form/_radio.scss +44 -0
  65. package/src/scss/form/_radiocard.scss +291 -0
@@ -0,0 +1,259 @@
1
+ // Bestax Extras - Command Styles
2
+ // A search field over a list of things to do. The field is Bulma's `Input`,
3
+ // in its Control, and the box, the list, its groups and its items are
4
+ // written here: the highlight that follows the keyboard is the pair Bulma's
5
+ // dropdown gives an `is-active` item, as Combobox's is. In a dialog the box
6
+ // sits in Bulma's `.modal`, near the top rather than in the middle, so it
7
+ // doesn't jump as the list grows and shrinks.
8
+ //
9
+ // Colors come from Bulma's tokens, so dark mode needs no rules of its own.
10
+
11
+ @use 'bulma/sass/utilities/initial-variables' as iv;
12
+ @use 'bulma/sass/utilities/css-variables' as cv;
13
+
14
+ $command-background: cv.getVar('scheme-main') !default;
15
+ // The edge keeps the box apart from the page, and from the background in a
16
+ // dialog, where the shadow all but vanishes on a dark page and is dropped in
17
+ // forced colors.
18
+ $command-border-color: cv.getVar('border-weak') !default;
19
+ $command-radius: cv.getVar('radius-large') !default;
20
+ $command-padding: 0.5rem !default;
21
+ // Between the field and the list.
22
+ $command-gap: 0.5rem !default;
23
+ // The list scrolls past this.
24
+ $command-list-max-height: 20rem !default;
25
+ $command-item-color: cv.getVar('text-strong') !default;
26
+ $command-item-size: 0.875rem !default;
27
+ $command-item-padding-y: 0.5rem !default;
28
+ $command-item-padding-x: 0.75rem !default;
29
+ $command-item-radius: cv.getVar('radius') !default;
30
+ // Between the icon, the label and the hint.
31
+ $command-item-gap: 0.75rem !default;
32
+ $command-item-hover-background: hsl(
33
+ #{cv.getVar('scheme-h')},
34
+ #{cv.getVar('scheme-s')},
35
+ calc(#{cv.getVar('scheme-main-l')} + #{cv.getVar('hover-background-l-delta')})
36
+ ) !default;
37
+ $command-highlight-background: cv.getVar('link') !default;
38
+ $command-highlight-color: cv.getVar('link-invert') !default;
39
+ $command-disabled-color: cv.getVar('text-weak') !default;
40
+ $command-icon-color: cv.getVar('text-weak') !default;
41
+ $command-description-color: cv.getVar('text-weak') !default;
42
+ $command-description-size: 0.875em !default;
43
+ $command-hint-color: cv.getVar('text-weak') !default;
44
+ $command-group-label-size: 0.85em !default;
45
+ $command-group-label-weight: cv.getVar('weight-semibold') !default;
46
+ $command-group-label-color: cv.getVar('text-weak') !default;
47
+ $command-divider-color: cv.getVar('border-weak') !default;
48
+ $command-empty-color: cv.getVar('text-weak') !default;
49
+ $command-empty-padding: 1.5rem !default;
50
+ // The dialog: how wide it gets, how far down it sits, and its shadow.
51
+ $command-dialog-width: 40rem !default;
52
+ $command-dialog-offset: 12vh !default;
53
+ $command-dialog-shadow: cv.getVar('shadow') !default;
54
+
55
+ .#{iv.$class-prefix}command {
56
+ @include cv.register-vars(
57
+ (
58
+ 'command-background': #{$command-background},
59
+ 'command-border-color': #{$command-border-color},
60
+ 'command-radius': #{$command-radius},
61
+ 'command-padding': #{$command-padding},
62
+ 'command-gap': #{$command-gap},
63
+ 'command-list-max-height': #{$command-list-max-height},
64
+ 'command-item-color': #{$command-item-color},
65
+ 'command-item-size': #{$command-item-size},
66
+ 'command-item-padding-y': #{$command-item-padding-y},
67
+ 'command-item-padding-x': #{$command-item-padding-x},
68
+ 'command-item-radius': #{$command-item-radius},
69
+ 'command-item-gap': #{$command-item-gap},
70
+ 'command-item-hover-background': #{$command-item-hover-background},
71
+ 'command-highlight-background': #{$command-highlight-background},
72
+ 'command-highlight-color': #{$command-highlight-color},
73
+ 'command-disabled-color': #{$command-disabled-color},
74
+ 'command-icon-color': #{$command-icon-color},
75
+ 'command-description-color': #{$command-description-color},
76
+ 'command-description-size': #{$command-description-size},
77
+ 'command-hint-color': #{$command-hint-color},
78
+ 'command-group-label-size': #{$command-group-label-size},
79
+ 'command-group-label-weight': #{$command-group-label-weight},
80
+ 'command-group-label-color': #{$command-group-label-color},
81
+ 'command-divider-color': #{$command-divider-color},
82
+ 'command-empty-color': #{$command-empty-color},
83
+ 'command-empty-padding': #{$command-empty-padding},
84
+ 'command-dialog-width': #{$command-dialog-width},
85
+ 'command-dialog-offset': #{$command-dialog-offset},
86
+ 'command-dialog-shadow': #{$command-dialog-shadow},
87
+ )
88
+ );
89
+ }
90
+
91
+ .#{iv.$class-prefix}command {
92
+ display: flex;
93
+ flex-direction: column;
94
+ gap: cv.getVar('command-gap');
95
+ padding: cv.getVar('command-padding');
96
+ background-color: cv.getVar('command-background');
97
+ border: 1px solid cv.getVar('command-border-color');
98
+ border-radius: cv.getVar('command-radius');
99
+ }
100
+
101
+ // The list's size, which its items, group headings and the empty message
102
+ // beside it take.
103
+ .#{iv.$class-prefix}command-list,
104
+ .#{iv.$class-prefix}command-empty {
105
+ font-size: cv.getVar('command-item-size');
106
+ }
107
+
108
+ .#{iv.$class-prefix}command-list {
109
+ max-height: cv.getVar('command-list-max-height');
110
+ overflow-y: auto;
111
+ overscroll-behavior: contain;
112
+ }
113
+
114
+ .#{iv.$class-prefix}command-item {
115
+ display: flex;
116
+ align-items: center;
117
+ gap: cv.getVar('command-item-gap');
118
+ padding: cv.getVar('command-item-padding-y')
119
+ cv.getVar('command-item-padding-x');
120
+ border-radius: cv.getVar('command-item-radius');
121
+ color: cv.getVar('command-item-color');
122
+ cursor: pointer;
123
+
124
+ // Where the pointer is while the highlight is somewhere else, as when the
125
+ // list scrolls under a pointer that hasn't moved.
126
+ &:hover:not(.#{iv.$class-prefix}is-active):not(
127
+ .#{iv.$class-prefix}is-disabled
128
+ ) {
129
+ background-color: cv.getVar('command-item-hover-background');
130
+ }
131
+
132
+ &.#{iv.$class-prefix}is-active {
133
+ background-color: cv.getVar('command-highlight-background');
134
+ color: cv.getVar('command-highlight-color');
135
+ }
136
+
137
+ &.#{iv.$class-prefix}is-disabled {
138
+ color: cv.getVar('command-disabled-color');
139
+ cursor: not-allowed;
140
+ }
141
+
142
+ // The arrows reach a disabled item, so it shows where they are, without
143
+ // the look of something Enter would run.
144
+ &.#{iv.$class-prefix}is-active.#{iv.$class-prefix}is-disabled {
145
+ background-color: cv.getVar('command-item-hover-background');
146
+ color: cv.getVar('command-disabled-color');
147
+ }
148
+ }
149
+
150
+ .#{iv.$class-prefix}command-item-icon {
151
+ display: inline-flex;
152
+ flex: none;
153
+ align-items: center;
154
+ justify-content: center;
155
+ color: cv.getVar('command-icon-color');
156
+ }
157
+
158
+ // The label over its description, taking the room the icon and hint leave.
159
+ .#{iv.$class-prefix}command-item-body {
160
+ display: flex;
161
+ flex: 1 1 auto;
162
+ flex-direction: column;
163
+ min-width: 0;
164
+ }
165
+
166
+ .#{iv.$class-prefix}command-item-description {
167
+ color: cv.getVar('command-description-color');
168
+ font-size: cv.getVar('command-description-size');
169
+ }
170
+
171
+ .#{iv.$class-prefix}command-item-hint {
172
+ display: inline-flex;
173
+ flex: none;
174
+ align-items: center;
175
+ margin-inline-start: auto;
176
+ color: cv.getVar('command-hint-color');
177
+ }
178
+
179
+ // On the highlight, and on a disabled item, the quieter parts take the item's
180
+ // own color, which is the one that reads against its background.
181
+ .#{iv.$class-prefix}command-item.#{iv.$class-prefix}is-active,
182
+ .#{iv.$class-prefix}command-item.#{iv.$class-prefix}is-disabled {
183
+ .#{iv.$class-prefix}command-item-icon,
184
+ .#{iv.$class-prefix}command-item-description,
185
+ .#{iv.$class-prefix}command-item-hint {
186
+ color: inherit;
187
+ }
188
+ }
189
+
190
+ // A line between a group and whatever comes before it, and between a group
191
+ // and items with no group after it, which would otherwise read as the group's
192
+ // last items. The line is the group's own edge rather than the item's, so it
193
+ // stays straight beside a rounded, highlighted item, and it's a border, which
194
+ // forced colors keeps.
195
+ .#{iv.$class-prefix}command-group:not(:first-child) {
196
+ border-top: 1px solid cv.getVar('command-divider-color');
197
+ margin-top: cv.getVar('command-item-padding-y');
198
+ padding-top: cv.getVar('command-item-padding-y');
199
+ }
200
+
201
+ .#{iv.$class-prefix}command-group:has(
202
+ + :not(.#{iv.$class-prefix}command-group)
203
+ ) {
204
+ border-bottom: 1px solid cv.getVar('command-divider-color');
205
+ margin-bottom: cv.getVar('command-item-padding-y');
206
+ padding-bottom: cv.getVar('command-item-padding-y');
207
+ }
208
+
209
+ .#{iv.$class-prefix}command-group-label {
210
+ padding: 0.25em cv.getVar('command-item-padding-x');
211
+ // In em of the list's size, so it follows the Command's.
212
+ font-size: cv.getVar('command-group-label-size');
213
+ color: cv.getVar('command-group-label-color');
214
+ font-weight: cv.getVar('command-group-label-weight');
215
+ }
216
+
217
+ .#{iv.$class-prefix}command-empty {
218
+ padding: cv.getVar('command-empty-padding')
219
+ cv.getVar('command-item-padding-x');
220
+ color: cv.getVar('command-empty-color');
221
+ text-align: center;
222
+ }
223
+
224
+ // In Bulma's `.modal`, a column that centers its content: the box keeps to
225
+ // the top, with the room under it left over, and above the background, which
226
+ // is positioned. Its list takes what height is left, so a short window
227
+ // scrolls the list rather than the page.
228
+ .#{iv.$class-prefix}command.#{iv.$class-prefix}command-dialog {
229
+ position: relative;
230
+ width: calc(100% - 2rem);
231
+ max-width: cv.getVar('command-dialog-width');
232
+ max-height: calc(100% - 2 * #{cv.getVar('command-dialog-offset')});
233
+ margin-top: cv.getVar('command-dialog-offset');
234
+ margin-bottom: auto;
235
+ box-shadow: cv.getVar('command-dialog-shadow');
236
+
237
+ > .#{iv.$class-prefix}command-list {
238
+ flex: 1 1 auto;
239
+ min-height: 0;
240
+ }
241
+ }
242
+
243
+ // Windows high contrast replaces the highlight's fill with the page's, so
244
+ // the highlight is drawn as an outline in the system's highlight color, and
245
+ // a disabled item takes the system's color for disabled text.
246
+ @media (forced-colors: active) {
247
+ .#{iv.$class-prefix}command-item {
248
+ &.#{iv.$class-prefix}is-active {
249
+ outline: 2px solid Highlight;
250
+ outline-offset: -2px;
251
+ }
252
+
253
+ // The highlighted one too, which the rule for it would otherwise outrank.
254
+ &.#{iv.$class-prefix}is-disabled,
255
+ &.#{iv.$class-prefix}is-active.#{iv.$class-prefix}is-disabled {
256
+ color: GrayText;
257
+ }
258
+ }
259
+ }
@@ -23,3 +23,4 @@
23
23
  @use 'timeline';
24
24
  @use 'treeview';
25
25
  @use 'scrollarea';
26
+ @use 'command';
@@ -0,0 +1,153 @@
1
+ // Bestax Extras - DescriptionList Styles
2
+ // Facts about one thing, each a label and its value: a `<dl>` with a `<div>`
3
+ // per item, a `<dt>` per label and a `<dd>` per value. Bulma styles a `<dl>`
4
+ // only inside `.content`, where it indents the values, so this lays one out.
5
+ //
6
+ // The list is a grid, and each item spans it on `subgrid`, so every label
7
+ // sits in the first column and every value in the last. Stacked, the grid
8
+ // has one column; beside, it has two, the labels' as wide as the longest
9
+ // label. The columns are all an orientation changes. The grid follows the
10
+ // writing direction, so a right-to-left page needs no rules of its own, and
11
+ // the gaps are in em, so `textSize` on the list scales them with the text.
12
+
13
+ @use "bulma/sass/utilities/initial-variables" as iv;
14
+ @use "bulma/sass/utilities/css-variables" as cv;
15
+ @use "bulma/sass/utilities/mixins" as mx;
16
+
17
+ // Between items.
18
+ $description-list-gap: 0.75em !default;
19
+ // Between the labels' column and the values', side by side.
20
+ $description-list-column-gap: 1.5em !default;
21
+ // Between a label and its value stacked, and between several labels or
22
+ // several values in one item.
23
+ $description-list-row-gap: 0.25em !default;
24
+ // The most the labels' column takes side by side. Longer labels wrap.
25
+ $description-list-label-max-width: 40% !default;
26
+ $description-list-label-color: cv.getVar("text-weak") !default;
27
+ $description-list-label-weight: cv.getVar("weight-normal") !default;
28
+ $description-list-value-color: cv.getVar("text") !default;
29
+ $description-list-divider-color: cv.getVar("border-weak") !default;
30
+ $description-list-divider-width: 1px !default;
31
+
32
+ .#{iv.$class-prefix}description-list {
33
+ @include cv.register-vars(
34
+ (
35
+ "description-list-gap": #{$description-list-gap},
36
+ "description-list-column-gap": #{$description-list-column-gap},
37
+ "description-list-row-gap": #{$description-list-row-gap},
38
+ "description-list-label-max-width": #{$description-list-label-max-width},
39
+ "description-list-label-color": #{$description-list-label-color},
40
+ "description-list-label-weight": #{$description-list-label-weight},
41
+ "description-list-value-color": #{$description-list-value-color},
42
+ "description-list-divider-color": #{$description-list-divider-color},
43
+ "description-list-divider-width": #{$description-list-divider-width},
44
+ )
45
+ );
46
+ }
47
+
48
+ // ---- The two orientations, as the list's columns ----------------------------
49
+
50
+ @mixin -vertical {
51
+ grid-template-columns: minmax(0, 1fr);
52
+ }
53
+
54
+ @mixin -horizontal {
55
+ grid-template-columns: fit-content(#{cv.getVar("description-list-label-max-width")}) minmax(0, 1fr);
56
+ }
57
+
58
+ // ---- Structure ----------------------------------------------------------------
59
+
60
+ .#{iv.$class-prefix}description-list {
61
+ display: grid;
62
+ @include -vertical;
63
+ column-gap: cv.getVar("description-list-column-gap");
64
+ row-gap: cv.getVar("description-list-gap");
65
+ margin: 0;
66
+ padding: 0;
67
+ // On the root, so a `textColor` helper's class outranks it and the values
68
+ // inherit either.
69
+ color: cv.getVar("description-list-value-color");
70
+
71
+ &:not(:last-child) {
72
+ margin-bottom: cv.getVar("block-spacing");
73
+ }
74
+ }
75
+
76
+ .#{iv.$class-prefix}description-list-item {
77
+ display: grid;
78
+ grid-column: 1 / -1;
79
+ // A browser without `subgrid` keeps this one column, so its items stay
80
+ // stacked at every width rather than misplace a value.
81
+ grid-template-columns: minmax(0, 1fr);
82
+ grid-template-columns: subgrid;
83
+ // Each label from the top of the first column and each value from the top
84
+ // of the last, so several of either line up from the item's first line.
85
+ grid-auto-flow: row dense;
86
+ align-items: baseline;
87
+ row-gap: cv.getVar("description-list-row-gap");
88
+ }
89
+
90
+ // Through the root, so it outranks Bulma's `.content dd` indent.
91
+ .#{iv.$class-prefix}description-list .#{iv.$class-prefix}description-list-label {
92
+ grid-column: 1 / 2;
93
+ margin: 0;
94
+ color: cv.getVar("description-list-label-color");
95
+ font-weight: cv.getVar("description-list-label-weight");
96
+ }
97
+
98
+ .#{iv.$class-prefix}description-list .#{iv.$class-prefix}description-list-value {
99
+ grid-column: -2 / -1;
100
+ margin: 0;
101
+ // An order number, an email or a URL wraps rather than widen the list.
102
+ overflow-wrap: anywhere;
103
+ }
104
+
105
+ .#{iv.$class-prefix}description-list.#{iv.$class-prefix}has-dividers
106
+ > .#{iv.$class-prefix}description-list-item
107
+ + .#{iv.$class-prefix}description-list-item {
108
+ border-block-start: cv.getVar("description-list-divider-width") solid cv.getVar("description-list-divider-color");
109
+ padding-block-start: cv.getVar("description-list-gap");
110
+ }
111
+
112
+ // ---- Orientation ----------------------------------------------------------------
113
+
114
+ // With no orientation given: stacked on a phone, beside from tablet up.
115
+ @include mx.tablet {
116
+ .#{iv.$class-prefix}description-list {
117
+ @include -horizontal;
118
+ }
119
+ }
120
+
121
+ @mixin -orientations($suffix) {
122
+ .#{iv.$class-prefix}description-list.#{iv.$class-prefix}is-vertical#{$suffix} {
123
+ @include -vertical;
124
+ }
125
+
126
+ .#{iv.$class-prefix}description-list.#{iv.$class-prefix}is-horizontal#{$suffix} {
127
+ @include -horizontal;
128
+ }
129
+ }
130
+
131
+ // `orientation` at every width, then each viewport's prop from its own
132
+ // breakpoint, narrowest first, so where several apply the widest one wins.
133
+ @include -orientations("");
134
+
135
+ @include mx.mobile {
136
+ @include -orientations("-mobile");
137
+ }
138
+
139
+ @include mx.tablet {
140
+ @include -orientations("-tablet");
141
+ }
142
+
143
+ @include mx.desktop {
144
+ @include -orientations("-desktop");
145
+ }
146
+
147
+ @include mx.widescreen {
148
+ @include -orientations("-widescreen");
149
+ }
150
+
151
+ @include mx.fullhd {
152
+ @include -orientations("-fullhd");
153
+ }
@@ -2,6 +2,7 @@
2
2
  // Import all element partials here
3
3
 
4
4
  // Element Components
5
+ @use 'descriptionlist';
5
6
  @use 'kbd';
6
7
  @use 'linkbutton';
7
8
  @use 'loader';
@@ -4,6 +4,13 @@
4
4
 
5
5
  @use "bulma/sass/utilities/initial-variables" as iv;
6
6
  @use "bulma/sass/utilities/css-variables" as cv;
7
+ @use "bulma/sass/utilities/mixins" as mx;
8
+
9
+ // Bulma's horizontal field: `.field-label` takes one part of the row and
10
+ // `.field-body` five, after the label's `margin-inline-end`. Private, since
11
+ // they restate Bulma's layout rather than set a look of their own.
12
+ $-field-label-gap: 1.5rem;
13
+ $-field-label-parts: 6;
7
14
 
8
15
  // Checkbox-specific SCSS variables
9
16
  $checkbox-size: 1.25em !default;
@@ -249,3 +256,40 @@ $-check-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'
249
256
  }
250
257
  }
251
258
  }
259
+
260
+ // `<Checkboxes as="fieldset">` renders a native fieldset: the group's own
261
+ // `.field`, with its label as the legend, or the `.checkboxes` box itself inside
262
+ // an outer `Field`. Bulma resets a fieldset's margin, border and padding but
263
+ // keeps the browser's `min-inline-size: min-content`, which lets a long row
264
+ // of choices push it out of its column.
265
+ fieldset.#{iv.$class-prefix}checkboxes,
266
+ fieldset.#{iv.$class-prefix}field:has(.#{iv.$class-prefix}checkboxes) {
267
+ min-inline-size: 0;
268
+ }
269
+
270
+ // Horizontal, the legend is the label column. The browser draws a
271
+ // fieldset's legend above the content rather than beside it. A floated
272
+ // legend escapes that, though not in a flex fieldset in every engine, so the
273
+ // fieldset is a block here and the legend floats, taking the share of the
274
+ // row Bulma's `.field-label` takes beside `.field-body` (one part in six of
275
+ // what's left after its margin), and growing as that does for a word too
276
+ // long to wrap. `.field-body`, a flex box, sits beside it. Below tablet the
277
+ // row stacks, and the legend sits on top as it is. It applies only where the
278
+ // fieldset's own legend is the label column and the body after it holds the
279
+ // group, so a fieldset you lay out with a `div.field-label` keeps Bulma's
280
+ // flex row whatever its body holds.
281
+ @include mx.tablet {
282
+ fieldset.#{iv.$class-prefix}field.#{iv.$class-prefix}is-horizontal:has(
283
+ > legend.#{iv.$class-prefix}field-label
284
+ + .#{iv.$class-prefix}field-body
285
+ .#{iv.$class-prefix}checkboxes
286
+ ) {
287
+ display: flow-root;
288
+
289
+ > legend.#{iv.$class-prefix}field-label {
290
+ float: inline-start;
291
+ inline-size: calc((100% - #{$-field-label-gap}) / #{$-field-label-parts});
292
+ min-inline-size: min-content;
293
+ }
294
+ }
295
+ }