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
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Static Vanilla parity ports: data spotlight and divided section. The
3
- * 38.75rem and 64.75rem container thresholds preserve Vanilla's 620px and
4
- * 1036px composition changes while allowing the patterns to respond to their
5
- * allocated inline size.
3
+ * Components use an intrinsic medium threshold for their density changes and
4
+ * the shared 45rem readable-split threshold for default balanced content,
5
+ * while responding to their allocated inline size.
6
6
  *
7
7
  * Vanilla → BF token mapping:
8
8
  * - `$spv--strip-shallow` (1.5rem) → `--bf-section-space-shallow`.
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Static Vanilla parity ports: data spotlight and divided section. The
3
- * 38.75rem and 64.75rem container thresholds preserve Vanilla's 620px and
4
- * 1036px composition changes while allowing the patterns to respond to their
5
- * allocated inline size.
3
+ * Components use an intrinsic medium threshold for their density changes and
4
+ * the shared 45rem readable-split threshold for default balanced content,
5
+ * while responding to their allocated inline size.
6
6
  *
7
7
  * Vanilla → BF token mapping:
8
8
  * - `$spv--strip-shallow` (1.5rem) → `--bf-section-space-shallow`.
@@ -12,195 +12,209 @@
12
12
  * classes to receive correct four-tier typography.
13
13
  */
