baseline-foundry 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.
Files changed (84) hide show
  1. package/README.md +577 -553
  2. package/config/experiments/ibm-plex-engine-smoke.json +115 -115
  3. package/config/experiments/ubuntu-engine-smoke.json +115 -115
  4. package/config/foundation-theme.json +110 -110
  5. package/config/tiers/app.json +116 -116
  6. package/config/tiers/documentation.json +116 -116
  7. package/config/tiers/editorial.json +116 -116
  8. package/config/tiers/os.json +116 -116
  9. package/dist/baseline-grid-overlay.js +43 -43
  10. package/dist/build.js +4 -4
  11. package/dist/code-snippet.js +1 -1
  12. package/dist/css-app-tier.js +78 -73
  13. package/dist/css-components/article-pagination.js +141 -140
  14. package/dist/css-components/button-actions.js +181 -161
  15. package/dist/css-components/cards-options.js +176 -176
  16. package/dist/css-components/chip-badge-status.d.ts +0 -3
  17. package/dist/css-components/chip-badge-status.js +174 -159
  18. package/dist/css-components/content-card.d.ts +7 -7
  19. package/dist/css-components/content-card.js +498 -497
  20. package/dist/css-components/control-row.d.ts +1 -1
  21. package/dist/css-components/control-row.js +15 -15
  22. package/dist/css-components/cta-figure-aspect.js +120 -120
  23. package/dist/css-components/document-navigation.js +427 -390
  24. package/dist/css-components/editorial-content.js +42 -42
  25. package/dist/css-components/icon.js +72 -72
  26. package/dist/css-components/interactive-feedback.js +239 -217
  27. package/dist/css-components/interactive-tables.js +160 -155
  28. package/dist/css-components/legacy-navigation.d.ts +8 -0
  29. package/dist/css-components/legacy-navigation.js +816 -0
  30. package/dist/css-components/linked-logo-site-layout.d.ts +3 -3
  31. package/dist/css-components/linked-logo-site-layout.js +177 -180
  32. package/dist/css-components/list-tree.js +96 -94
  33. package/dist/css-components/list.js +9 -7
  34. package/dist/css-components/logo-media.d.ts +6 -6
  35. package/dist/css-components/logo-media.js +218 -207
  36. package/dist/css-components/navigation-layout.js +144 -144
  37. package/dist/css-components/panel.js +148 -144
  38. package/dist/css-components/search-box-and-filter.d.ts +0 -1
  39. package/dist/css-components/search-box-and-filter.js +263 -264
  40. package/dist/css-components/sites-editorial-ports.d.ts +3 -4
  41. package/dist/css-components/sites-editorial-ports.js +279 -247
  42. package/dist/css-components/sites-foundation.js +142 -146
  43. package/dist/css-components/sites-rich-lists.d.ts +5 -5
  44. package/dist/css-components/sites-rich-lists.js +339 -349
  45. package/dist/css-components/static-content-ports.d.ts +3 -3
  46. package/dist/css-components/static-content-ports.js +200 -186
  47. package/dist/css-components/tab-section.d.ts +3 -3
  48. package/dist/css-components/tab-section.js +93 -85
  49. package/dist/css-components/table.js +76 -75
  50. package/dist/css-components/tabs-choice-breadcrumbs.js +307 -303
  51. package/dist/css-components/tiered-list-equal-height-row.js +271 -271
  52. package/dist/css-components.js +1881 -2554
  53. package/dist/css-grid.d.ts +1 -1
  54. package/dist/css-grid.js +183 -173
  55. package/dist/css.js +317 -241
  56. package/dist/experiments/ibm-plex-engine-smoke/styles.css +894 -538
  57. package/dist/experiments/ibm-plex-engine-smoke/surfaces.json +2 -2
  58. package/dist/experiments/ibm-plex-engine-smoke/tokens.json +1 -1
  59. package/dist/in-page-navigation.js +1 -1
  60. package/dist/presets/app-tier/styles.css +928 -568
  61. package/dist/presets/app-tier/surfaces.json +17 -17
  62. package/dist/presets/app-tier/tokens.json +7 -7
  63. package/dist/presets/prose/styles.css +919 -562
  64. package/dist/presets/prose/surfaces.json +17 -17
  65. package/dist/presets/prose/tokens.json +1 -1
  66. package/dist/resizable-aside.js +12 -4
  67. package/dist/styles.css +919 -562
  68. package/dist/surfaces.json +17 -17
  69. package/dist/tiers/app/styles.css +928 -568
  70. package/dist/tiers/app/surfaces.json +17 -17
  71. package/dist/tiers/app/tokens.json +7 -7
  72. package/dist/tiers/documentation/styles.css +920 -563
  73. package/dist/tiers/documentation/surfaces.json +17 -17
  74. package/dist/tiers/documentation/tokens.json +2 -2
  75. package/dist/tiers/editorial/styles.css +919 -562
  76. package/dist/tiers/editorial/surfaces.json +17 -17
  77. package/dist/tiers/editorial/tokens.json +1 -1
  78. package/dist/tiers/os/styles.css +925 -568
  79. package/dist/tiers/os/surfaces.json +17 -17
  80. package/dist/tiers/os/tokens.json +7 -7
  81. package/dist/tokens.json +1 -1
  82. package/dist/types.d.ts +1 -1
  83. package/docs/publishing.md +31 -14
  84. package/package.json +119 -108
