baseline-foundry 0.1.3 → 0.1.4

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 (43) hide show
  1. package/README.md +568 -552
  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/css-app-tier.js +73 -73
  11. package/dist/css-components/article-pagination.js +140 -140
  12. package/dist/css-components/button-actions.js +161 -161
  13. package/dist/css-components/cards-options.js +176 -176
  14. package/dist/css-components/chip-badge-status.js +158 -158
  15. package/dist/css-components/content-card.js +490 -490
  16. package/dist/css-components/control-row.js +14 -14
  17. package/dist/css-components/cta-figure-aspect.js +120 -120
  18. package/dist/css-components/document-navigation.js +390 -390
  19. package/dist/css-components/editorial-content.js +42 -42
  20. package/dist/css-components/icon.js +72 -72
  21. package/dist/css-components/interactive-feedback.js +217 -217
  22. package/dist/css-components/interactive-tables.js +155 -155
  23. package/dist/css-components/legacy-navigation.d.ts +9 -0
  24. package/dist/css-components/legacy-navigation.js +763 -0
  25. package/dist/css-components/linked-logo-site-layout.js +177 -177
  26. package/dist/css-components/list-tree.js +94 -94
  27. package/dist/css-components/logo-media.js +201 -201
  28. package/dist/css-components/navigation-layout.js +144 -144
  29. package/dist/css-components/panel.js +144 -144
  30. package/dist/css-components/search-box-and-filter.js +263 -263
  31. package/dist/css-components/sites-editorial-ports.js +243 -243
  32. package/dist/css-components/sites-foundation.js +146 -146
  33. package/dist/css-components/sites-rich-lists.js +344 -344
  34. package/dist/css-components/static-content-ports.js +182 -182
  35. package/dist/css-components/tab-section.js +82 -82
  36. package/dist/css-components/table.js +75 -75
  37. package/dist/css-components/tabs-choice-breadcrumbs.js +303 -303
  38. package/dist/css-components/tiered-list-equal-height-row.js +271 -271
  39. package/dist/css-components.js +1791 -2542
  40. package/dist/css-grid.js +172 -172
  41. package/dist/css.js +240 -240
  42. package/docs/publishing.md +30 -13
  43. package/package.json +119 -108
@@ -19,177 +19,177 @@
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-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
+
193
193
  /* When a site main also consumes panel padding, pull its first text line up
194
194
  one baseline so it shares the tagged navigation brand's optical top. */
195
195
  :where(.bf-theme.bf-page-shell.is-site-layout) > :where(.bf-site-main.bf-panel-content),
@@ -200,15 +200,15 @@ export function linkedLogoSiteLayoutCss() {
200
200
  /* An application main already represents the available viewport remainder
201
201
  and owns scrolling. A directly nested site shell fills that region instead
202
202
  of claiming a second dynamic viewport; long content can still grow the
203
- shell beyond the region and remains reachable through bf-main. */
203
+ shell beyond the region and remains reachable through bf-main. */
204
204
  :where(.bf-theme.bf-application) > :where(.bf-main) > .bf-page-shell.is-site-layout,
205
205
  :where(.bf-theme) :where(.bf-application) > :where(.bf-main) > .bf-page-shell.is-site-layout {
206
206
  min-block-size: 100%;
207
207
  }
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
- }
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
+ }
213
213
  `;
214
214
  }
@@ -1,98 +1,98 @@
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: 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
+ }
97
97
  `;
98
98
  }