14
14
  export function staticContentPortsCss() {
15
- return `/* ------------------------------------------------------------------ */
16
- /* Static content ports — Vanilla data spotlight and divided section. */
17
- /* Their children retain role-owned rhythm; these layout */
18
- /* wrappers add only structural columns, rules, and explicit section ends. */
19
- /* ------------------------------------------------------------------ */
20
-
21
- /* Data spotlight: Vanilla's equal-height wrap becomes an intrinsic grid.
22
- Each item begins with a public highlighted rule using the shared emphasis
23
- thickness. Item padding remains item-owned, so compositions never erase the
24
- shallow inter-row rhythm when the pattern narrows. */
25
- :where(.bf-theme) :where(.bf-data-spotlight) {
26
- container-type: inline-size;
27
- margin-block-end: var(--bf-section-space);
28
- min-inline-size: 0;
29
- }
30
-
31
- :where(.bf-theme) :where(.bf-data-spotlight-header) {
32
- min-inline-size: 0;
33
- }
34
-
35
- :where(.bf-theme) :where(.bf-data-spotlight-items) {
36
- column-gap: var(--bf-grid-gap-inline);
37
- display: grid;
38
- grid-template-columns: minmax(0, 1fr);
39
- min-inline-size: 0;
40
- }
41
-
42
- :where(.bf-theme) :where(.bf-data-spotlight-item) {
43
- min-inline-size: 0;
44
- overflow-wrap: anywhere;
45
- }
46
-
47
- :where(.bf-theme) :where(.bf-data-spotlight-item:not(:last-child)) {
48
- padding-block-end: var(--bf-section-space-shallow);
49
- }
50
-
51
- :where(.bf-theme) :where(.bf-data-spotlight-stat) {
52
- color: var(--bf-color-text-default);
53
- display: block;
54
- font-family: var(--bf-h1-font-family);
55
- font-size: var(--bf-h1-font-size);
56
- font-style: var(--bf-h1-font-style);
57
- font-variant-caps: var(--bf-h1-font-variant-caps);
58
- font-weight: var(--bf-h1-font-weight);
59
- letter-spacing: var(--bf-h1-letter-spacing);
60
- line-height: var(--bf-h1-line-height);
61
- margin-block: 0 var(--bf-h1-margin-bottom);
62
- overflow-wrap: anywhere;
63
- padding-block-end: 0;
64
- padding-block-start: var(--bf-h1-nudge-start);
65
- text-transform: var(--bf-h1-text-transform);
66
- }
67
-
68
- :where(.bf-theme) :where(.bf-data-spotlight-headline) {
69
- font-family: var(--bf-h3-font-family);
70
- font-size: var(--bf-h3-font-size);
71
- font-style: var(--bf-h3-font-style);
72
- font-variant-caps: var(--bf-h3-font-variant-caps);
73
- font-weight: var(--bf-h3-font-weight);
74
- letter-spacing: var(--bf-h3-letter-spacing);
75
- line-height: var(--bf-h3-line-height);
76
- margin-block: 0 var(--bf-h3-margin-bottom);
77
- min-inline-size: 0;
78
- padding-block-end: 0;
79
- padding-block-start: var(--bf-h3-nudge-start);
80
- text-transform: var(--bf-h3-text-transform);
81
- }
82
-
83
- :where(.bf-theme) :where(.bf-data-spotlight-description, .bf-data-spotlight-action) {
84
- min-inline-size: 0;
85
- overflow-wrap: anywhere;
86
- }
87
-
88
- :where(.bf-theme) :where(.bf-data-spotlight-action) {
89
- display: block;
90
- margin-block: 0 var(--bf-body-margin-bottom);
91
- padding-block-end: 0;
92
- padding-block-start: var(--bf-body-nudge-start);
93
- }
94
-
95
- /* Vanilla's tablet wrap has two equal items per row. For three items the
96
- in-grid title shares the first row; its first statistic owns the shallow
97
- row separation. Four items give both first-row statistics that separation. */
98
- @container (width >= 38.75rem) {
99
- :where(.bf-theme) :where(.bf-data-spotlight-items) {
100
- grid-template-columns: repeat(2, minmax(0, 1fr));
101
- }
102
-
103
- :where(.bf-theme) :where(.bf-data-spotlight-header, .bf-data-spotlight-item) {
104
- display: grid;
105
- grid-row: span 5;
106
- grid-template-rows: subgrid;
107
- }
108
-
109
- :where(.bf-theme) :where(.bf-data-spotlight-item) {
110
- padding-block-end: 0;
111
- }
112
-
113
- :where(.bf-theme) :where(.bf-data-spotlight.is-three-blocks) :where(.bf-data-spotlight-header) {
114
- block-size: 0;
115
- overflow: visible;
116
- }
117
-
118
- :where(.bf-theme) :where(.bf-data-spotlight.is-three-blocks) :where(.bf-data-spotlight-item:first-of-type),
119
- :where(.bf-theme) :where(.bf-data-spotlight.is-four-blocks) :where(.bf-data-spotlight-item:nth-child(-n + 2)) {
120
- padding-block-end: var(--bf-section-space-shallow);
121
- }
122
- }
123
-
124
- /* At Vanilla's large threshold the four stat blocks align in one row. Two
125
- blocks reserve the leading half for the overhanging title; three reserve a
126
- single leading column. The zero block-size matches Vanilla's height: 0
127
- title cell without hiding its readable text. */
128
- @container (width >= 64.75rem) {
129
- :where(.bf-theme) :where(.bf-data-spotlight-items) {
130
- grid-template-columns: repeat(4, minmax(0, 1fr));
131
- }
132
-
133
- :where(.bf-theme) :where(.bf-data-spotlight.is-two-blocks) :where(.bf-data-spotlight-header) {
134
- block-size: 0;
135
- grid-column: span 2;
136
- overflow: visible;
137
- }
138
-
139
- :where(.bf-theme) :where(.bf-data-spotlight.is-three-blocks) :where(.bf-data-spotlight-item:first-of-type),
140
- :where(.bf-theme) :where(.bf-data-spotlight.is-four-blocks) :where(.bf-data-spotlight-item:nth-child(-n + 2)) {
141
- padding-block-end: 0;
142
- }
143
- }
144
-
145
- /* Divided section: Vanilla's ruled 50/50 section is a one-column composition
146
- until the relevant container can support the split. The rule is structural;
147
- headings, copy, and content items keep their own metric-derived rhythm. */
148
- :where(.bf-theme) :where(.bf-divided-section) {
149
- container-type: inline-size;
150
- margin-block-end: var(--bf-section-space);
151
- min-inline-size: 0;
152
- }
153
-
154
- :where(.bf-theme) :where(.bf-divided-section-layout) {
155
- display: grid;
156
- grid-template-columns: minmax(0, 1fr);
157
- min-inline-size: 0;
158
- }
159
-
160
- :where(.bf-theme) :where(.bf-divided-section-rule) {
161
- grid-column: 1 / -1;
162
- }
163
-
164
- :where(.bf-theme) :where(.bf-divided-section-header, .bf-divided-section-content) {
165
- min-inline-size: 0;
166
- }
167
-
15
+ return `/* ------------------------------------------------------------------ */
16
+ /* Static content ports — Vanilla data spotlight and divided section. */
17
+ /* Their children retain role-owned rhythm; these layout */
18
+ /* wrappers add only structural columns, rules, and internal gaps. */
19
+ /* ------------------------------------------------------------------ */
20
+
21
+ /* Data spotlight: Vanilla's equal-height wrap becomes an intrinsic grid.
22
+ Each item begins with a public highlighted rule using the shared emphasis
23
+ thickness. The items container owns every inter-row gap. */
24
+ :where(.bf-theme) :where(.bf-data-spotlight) {
25
+ container-type: inline-size;
26
+ margin: 0;
27
+ min-inline-size: 0;
28
+ }
29
+
30
+ :where(.bf-theme) :where(.bf-data-spotlight-header) {
31
+ min-inline-size: 0;
32
+ }
33
+
34
+ :where(.bf-theme) :where(.bf-data-spotlight-items) {
35
+ column-gap: var(--bf-grid-gap-inline);
36
+ display: grid;
37
+ grid-template-columns: minmax(0, 1fr);
38
+ min-inline-size: 0;
39
+ row-gap: var(--bf-section-space-shallow);
40
+ }
41
+
42
+ :where(.bf-theme) :where(.bf-data-spotlight-item) {
43
+ min-inline-size: 0;
44
+ overflow-wrap: anywhere;
45
+ padding: 0;
46
+ }
47
+
48
+ :where(.bf-theme) :where(.bf-data-spotlight-stat) {
49
+ color: var(--bf-color-text-default);
50
+ display: block;
51
+ font-family: var(--bf-h1-font-family);
52
+ font-size: var(--bf-h1-font-size);
53
+ font-style: var(--bf-h1-font-style);
54
+ font-variant-caps: var(--bf-h1-font-variant-caps);
55
+ font-weight: var(--bf-h1-font-weight);
56
+ letter-spacing: var(--bf-h1-letter-spacing);
57
+ line-height: var(--bf-h1-line-height);
58
+ margin-block: 0 var(--bf-h1-margin-bottom);
59
+ overflow-wrap: anywhere;
60
+ padding-block-end: 0;
61
+ padding-block-start: var(--bf-h1-nudge-start);
62
+ text-transform: var(--bf-h1-text-transform);
63
+ }
64
+
65
+ :where(.bf-theme) :where(.bf-data-spotlight-headline) {
66
+ font-family: var(--bf-h3-font-family);
67
+ font-size: var(--bf-h3-font-size);
68
+ font-style: var(--bf-h3-font-style);
69
+ font-variant-caps: var(--bf-h3-font-variant-caps);
70
+ font-weight: var(--bf-h3-font-weight);
71
+ letter-spacing: var(--bf-h3-letter-spacing);
72
+ line-height: var(--bf-h3-line-height);
73
+ margin-block: 0 var(--bf-h3-margin-bottom);
74
+ min-inline-size: 0;
75
+ padding-block-end: 0;
76
+ padding-block-start: var(--bf-h3-nudge-start);
77
+ text-transform: var(--bf-h3-text-transform);
78
+ }
79
+
80
+ :where(.bf-theme) :where(.bf-data-spotlight-description, .bf-data-spotlight-action) {
81
+ min-inline-size: 0;
82
+ overflow-wrap: anywhere;
83
+ }
84
+
85
+ :where(.bf-theme) :where(.bf-data-spotlight-action) {
86
+ display: block;
87
+ margin-block: 0 var(--bf-body-margin-bottom);
88
+ padding-block-end: 0;
89
+ padding-block-start: var(--bf-body-nudge-start);
90
+ }
91
+
92
+ /* Vanilla's tablet wrap has two equal items per row. For three items the
93
+ in-grid title shares the first row; its first statistic owns the shallow
94
+ row separation. Four items give both first-row statistics that separation. */
95
+ @container (width >= 38.75rem) {
96
+ :where(.bf-theme) :where(.bf-data-spotlight-items) {
97
+ grid-template-columns: repeat(2, minmax(0, 1fr));
98
+ row-gap: var(--bf-space-1);
99
+ }
100
+
101
+ :where(.bf-theme) :where(.bf-data-spotlight-items)::after {
102
+ block-size: calc(var(--bf-section-space-shallow) - (var(--bf-space-1) * 2));
103
+ content: "";
104
+ grid-column: 1 / -1;
105
+ grid-row: 6;
106
+ }
107
+
108
+ :where(.bf-theme) :where(.bf-data-spotlight-header, .bf-data-spotlight-item) {
109
+ display: grid;
110
+ grid-row: span 5;
111
+ grid-template-rows: subgrid;
112
+ }
113
+
114
+ :where(.bf-theme) :where(.bf-data-spotlight.is-three-blocks) :where(.bf-data-spotlight-header) {
115
+ block-size: 0;
116
+ overflow: visible;
117
+ }
118
+
119
+ :where(.bf-theme) :where(.bf-data-spotlight.is-three-blocks) :where(.bf-data-spotlight-item:first-of-type),
120
+ :where(.bf-theme) :where(.bf-data-spotlight.is-four-blocks) :where(.bf-data-spotlight-item:nth-child(-n + 2)) {
121
+ grid-row: span 5;
122
+ }
123
+
124
+ :where(.bf-theme) :where(.bf-data-spotlight.is-two-blocks) :where(.bf-data-spotlight-item:nth-of-type(2)),
125
+ :where(.bf-theme) :where(.bf-data-spotlight.is-three-blocks) :where(.bf-data-spotlight-item:nth-of-type(n + 2)),
126
+ :where(.bf-theme) :where(.bf-data-spotlight.is-four-blocks) :where(.bf-data-spotlight-item:nth-of-type(n + 3)) {
127
+ grid-row: 7 / span 5;
128
+ }
129
+ }
130
+
131
+ /* At Vanilla's large threshold the four stat blocks align in one row. Two
132
+ blocks reserve the leading half for the overhanging title; three reserve a
133
+ single leading column. The zero block-size matches Vanilla's height: 0
134
+ title cell without hiding its readable text. */
135
+ @container (width >= 64.75rem) {
136
+ :where(.bf-theme) :where(.bf-data-spotlight-items) {
137
+ grid-template-columns: repeat(4, minmax(0, 1fr));
138
+ }
139
+
140
+ :where(.bf-theme) :where(.bf-data-spotlight-items)::after {
141
+ content: none;
142
+ }
143
+
144
+ :where(.bf-theme) :where(.bf-data-spotlight.is-two-blocks) :where(.bf-data-spotlight-header) {
145
+ block-size: 0;
146
+ grid-column: span 2;
147
+ overflow: visible;
148
+ }
149
+
150
+ :where(.bf-theme) :where(.bf-data-spotlight-item) {
151
+ grid-row: span 5;
152
+ }
153
+ }
154
+
155
+ /* Divided section: Vanilla's ruled 50/50 section is a one-column composition
156
+ until the relevant container can support the split. The rule is structural;
157
+ headings, copy, and content items keep their own metric-derived rhythm. */
158
+ :where(.bf-theme) :where(.bf-divided-section) {
159
+ container-type: inline-size;
160
+ margin: 0;
161
+ min-inline-size: 0;
162
+ }
163
+
164
+ :where(.bf-theme) :where(.bf-divided-section-layout) {
165
+ display: grid;
166
+ grid-template-columns: minmax(0, 1fr);
167
+ min-inline-size: 0;
168
+ }
169
+
170
+ :where(.bf-theme) :where(.bf-divided-section-rule) {
171
+ grid-column: 1 / -1;
172
+ }
173
+
174
+ :where(.bf-theme) :where(.bf-divided-section-header, .bf-divided-section-content) {
175
+ min-inline-size: 0;
176
+ }
177
+
168
178
  :where(.bf-theme) :where(.bf-divided-section-list) {
179
+ --bf-divided-section-rule-to-content: calc(0.5rem - var(--bf-border-width));
180
+ --bf-stack-space: 1.5rem;
181
+ list-style: none;
182
+ margin: 0;
183
+ padding: 0;
184
+ }
185
+
186
+ /* Preserve the pre-0.1.5 list markup; canonical composition also carries
187
+ bf-stack so the container remains the explicit owner of item spacing. */
188
+ :where(.bf-theme) :where(.bf-divided-section-list:not(.bf-stack)) {
169
189
  align-content: start;
170
190
  display: grid;
171
- list-style: none;
172
- margin: 0;
173
- padding: 0;
174
- }
175
-
191
+ gap: var(--bf-stack-space);
192
+ }
193
+
176
194
  :where(.bf-theme) :where(.bf-divided-section-item) {
177
195
  align-content: start;
178
196
  display: grid;
197
+ margin: 0;
179
198
  min-inline-size: 0;
180
- overflow-wrap: anywhere;
181
- }
182
-
183
- :where(.bf-theme) :where(.bf-divided-section-item:not(:last-child)) {
184
- padding-block-end: var(--bf-section-space-shallow);
185
- }
186
-
187
- :where(.bf-theme) :where(.bf-divided-section-item + .bf-divided-section-item) {
188
- border-block-start: var(--bf-border-width) solid var(--bf-color-border-low-contrast);
189
- padding-block-start: calc(var(--bf-section-space-shallow) - var(--bf-border-width));
190
- }
191
-
192
- @container (width >= 38.75rem) {
193
- :where(.bf-theme) :where(.bf-divided-section.is-split-medium) :where(.bf-divided-section-layout) {
194
- column-gap: var(--bf-grid-gap-inline);
195
- grid-template-columns: repeat(2, minmax(0, 1fr));
196
- }
197
- }
198
-
199
- @container (width >= 64.75rem) {
200
- :where(.bf-theme) :where(.bf-divided-section) :where(.bf-divided-section-layout) {
201
- column-gap: var(--bf-grid-gap-inline);
202
- grid-template-columns: repeat(2, minmax(0, 1fr));
203
- }
204
- }
199
+ overflow-wrap: anywhere;
200
+ padding: 0;
201
+ position: relative;
202
+ }
203
+
204
+ :where(.bf-theme) :where(.bf-divided-section-item + .bf-divided-section-item)::before {
205
+ background: var(--bf-color-border-low-contrast);
206
+ block-size: var(--bf-border-width);
207
+ content: "";
208
+ inset-block-start: calc((var(--bf-divided-section-rule-to-content) + var(--bf-border-width)) * -1);
209
+ inset-inline: 0;
210
+ position: absolute;
211
+ }
212
+
213
+ @container (width >= 45rem) {
214
+ :where(.bf-theme) :where(.bf-divided-section) :where(.bf-divided-section-layout) {
215
+ column-gap: var(--bf-grid-gap-inline);
216
+ grid-template-columns: repeat(2, minmax(0, 1fr));
217
+ }
218
+ }
205
219
  `;
206
220
  }
@@ -7,10 +7,10 @@
7
7
  * divided-section and basic-section remain independent BF components.
8
8
  *
9
9
  * Vanilla → BF mapping:
10
- * - 1036px large-grid switch → the 64.75rem descendant container query.
11
- * - p-section / shallow / deep → BF section boundary tokens.
10
+ * - 45rem readable split switch → the 45rem descendant container query.
11
+ * - section boundaries → the parent stack selected by the composition.
12
12
  * - the intermediate p-section--shallow before a separate tab rail →
13
- * padding-block-start on that rail using --bf-section-space-shallow.
13
+ * a shallow gap owned by the tab-section body.
14
14
  * - 8-column 4/4 and 2/6 spans → intrinsic 1/1 and 1/3 tracks.
15
15
  *
16
16
  * Heading type and content rhythm remain owned by semantic BF elements. The
@@ -7,97 +7,105 @@
7
7
  * divided-section and basic-section remain independent BF components.
8
8
  *
9
9
  * Vanilla → BF mapping:
10
- * - 1036px large-grid switch → the 64.75rem descendant container query.
11
- * - p-section / shallow / deep → BF section boundary tokens.
10
+ * - 45rem readable split switch → the 45rem descendant container query.
11
+ * - section boundaries → the parent stack selected by the composition.
12
12
  * - the intermediate p-section--shallow before a separate tab rail →
13
- * padding-block-start on that rail using --bf-section-space-shallow.
13
+ * a shallow gap owned by the tab-section body.
14
14
  * - 8-column 4/4 and 2/6 spans → intrinsic 1/1 and 1/3 tracks.
15
15
  *
16
16
  * Heading type and content rhythm remain owned by semantic BF elements. The
17
17
  * root establishes the container; every query styles descendants only.
18
18
  */
19
19
  export function tabSectionCss() {
20
- return `/* ------------------------------------------------------------------ */
21
- /* Sites tab section — structural layout over the existing BF tabs API. */
22
- /* ------------------------------------------------------------------ */
23
-
24
- :where(.bf-theme) :where(.bf-tab-section) {
25
- container-name: bf-tab-section;
26
- container-type: inline-size;
27
- margin-block-end: var(--bf-section-space);
28
- min-inline-size: 0;
29
- }
30
-
31
- :where(.bf-theme) :where(.bf-tab-section.is-shallow) {
32
- margin-block-end: var(--bf-section-space-shallow);
33
- }
34
-
35
- :where(.bf-theme) :where(.bf-tab-section.is-deep) {
36
- margin-block-end: var(--bf-section-space-deep);
37
- }
38
-
39
- :where(.bf-theme) :where(.bf-tab-section-layout) {
40
- display: grid;
41
- grid-template-columns: minmax(0, 1fr);
42
- min-inline-size: 0;
43
- }
44
-
45
- :where(.bf-theme) :where(.bf-tab-section-rule) {
46
- grid-column: 1 / -1;
47
- }
48
-
49
- :where(.bf-theme) :where(.bf-tab-section-header, .bf-tab-section-intro, .bf-tab-section-tabs) {
50
- min-inline-size: 0;
51
- overflow-wrap: anywhere;
52
- }
53
-
54
- /* Vanilla wraps every tab rail except the unadorned 50/50 special case in a
55
- shallow section. This explicit composition padding does not change any
56
- child's semantic margins. */
57
- :where(.bf-theme) :where(.bf-tab-section:not(.is-50-50)) > :where(.bf-tab-section-layout) > :where(.bf-tab-section-tabs),
58
- :where(.bf-theme) :where(.bf-tab-section.is-50-50) > :where(.bf-tab-section-layout:has(> .bf-tab-section-intro)) > :where(.bf-tab-section-tabs) {
59
- padding-block-start: var(--bf-section-space-shallow);
60
- }
61
-
62
- @container bf-tab-section (width >= 64.75rem) {
63
- :where(.bf-theme) :where(.bf-tab-section) > :where(.bf-tab-section-layout) {
64
- column-gap: var(--bf-grid-gap-inline);
65
- grid-template-columns: repeat(4, minmax(0, 1fr));
66
- }
67
-
68
- :where(.bf-theme) :where(.bf-tab-section) > :where(.bf-tab-section-layout) > :where(.bf-tab-section-header) {
69
- grid-column: 1 / -1;
70
- }
71
-
72
- /* With supporting copy or actions, Vanilla's heading row is 50/50 for all
73
- three section layouts. The following tab rail retains its own requested
74
- full, half or three-quarter span. */
75
- :where(.bf-theme) :where(.bf-tab-section-layout:has(> .bf-tab-section-intro)) > :where(.bf-tab-section-header) {
76
- grid-column: 1 / 3;
77
- }
78
-
79
- :where(.bf-theme) :where(.bf-tab-section) > :where(.bf-tab-section-layout) > :where(.bf-tab-section-intro) {
80
- grid-column: 3 / -1;
81
- }
82
-
83
- :where(.bf-theme) :where(.bf-tab-section) > :where(.bf-tab-section-layout) > :where(.bf-tab-section-tabs) {
84
- grid-column: 1 / -1;
85
- }
86
-
87
- /* An unadorned 50/50 section lets auto-placement put the heading and tabs
88
- in the same row. If an intro exists, it occupies that right-hand cell and
89
- the tabs move to the following row, matching the upstream rendering. */
90
- :where(.bf-theme) :where(.bf-tab-section.is-50-50) > :where(.bf-tab-section-layout) > :where(.bf-tab-section-header) {
91
- grid-column: 1 / 3;
92
- }
93
-
94
- :where(.bf-theme) :where(.bf-tab-section.is-50-50) > :where(.bf-tab-section-layout) > :where(.bf-tab-section-tabs) {
95
- grid-column: 3 / -1;
96
- }
97
-
98
- :where(.bf-theme) :where(.bf-tab-section.is-25-75) > :where(.bf-tab-section-layout) > :where(.bf-tab-section-tabs) {
99
- grid-column: 2 / -1;
100
- }
101
- }
20
+ return `/* ------------------------------------------------------------------ */
21
+ /* Sites tab section — structural layout over the existing BF tabs API. */
22
+ /* ------------------------------------------------------------------ */
23
+
24
+ :where(.bf-theme) :where(.bf-tab-section) {
25
+ container-name: bf-tab-section;
26
+ container-type: inline-size;
27
+ margin: 0;
28
+ min-inline-size: 0;
29
+ }
30
+
31
+ :where(.bf-theme) :where(.bf-tab-section-layout) {
32
+ display: grid;
33
+ grid-template-columns: minmax(0, 1fr);
34
+ min-inline-size: 0;
35
+ }
36
+
37
+ :where(.bf-theme) :where(.bf-tab-section-rule) {
38
+ grid-column: 1 / -1;
39
+ }
40
+
41
+ :where(.bf-theme) :where(.bf-tab-section-body) {
42
+ --bf-stack-space: var(--bf-section-space-shallow);
43
+ align-content: start;
44
+ display: grid;
45
+ gap: var(--bf-stack-space);
46
+ grid-template-columns: minmax(0, 1fr);
47
+ min-inline-size: 0;
48
+ }
49
+
50
+ :where(.bf-theme) :where(.bf-tab-section-copy) {
51
+ align-content: start;
52
+ display: grid;
53
+ grid-template-columns: minmax(0, 1fr);
54
+ min-inline-size: 0;
55
+ row-gap: var(--bf-space-1);
56
+ }
57
+
58
+ :where(.bf-theme) :where(.bf-tab-section-header, .bf-tab-section-intro, .bf-tab-section-tabs) {
59
+ min-inline-size: 0;
60
+ overflow-wrap: anywhere;
61
+ }
62
+
63
+ :where(.bf-theme) :where(.bf-tab-section-tabs) {
64
+ align-self: start;
65
+ }
66
+
67
+ @container bf-tab-section (width >= 45rem) {
68
+ :where(.bf-theme) :where(.bf-tab-section-body) {
69
+ column-gap: var(--bf-grid-gap-inline);
70
+ grid-template-columns: repeat(4, minmax(0, 1fr));
71
+ }
72
+
73
+ :where(.bf-theme) :where(.bf-tab-section-copy) {
74
+ grid-column: 1 / -1;
75
+ grid-template-columns: subgrid;
76
+ }
77
+
78
+ /* With supporting copy or actions, Vanilla's heading row is 50/50 for all
79
+ three section layouts. The following tab rail retains its own requested
80
+ full, half or three-quarter span. */
81
+ :where(.bf-theme) :where(.bf-tab-section-copy:has(> .bf-tab-section-intro)) > :where(.bf-tab-section-header) {
82
+ grid-column: 1 / 3;
83
+ }
84
+
85
+ :where(.bf-theme) :where(.bf-tab-section-copy) > :where(.bf-tab-section-intro) {
86
+ grid-column: 3 / -1;
87
+ }
88
+
89
+ :where(.bf-theme) :where(.bf-tab-section-body) > :where(.bf-tab-section-tabs) {
90
+ grid-column: 1 / -1;
91
+ }
92
+
93
+ /* An unadorned 50/50 section lets auto-placement put the heading and tabs
94
+ in the same row. If an intro exists, it occupies that right-hand cell and
95
+ the tabs move to the following row, matching the upstream rendering. */
96
+ :where(.bf-theme) :where(.bf-tab-section.is-50-50) :where(.bf-tab-section-copy:not(:has(> .bf-tab-section-intro))) {
97
+ grid-column: 1 / 3;
98
+ grid-row: 1;
99
+ }
100
+
101
+ :where(.bf-theme) :where(.bf-tab-section.is-50-50) :where(.bf-tab-section-copy:not(:has(> .bf-tab-section-intro))) + :where(.bf-tab-section-tabs) {
102
+ grid-column: 3 / -1;
103
+ grid-row: 1;
104
+ }
105
+
106
+ :where(.bf-theme) :where(.bf-tab-section.is-25-75) :where(.bf-tab-section-body) > :where(.bf-tab-section-tabs) {
107
+ grid-column: 2 / -1;
108
+ }
109
+ }
102
110
  `;
103
111
  }