@@ -8,10 +8,10 @@
8
8
  * link/mark contract; the additional card slots are semantic link content,
9
9
  * not the deprecated `logo-block` API.
10
10
  *
11
- * Vanilla → BF mapping (Vanilla's 8px spacing unit):
11
+ * Vanilla → BF mapping (Vanilla's 0.5rem spacing unit):
12
12
  * - linked-logo image container: retained 16:9 aspect relationship;
13
- * - muted rule to copy: 8px → `--bf-space-1`, compensating its border;
14
- * - grid gutter: 24px / 32px breakpoint values → existing
13
+ * - muted rule to copy: 0.5rem → `--bf-space-1`, compensating its border;
14
+ * - grid gutter: 1.5rem / 2rem breakpoint values → existing
15
15
  * `--bf-grid-gap-inline` (BF's tier-aware grid geometry);
16
16
  * - macro section boundaries: existing shallow/default/deep section tokens.
17
17
  *
@@ -8,10 +8,10 @@
8
8
  * link/mark contract; the additional card slots are semantic link content,
9
9
  * not the deprecated `logo-block` API.
10
10
  *
11
- * Vanilla → BF mapping (Vanilla's 8px spacing unit):
11
+ * Vanilla → BF mapping (Vanilla's 0.5rem spacing unit):
12
12
  * - linked-logo image container: retained 16:9 aspect relationship;
13
- * - muted rule to copy: 8px → `--bf-space-1`, compensating its border;
14
- * - grid gutter: 24px / 32px breakpoint values → existing
13
+ * - muted rule to copy: 0.5rem → `--bf-space-1`, compensating its border;
14
+ * - grid gutter: 1.5rem / 2rem breakpoint values → existing
15
15
  * `--bf-grid-gap-inline` (BF's tier-aware grid geometry);
16
16
  * - macro section boundaries: existing shallow/default/deep section tokens.
17
17
  *
@@ -19,177 +19,174 @@
19
19
  * changes the document body merely because a tier stylesheet is imported.
20
20
  */
21
21
  export function linkedLogoSiteLayoutCss() {
22
- return `/* ------------------------------------------------------------------ */
23
- /* Linked logo section — Sites composition of BF logo and content slots. */
24
- /* ------------------------------------------------------------------ */
25
-
26
- :where(.bf-theme) :where(.bf-linked-logo-section) {
27
- container-name: bf-linked-logo-section;
28
- container-type: inline-size;
29
- margin-block-end: var(--bf-section-space);
30
- min-inline-size: 0;
31
- }
32
-
33
- :where(.bf-theme) :where(.bf-linked-logo-section.is-shallow) {
34
- margin-block-end: var(--bf-section-space-shallow);
35
- }
36
-
37
- :where(.bf-theme) :where(.bf-linked-logo-section.is-deep) {
38
- margin-block-end: var(--bf-section-space-deep);
39
- }
40
-
41
- :where(.bf-theme) :where(.bf-linked-logo-section-layout) {
42
- display: grid;
43
- grid-template-columns: minmax(0, 1fr);
44
- min-inline-size: 0;
45
- }
46
-
47
- :where(.bf-theme) :where(.bf-linked-logo-section-header, .bf-linked-logo-section-content) {
48
- min-inline-size: 0;
49
- overflow-wrap: anywhere;
50
- }
51
-
52
- /* The card list is a contextual use of bf-logo-section. Its links and marks
53
- preserve that component's focus and accessible-image treatment, while a
54
- grid gives the Sites pattern its 16:9 linked destinations. */
55
- :where(.bf-theme) :where(.bf-linked-logo-section) :where(.bf-logo-section.bf-linked-logo-section-logos) {
56
- margin-block-end: 0;
57
- }
58
-
59
- :where(.bf-theme) :where(.bf-linked-logo-section-logos) :where(.bf-logo-section-items) {
60
- align-items: stretch;
61
- column-gap: var(--bf-grid-gap-inline);
62
- display: grid;
63
- grid-template-columns: minmax(0, 1fr);
64
- padding-block: 0;
65
- row-gap: var(--bf-section-space-shallow);
66
- }
67
-
68
- :where(.bf-theme) :where(.bf-linked-logo-section-logos) :where(.bf-logo-section-item) {
69
- block-size: auto;
70
- inline-size: auto;
71
- margin-block: 0;
72
- max-inline-size: none;
73
- }
74
-
75
- :where(.bf-theme) :where(.bf-linked-logo-section-card) {
76
- align-content: start;
77
- align-items: stretch;
78
- color: inherit;
79
- container-type: inline-size;
80
- display: grid;
81
- grid-template-rows: auto auto auto;
82
- inline-size: 100%;
83
- min-inline-size: 0;
84
- text-decoration: none;
85
- }
86
-
87
- :where(.bf-theme) :where(.bf-linked-logo-section-card:hover) :where(.bf-linked-logo-section-card-copy) {
88
- text-decoration: underline;
89
- }
90
-
91
- :where(.bf-theme) :where(.bf-linked-logo-section-mark) {
92
- aspect-ratio: 16 / 9;
93
- background: var(--bf-color-background-active);
94
- display: grid;
95
- inline-size: 100%;
96
- max-inline-size: 100%;
97
- min-inline-size: 0;
98
- overflow: hidden;
99
- place-items: center;
100
- }
101
-
102
- /* Card tracks are fluid, so an exact 16:9 mark is often a fractional number
103
- of baselines tall. Keep the visual ratio exact and put only the residual
104
- rhythm compensation after the mark; the copy keeps its own semantic
105
- spacing and the occupied card still lands on the tier grid. */
106
- @supports (margin-block-end: round(up, 1px, 1px)) {
107
- :where(.bf-theme) :where(.bf-linked-logo-section-mark) {
108
- margin-block-end: calc(
109
- round(up, calc(100cqi * 9 / 16), var(--bf-baseline))
110
- - calc(100cqi * 9 / 16)
111
- );
112
- }
113
- }
114
-
115
- :where(.bf-theme) :where(.bf-linked-logo-section-mark) > :where(img, svg) {
116
- block-size: 100%;
117
- display: block;
118
- inline-size: 100%;
119
- max-inline-size: 100%;
120
- min-inline-size: 0;
121
- object-fit: contain;
122
- }
123
-
124
- :where(.bf-theme) :where(.bf-linked-logo-section-card-rule) {
125
- border-block-start: var(--bf-border-width) solid var(--bf-color-border-low-contrast);
126
- display: block;
127
- margin-block-start: var(--bf-space-1);
128
- }
129
-
130
- /* A span inherits the real body role from the page; it owns only the
131
- relationship to its preceding divider, not an alternative type scale. */
132
- :where(.bf-theme) :where(.bf-linked-logo-section-card-copy) {
133
- display: block;
134
- margin-block-start: calc(var(--bf-space-1) - var(--bf-border-width));
135
- overflow-wrap: anywhere;
136
- }
137
-
138
- /* Vanilla's linked-logo block moves from one to two cards per row at the
139
- 4-column medium grid. The section itself does not split until the 8-column
140
- large grid: its macro uses large-only grid columns for the 50/50 and 25/75
141
- rails. The root establishes the query context; only descendants change. */
142
- @container bf-linked-logo-section (width >= 38.75rem) {
143
- :where(.bf-theme) :where(.bf-linked-logo-section-logos) :where(.bf-logo-section-items) {
144
- grid-template-columns: repeat(2, minmax(0, 1fr));
145
- }
146
- }
147
-
148
- @container bf-linked-logo-section (width >= 64.75rem) {
149
- :where(.bf-theme) :where(.bf-linked-logo-section.is-50-50) :where(.bf-linked-logo-section-layout) {
150
- column-gap: var(--bf-grid-gap-inline);
151
- grid-template-columns: repeat(2, minmax(0, 1fr));
152
- }
153
-
154
- :where(.bf-theme) :where(.bf-linked-logo-section.is-25-75) :where(.bf-linked-logo-section-layout) {
155
- column-gap: var(--bf-grid-gap-inline);
156
- grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
157
- }
158
-
159
- :where(.bf-theme) :where(.bf-linked-logo-section.is-full) :where(.bf-linked-logo-section-logos) :where(.bf-logo-section-items) {
160
- grid-template-columns: repeat(4, minmax(0, 1fr));
161
- }
162
-
163
- :where(.bf-theme) :where(.bf-linked-logo-section.is-50-50) :where(.bf-linked-logo-section-logos) :where(.bf-logo-section-items) {
164
- grid-template-columns: repeat(2, minmax(0, 1fr));
165
- }
166
-
167
- :where(.bf-theme) :where(.bf-linked-logo-section.is-25-75) :where(.bf-linked-logo-section-logos) :where(.bf-logo-section-items) {
168
- grid-template-columns: repeat(3, minmax(0, 1fr));
169
- }
170
- }
171
-
172
- /* ------------------------------------------------------------------ */
173
- /* Site / sticky-footer layout. */
174
- /* ------------------------------------------------------------------ */
175
-
176
- /* The sticky-footer contract is explicitly opt-in, so it remains useful at
177
- every viewport width. The descendant selector intentionally retains the
178
- shell classes' specificity: a shell may also be a bf-panel-content region,
179
- whose later min-block-size reset must not disable the site layout. */
180
- :where(.bf-theme.bf-page-shell.is-site-layout),
181
- :where(.bf-theme) .bf-page-shell.is-site-layout {
182
- display: flex;
183
- flex-direction: column;
184
- min-block-size: 100dvb;
185
- }
186
-
187
- :where(.bf-theme.bf-page-shell.is-site-layout) > :where(.bf-site-main),
188
- :where(.bf-theme) .bf-page-shell.is-site-layout > :where(.bf-site-main) {
189
- flex: 0 0 auto;
190
- min-inline-size: 0;
191
- }
192
-
22
+ return `/* ------------------------------------------------------------------ */
23
+ /* Linked logo section — Sites composition of BF logo and content slots. */
24
+ /* ------------------------------------------------------------------ */
25
+
26
+ :where(.bf-theme) :where(.bf-linked-logo-section) {
27
+ container-name: bf-linked-logo-section;
28
+ container-type: inline-size;
29
+ margin: 0;
30
+ min-inline-size: 0;
31
+ }
32
+
33
+ :where(.bf-theme) :where(.bf-linked-logo-section-layout) {
34
+ display: grid;
35
+ gap: var(--bf-section-space-shallow);
36
+ grid-template-columns: minmax(0, 1fr);
37
+ min-inline-size: 0;
38
+ }
39
+
40
+ :where(.bf-theme) :where(.bf-linked-logo-section-header, .bf-linked-logo-section-content) {
41
+ min-inline-size: 0;
42
+ overflow-wrap: anywhere;
43
+ }
44
+
45
+ /* The card list is a contextual use of bf-logo-section. Its links and marks
46
+ preserve that component's focus and accessible-image treatment, while a
47
+ grid gives the Sites pattern its 16:9 linked destinations. */
48
+ :where(.bf-theme) :where(.bf-linked-logo-section) :where(.bf-logo-section.bf-linked-logo-section-logos) {
49
+ margin-block-end: 0;
50
+ }
51
+
52
+ :where(.bf-theme) :where(.bf-linked-logo-section-logos) :where(.bf-logo-section-items) {
53
+ align-items: stretch;
54
+ column-gap: var(--bf-grid-gap-inline);
55
+ display: grid;
56
+ grid-template-columns: minmax(0, 1fr);
57
+ padding-block: 0;
58
+ row-gap: var(--bf-section-space-shallow);
59
+ }
60
+
61
+ :where(.bf-theme) :where(.bf-linked-logo-section-logos) :where(.bf-logo-section-item) {
62
+ block-size: auto;
63
+ inline-size: auto;
64
+ margin-block: 0;
65
+ max-inline-size: none;
66
+ }
67
+
68
+ :where(.bf-theme) :where(a.bf-linked-logo-section-card) {
69
+ align-content: start;
70
+ align-items: stretch;
71
+ color: inherit;
72
+ container-type: inline-size;
73
+ display: grid;
74
+ grid-template-rows: auto auto auto;
75
+ inline-size: 100%;
76
+ min-inline-size: 0;
77
+ text-decoration: none;
78
+ }
79
+
80
+ :where(.bf-theme) :where(a.bf-linked-logo-section-card:hover) :where(.bf-linked-logo-section-card-copy) {
81
+ text-decoration: underline;
82
+ }
83
+
84
+ :where(.bf-theme) :where(.bf-linked-logo-section-mark) {
85
+ aspect-ratio: 16 / 9;
86
+ background: var(--bf-color-background-active);
87
+ display: grid;
88
+ inline-size: 100%;
89
+ max-inline-size: 100%;
90
+ min-inline-size: 0;
91
+ overflow: hidden;
92
+ place-items: center;
93
+ }
94
+
95
+ /* Card tracks are fluid, so an exact 16:9 mark is often a fractional number
96
+ of baselines tall. Keep the visual ratio exact and put only the residual
97
+ rhythm compensation after the mark; the copy keeps its own semantic
98
+ spacing and the occupied card still lands on the tier grid. */
99
+ @supports (margin-block-end: round(up, 0.0625rem, 0.0625rem)) {
100
+ :where(.bf-theme) :where(.bf-linked-logo-section-mark) {
101
+ margin-block-end: calc(
102
+ round(up, calc(100cqi * 9 / 16), var(--bf-baseline))
103
+ - calc(100cqi * 9 / 16)
104
+ );
105
+ }
106
+ }
107
+
108
+ :where(.bf-theme) :where(.bf-linked-logo-section-mark) > :where(img, svg) {
109
+ block-size: 100%;
110
+ display: block;
111
+ inline-size: 100%;
112
+ max-inline-size: 100%;
113
+ min-inline-size: 0;
114
+ object-fit: contain;
115
+ }
116
+
117
+ :where(.bf-theme) :where(.bf-linked-logo-section-card-rule) {
118
+ border-block-start: var(--bf-border-width) solid var(--bf-color-border-low-contrast);
119
+ display: block;
120
+ margin-block-start: var(--bf-space-1);
121
+ }
122
+
123
+ /* A span inherits the real body role from the page; it owns only the
124
+ relationship to its preceding divider, not an alternative type scale. */
125
+ :where(.bf-theme) :where(.bf-linked-logo-section-card-copy) {
126
+ display: block;
127
+ margin-block-start: calc(var(--bf-space-1) - var(--bf-border-width));
128
+ overflow-wrap: anywhere;
129
+ }
130
+
131
+ /* The linked-logo block moves from one to two cards per row at the 4-column
132
+ medium grid. The balanced 50/50 section split uses the shared readable
133
+ threshold; the 25/75 content rail and four-card density retain their
134
+ separately measured wide threshold. The root establishes the query context;
135
+ only descendants change. */
136
+ @container bf-linked-logo-section (width >= 38.75rem) {
137
+ :where(.bf-theme) :where(.bf-linked-logo-section-logos) :where(.bf-logo-section-items) {
138
+ grid-template-columns: repeat(2, minmax(0, 1fr));
139
+ }
140
+ }
141
+
142
+ @container bf-linked-logo-section (width >= 45rem) {
143
+ :where(.bf-theme) :where(.bf-linked-logo-section.is-50-50) :where(.bf-linked-logo-section-layout) {
144
+ column-gap: var(--bf-grid-gap-inline);
145
+ grid-template-columns: repeat(2, minmax(0, 1fr));
146
+ }
147
+ }
148
+
149
+ @container bf-linked-logo-section (width >= 64.75rem) {
150
+
151
+ :where(.bf-theme) :where(.bf-linked-logo-section.is-25-75) :where(.bf-linked-logo-section-layout) {
152
+ column-gap: var(--bf-grid-gap-inline);
153
+ grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
154
+ }
155
+
156
+ :where(.bf-theme) :where(.bf-linked-logo-section.is-full) :where(.bf-linked-logo-section-logos) :where(.bf-logo-section-items) {
157
+ grid-template-columns: repeat(4, minmax(0, 1fr));
158
+ }
159
+
160
+ :where(.bf-theme) :where(.bf-linked-logo-section.is-50-50) :where(.bf-linked-logo-section-logos) :where(.bf-logo-section-items) {
161
+ grid-template-columns: repeat(2, minmax(0, 1fr));
162
+ }
163
+
164
+ :where(.bf-theme) :where(.bf-linked-logo-section.is-25-75) :where(.bf-linked-logo-section-logos) :where(.bf-logo-section-items) {
165
+ grid-template-columns: repeat(3, minmax(0, 1fr));
166
+ }
167
+ }
168
+
169
+ /* ------------------------------------------------------------------ */
170
+ /* Site / sticky-footer layout. */
171
+ /* ------------------------------------------------------------------ */
172
+
173
+ /* The sticky-footer contract is explicitly opt-in, so it remains useful at
174
+ every viewport width. The descendant selector intentionally retains the
175
+ shell classes' specificity: a shell may also be a bf-panel-content region,
176
+ whose later min-block-size reset must not disable the site layout. */
177
+ :where(.bf-theme.bf-page-shell.is-site-layout),
178
+ :where(.bf-theme) .bf-page-shell.is-site-layout {
179
+ display: flex;
180
+ flex-direction: column;
181
+ min-block-size: 100dvb;
182
+ }
183
+
184
+ :where(.bf-theme.bf-page-shell.is-site-layout) > :where(.bf-site-main),
185
+ :where(.bf-theme) .bf-page-shell.is-site-layout > :where(.bf-site-main) {
186
+ flex: 0 0 auto;
187
+ min-inline-size: 0;
188
+ }
189
+
193
190
  /* When a site main also consumes panel padding, pull its first text line up
194
191
  one baseline so it shares the tagged navigation brand's optical top. */
195
192
  :where(.bf-theme.bf-page-shell.is-site-layout) > :where(.bf-site-main.bf-panel-content),
@@ -200,15 +197,15 @@ export function linkedLogoSiteLayoutCss() {
200
197
  /* An application main already represents the available viewport remainder
201
198
  and owns scrolling. A directly nested site shell fills that region instead
202
199
  of claiming a second dynamic viewport; long content can still grow the
203
- shell beyond the region and remains reachable through bf-main. */
200
+ shell beyond the region and remains reachable through bf-main. */
204
201
  :where(.bf-theme.bf-application) > :where(.bf-main) > .bf-page-shell.is-site-layout,
205
202
  :where(.bf-theme) :where(.bf-application) > :where(.bf-main) > .bf-page-shell.is-site-layout {
206
203
  min-block-size: 100%;
207
204
  }
208
-
209
- :where(.bf-theme.bf-page-shell.is-site-layout) > :where(.bf-site-footer.is-sticky),
210
- :where(.bf-theme) .bf-page-shell.is-site-layout > :where(.bf-site-footer.is-sticky) {
211
- margin-block-start: auto;
212
- }
205
+
206
+ :where(.bf-theme.bf-page-shell.is-site-layout) > :where(.bf-site-footer.is-sticky),
207
+ :where(.bf-theme) .bf-page-shell.is-site-layout > :where(.bf-site-footer.is-sticky) {
208
+ margin-block-start: auto;
209
+ }
213
210
  `;
214
211
  }
@@ -1,98 +1,100 @@
1
1
  export function listTreeCss(options) {
2
2
  const { bodyTypeStyles } = options;
3
- return `:where(.bf-theme) :where(.bf-list-tree) {
4
- list-style: none;
5
- margin: 0;
6
- padding-left: calc(var(--bf-baseline) * 0.5);
7
- }
8
-
9
- :where(.bf-theme) :where(.bf-list-tree) :where(.bf-list-tree) {
10
- display: none;
11
- margin: 0;
12
- padding-left: 0;
13
- }
14
-
15
- :where(.bf-theme) :where(.bf-list-tree) :where(.bf-list-tree[aria-hidden='false']) {
16
- display: block;
17
- }
18
-
19
- :where(.bf-theme) :where(.bf-list-tree-item) {
20
- margin: 0;
21
- padding-left: calc(var(--bf-baseline) * 1.5);
22
- position: relative;
23
- }
24
-
25
- :where(.bf-theme) :where(.bf-list-tree-link) {
26
- ${bodyTypeStyles} color: var(--bf-color-text-default);
27
- cursor: pointer;
28
- display: block;
29
- margin: 0;
30
- min-block-size: var(--bf-control-box-size-compact);
31
- padding-block: var(--bf-control-block-padding-compact);
32
- text-decoration: none;
33
- }
34
-
35
- :where(.bf-theme) :where(.bf-list-tree-link):hover {
36
- color: var(--bf-color-link-default);
37
- text-decoration: underline;
38
- }
39
-
40
- :where(.bf-theme) :where(.bf-list-tree-link.is-active) {
41
- color: var(--bf-color-link-default);
42
- }
43
-
44
- :where(.bf-theme) :where(.bf-list-tree-link):focus:not(:focus-visible) {
45
- outline: none;
46
- }
47
-
48
- :where(.bf-theme) :where(.bf-list-tree-link):focus-visible {
49
- outline: 2px solid var(--bf-color-focus);
50
- outline-offset: -2px;
51
- }
52
-
53
- :where(.bf-theme) :where(.bf-list-tree-toggle) {
54
- ${bodyTypeStyles} align-items: center;
55
- background: transparent;
56
- border: 0;
57
- color: var(--bf-color-text-default);
58
- cursor: pointer;
59
- display: inline-flex;
60
- gap: calc(var(--bf-baseline) * 0.5);
61
- margin: 0 0 0 calc(var(--bf-baseline) * -1.5);
62
- min-block-size: var(--bf-control-box-size-compact);
63
- padding-block: var(--bf-control-block-padding-compact);
64
- padding-inline: calc(var(--bf-baseline) * 0.25) calc(var(--bf-baseline) * 0.5);
65
- text-align: left;
66
- width: 100%;
67
- }
68
-
69
- :where(.bf-theme) :where(.bf-list-tree-toggle):hover {
70
- background: var(--bf-color-background-hover);
71
- }
72
-
73
- :where(.bf-theme) :where(.bf-list-tree-toggle):focus:not(:focus-visible) {
74
- outline: none;
75
- }
76
-
77
- :where(.bf-theme) :where(.bf-list-tree-toggle):focus-visible {
78
- outline: 2px solid var(--bf-color-focus);
79
- outline-offset: -2px;
80
- }
81
-
82
- :where(.bf-theme) :where(.bf-list-tree-toggle)::before {
83
- background-image: var(--bf-ui-icon-chevron-down);
84
- background-position: center;
85
- background-repeat: no-repeat;
86
- background-size: 1rem 1rem;
87
- block-size: 1rem;
88
- content: "";
89
- flex: 0 0 1rem;
90
- inline-size: 1rem;
91
- transform: rotate(-90deg);
92
- }
93
-
94
- :where(.bf-theme) :where(.bf-list-tree-toggle[aria-expanded='true'])::before {
95
- transform: rotate(0deg);
96
- }
3
+ return `:where(.bf-theme) :where(.bf-list-tree) {
4
+ list-style: none;
5
+ margin: 0;
6
+ padding-left: 0;
7
+ }
8
+
9
+ :where(.bf-theme) :where(.bf-list-tree) :where(.bf-list-tree) {
10
+ display: none;
11
+ margin: 0;
12
+ padding-left: 0;
13
+ }
14
+
15
+ :where(.bf-theme) :where(.bf-list-tree) :where(.bf-list-tree[aria-hidden='false']) {
16
+ display: block;
17
+ }
18
+
19
+ :where(.bf-theme) :where(.bf-list-tree-item) {
20
+ display: grid;
21
+ margin: 0;
22
+ padding-left: 0;
23
+ position: relative;
24
+ }
25
+
26
+ :where(.bf-theme) :where(a.bf-list-tree-link) {
27
+ ${bodyTypeStyles} color: var(--bf-color-text-default);
28
+ border-block: var(--bf-border-width) solid transparent;
29
+ cursor: pointer;
30
+ display: block;
31
+ margin: 0 0 var(--bf-single-line-row-margin-block-end);
32
+ padding-block: var(--bf-single-line-row-padding-block);
33
+ padding-inline: var(--bf-component-inline-inset-continuation) var(--bf-component-inline-inset-action);
34
+ text-decoration: none;
35
+ }
36
+
37
+ :where(.bf-theme) :where(a.bf-list-tree-link:hover) {
38
+ color: var(--bf-color-link-default);
39
+ text-decoration: underline;
40
+ }
41
+
42
+ :where(.bf-theme) :where(.bf-list-tree-link.is-active) {
43
+ color: var(--bf-color-link-default);
44
+ }
45
+
46
+ :where(.bf-theme) :where(.bf-list-tree-link):focus:not(:focus-visible) {
47
+ outline: none;
48
+ }
49
+
50
+ :where(.bf-theme) :where(.bf-list-tree-link):focus-visible {
51
+ outline: 0.125rem solid var(--bf-color-focus);
52
+ outline-offset: -0.125rem;
53
+ }
54
+
55
+ :where(.bf-theme) :where(.bf-list-tree-toggle) {
56
+ ${bodyTypeStyles} align-items: center;
57
+ background: transparent;
58
+ border: 0;
59
+ border-block: var(--bf-border-width) solid transparent;
60
+ color: var(--bf-color-text-default);
61
+ cursor: pointer;
62
+ display: flex;
63
+ gap: var(--bf-disclosure-gap);
64
+ margin: 0 0 var(--bf-single-line-row-margin-block-end);
65
+ padding-block: var(--bf-single-line-row-padding-block);
66
+ padding-inline: 0 calc(var(--bf-baseline) * 0.5);
67
+ text-align: left;
68
+ width: 100%;
69
+ }
70
+
71
+ :where(.bf-theme) :where(.bf-list-tree-toggle):hover {
72
+ background: var(--bf-color-background-hover);
73
+ }
74
+
75
+ :where(.bf-theme) :where(.bf-list-tree-toggle):focus:not(:focus-visible) {
76
+ outline: none;
77
+ }
78
+
79
+ :where(.bf-theme) :where(.bf-list-tree-toggle):focus-visible {
80
+ outline: 0.125rem solid var(--bf-color-focus);
81
+ outline-offset: -0.125rem;
82
+ }
83
+
84
+ :where(.bf-theme) :where(.bf-list-tree-toggle)::before {
85
+ background-image: var(--bf-ui-icon-chevron-down);
86
+ background-position: center;
87
+ background-repeat: no-repeat;
88
+ background-size: 1rem 1rem;
89
+ block-size: 1rem;
90
+ content: "";
91
+ flex: 0 0 1rem;
92
+ inline-size: 1rem;
93
+ transform: translateY(var(--bf-disclosure-icon-optical-offset-block)) rotate(-90deg);
94
+ }
95
+
96
+ :where(.bf-theme) :where(.bf-list-tree-toggle[aria-expanded='true'])::before {
97
+ transform: translateY(var(--bf-disclosure-icon-optical-offset-block)) rotate(0deg);
98
+ }
97
99
  `;
98
100
  }
@@ -7,6 +7,10 @@ export function listCss({ bodyTypeStyles }) {
7
7
  padding: 0;
8
8
  }
9
9
 
10
+ :where(.bf-theme) :where(.bf-list:has(> .bf-list-item:is(.is-ticked, .is-crossed)), ol.bf-list.is-divided) {
11
+ padding-inline-start: var(--bf-leading-mark-group-inset);
12
+ }
13
+
10
14
  :where(.bf-theme) :where(.bf-list-item) {
11
15
  ${bodyTypeStyles} color: var(--bf-color-text-default);
12
16
  margin: 0 0 var(--bf-body-margin-bottom);
@@ -17,8 +21,10 @@ ${bodyTypeStyles} color: var(--bf-color-text-default);
17
21
  }
18
22
 
19
23
  :where(.bf-theme) :where(.bf-list.is-divided) > :where(.bf-list-item) {
20
- box-shadow: inset 0 1px 0 var(--bf-color-border-low-contrast);
21
- padding-block-end: var(--bf-baseline);
24
+ border-block: var(--bf-border-width) solid transparent;
25
+ box-shadow: inset 0 0.0625rem 0 var(--bf-color-border-low-contrast);
26
+ margin-block-end: var(--bf-single-line-row-margin-block-end);
27
+ padding-block: var(--bf-single-line-row-padding-block);
22
28
  }
23
29
 
24
30
  :where(.bf-theme) :where(.bf-list.is-divided) > :where(.bf-list-item:first-child) {
@@ -26,7 +32,7 @@ ${bodyTypeStyles} color: var(--bf-color-text-default);
26
32
  }
27
33
 
28
34
  :where(.bf-theme) :where(.bf-list-item.is-ticked, .bf-list-item.is-crossed) {
29
- padding-inline-start: calc(var(--bf-leading-icon-size) + var(--bf-leading-icon-gap));
35
+ padding-inline-start: var(--bf-leading-mark-offset);
30
36
  position: relative;
31
37
  }
32
38
 
@@ -51,10 +57,6 @@ ${bodyTypeStyles} color: var(--bf-color-text-default);
51
57
  background-image: var(--bf-ui-icon-error-grey);
52
58
  }
53
59
 
54
- :where(.bf-theme) :where(.bf-list.is-divided) > :where(.bf-list-item.is-ticked, .bf-list-item.is-crossed)::before {
55
- top: calc(var(--bf-leading-icon-offset) + (var(--bf-baseline) * 0.5));
56
- }
57
-
58
60
  :where(.bf-theme) :where(ol.bf-list.is-divided) {
59
61
  counter-reset: bf-list-counter;
60
62
  }