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.
- package/README.md +568 -552
- package/config/experiments/ibm-plex-engine-smoke.json +115 -115
- package/config/experiments/ubuntu-engine-smoke.json +115 -115
- package/config/foundation-theme.json +110 -110
- package/config/tiers/app.json +116 -116
- package/config/tiers/documentation.json +116 -116
- package/config/tiers/editorial.json +116 -116
- package/config/tiers/os.json +116 -116
- package/dist/baseline-grid-overlay.js +43 -43
- package/dist/css-app-tier.js +73 -73
- package/dist/css-components/article-pagination.js +140 -140
- package/dist/css-components/button-actions.js +161 -161
- package/dist/css-components/cards-options.js +176 -176
- package/dist/css-components/chip-badge-status.js +158 -158
- package/dist/css-components/content-card.js +490 -490
- package/dist/css-components/control-row.js +14 -14
- package/dist/css-components/cta-figure-aspect.js +120 -120
- package/dist/css-components/document-navigation.js +390 -390
- package/dist/css-components/editorial-content.js +42 -42
- package/dist/css-components/icon.js +72 -72
- package/dist/css-components/interactive-feedback.js +217 -217
- package/dist/css-components/interactive-tables.js +155 -155
- package/dist/css-components/legacy-navigation.d.ts +9 -0
- package/dist/css-components/legacy-navigation.js +763 -0
- package/dist/css-components/linked-logo-site-layout.js +177 -177
- package/dist/css-components/list-tree.js +94 -94
- package/dist/css-components/logo-media.js +201 -201
- package/dist/css-components/navigation-layout.js +144 -144
- package/dist/css-components/panel.js +144 -144
- package/dist/css-components/search-box-and-filter.js +263 -263
- package/dist/css-components/sites-editorial-ports.js +243 -243
- package/dist/css-components/sites-foundation.js +146 -146
- package/dist/css-components/sites-rich-lists.js +344 -344
- package/dist/css-components/static-content-ports.js +182 -182
- package/dist/css-components/tab-section.js +82 -82
- package/dist/css-components/table.js +75 -75
- package/dist/css-components/tabs-choice-breadcrumbs.js +303 -303
- package/dist/css-components/tiered-list-equal-height-row.js +271 -271
- package/dist/css-components.js +1791 -2542
- package/dist/css-grid.js +172 -172
- package/dist/css.js +240 -240
- package/docs/publishing.md +30 -13
- package/package.json +119 -108
package/dist/css-grid.js
CHANGED
|
@@ -3,177 +3,177 @@ export function gridCss() {
|
|
|
3
3
|
const baseSpans = [1, 2, 4].map(span => spanRule(span)).join("\n");
|
|
4
4
|
const mediumSpans = [1, 2, 4, 8].map(span => spanRule(span, " ")).join("\n");
|
|
5
5
|
const largeSpans = [1, 2, 4, 8, 16].map(span => spanRule(span, " ")).join("\n");
|
|
6
|
-
return `/* ------------------------------------------------------------------ */
|
|
7
|
-
/* Gutter and margin escalation — viewport-based, all tiers */
|
|
8
|
-
/* Grid spec v0.3 §2.3: gutters set by global viewport breakpoint. */
|
|
9
|
-
/* Baseline Foundry models the spec's 460px x-small row as part of the */
|
|
10
|
-
/* default <620px bracket because the values do not change at 460px. */
|
|
11
|
-
/* ------------------------------------------------------------------ */
|
|
12
|
-
|
|
13
|
-
:where(.bf-theme) {
|
|
14
|
-
--bf-grid-gap-inline: 1rem;
|
|
15
|
-
--bf-grid-gap-block: 1rem;
|
|
16
|
-
--bf-page-margin: 1rem;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@media (width >= 38.75rem) {
|
|
20
|
-
:where(.bf-theme) {
|
|
21
|
-
--bf-grid-gap-inline: 1.5rem;
|
|
22
|
-
--bf-grid-gap-block: 1.5rem;
|
|
23
|
-
--bf-page-margin: 1.5rem;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
@media (width >= 64.75rem) {
|
|
28
|
-
:where(.bf-theme) {
|
|
29
|
-
--bf-grid-gap-inline: 2rem;
|
|
30
|
-
--bf-grid-gap-block: 2rem;
|
|
31
|
-
--bf-page-margin: 2rem;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
:where(.bf-theme.bf-tier-app) {
|
|
35
|
-
--bf-grid-gap-inline: 1.5rem;
|
|
36
|
-
--bf-grid-gap-block: 1.5rem;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
:where(.bf-theme) :where(.bf-application),
|
|
40
|
-
:where(.bf-theme):where(.bf-application) {
|
|
41
|
-
--bf-grid-gap-inline: 1.5rem;
|
|
42
|
-
--bf-grid-gap-block: 1.5rem;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/* ------------------------------------------------------------------ */
|
|
47
|
-
/* Container query contexts */
|
|
48
|
-
/* */
|
|
49
|
-
/* All tiers use container queries for column switching. In editorial */
|
|
50
|
-
/* and docs, .bf-page is the single grid container — centered and */
|
|
51
|
-
/* capped at --bf-content-max-width — so the container width mirrors */
|
|
52
|
-
/* the viewport (spec §3: "viewport-based grid"). In app tier, */
|
|
53
|
-
/* .bf-page is fluid (no max-width) and multiple concurrent containers */
|
|
54
|
-
/* can each establish their own grid context (spec §5). */
|
|
55
|
-
/* ------------------------------------------------------------------ */
|
|
56
|
-
|
|
57
|
-
:where(.bf-theme) :where(.bf-page, .bf-grid-scope, .bf-section, .bf-strip, .bf-fixed-width, .bf-panel-content, .bf-accordion-panel, .bf-main, .bf-aside),
|
|
58
|
-
:where(.bf-theme):where(.bf-page, .bf-grid-scope, .bf-section, .bf-strip, .bf-fixed-width, .bf-panel-content, .bf-accordion-panel, .bf-main, .bf-aside) {
|
|
59
|
-
container-type: inline-size;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/* ------------------------------------------------------------------ */
|
|
63
|
-
/* Page-level layout */
|
|
64
|
-
/* Editorial/docs: centered + max-width (spec §3.2) */
|
|
65
|
-
/* App: fluid edge-to-edge (spec §5.2) */
|
|
66
|
-
/* ------------------------------------------------------------------ */
|
|
67
|
-
|
|
68
|
-
:where(.bf-theme) :where(.bf-fixed-width) {
|
|
69
|
-
margin-inline: auto;
|
|
70
|
-
max-inline-size: var(--bf-content-max-width);
|
|
71
|
-
padding-inline: max(var(--bf-page-margin), var(--bf-content-padding-inline));
|
|
72
|
-
width: 100%;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/* Keep a capped content row at the logical start of a wider panel. */
|
|
76
|
-
:where(.bf-theme) :where(.bf-fixed-width.is-start-aligned) {
|
|
77
|
-
margin-inline-end: auto;
|
|
78
|
-
margin-inline-start: 0;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
:where(.bf-theme.bf-tier-app) :where(.bf-page) {
|
|
82
|
-
max-inline-size: none;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
:where(.bf-theme) :where(.bf-panel-content, .bf-accordion-panel) :where(.bf-fixed-width) {
|
|
86
|
-
padding-inline: 0;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
:where(.bf-theme) :where(.bf-grid) :where(.bf-fixed-width) {
|
|
90
|
-
padding-inline: 0;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/* ------------------------------------------------------------------ */
|
|
94
|
-
/* Grid base — 4 columns, all tiers */
|
|
95
|
-
/* ------------------------------------------------------------------ */
|
|
96
|
-
|
|
97
|
-
:where(.bf-theme) :where(.bf-grid) {
|
|
98
|
-
--bf-grid-columns: 4;
|
|
99
|
-
display: grid;
|
|
100
|
-
/* bf-grid keeps row-gap at 0; the block token stays available for */
|
|
101
|
-
/* two-dimensional layouts and other structural layout-gap cases. */
|
|
102
|
-
gap: 0 var(--bf-grid-gap-inline);
|
|
103
|
-
grid-template-columns: repeat(var(--bf-grid-columns), minmax(0, 1fr));
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
:where(.bf-theme) :where(ul.bf-grid, ol.bf-grid) {
|
|
107
|
-
list-style: none;
|
|
108
|
-
margin: 0;
|
|
109
|
-
padding: 0;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
:where(.bf-theme) :where(.bf-grid.is-guide) > * {
|
|
113
|
-
background: color-mix(in srgb, var(--bf-color-accent) 18%, var(--bf-color-background-default));
|
|
114
|
-
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bf-color-accent) 50%, var(--bf-color-rule));
|
|
115
|
-
min-block-size: calc(var(--bf-baseline) * 4);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
:where(.bf-theme) :where(.bf-grid) > * {
|
|
119
|
-
grid-column: auto / span var(--bf-grid-columns);
|
|
120
|
-
min-inline-size: 0;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
:where(.bf-theme) :where(.bf-grid.bf-grid.is-controls) {
|
|
124
|
-
container-type: inline-size;
|
|
125
|
-
gap: var(--bf-field-gap);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
:where(.bf-theme) :where(.bf-grid.bf-grid.is-controls) > :where(.bf-grid-item.is-control, .bf-grid-item.is-control-pair) {
|
|
129
|
-
grid-column: auto / span 4;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
${baseSpans}
|
|
133
|
-
|
|
134
|
-
/* ------------------------------------------------------------------ */
|
|
135
|
-
/* Container-based column switching — all tiers */
|
|
136
|
-
/* Editorial/docs containers are .bf-page (centered, max-width), so */
|
|
137
|
-
/* container width tracks viewport. App containers can be any layout */
|
|
138
|
-
/* region (panels, drawers, main area). */
|
|
139
|
-
/* ------------------------------------------------------------------ */
|
|
140
|
-
|
|
141
|
-
@container (width >= 38.75rem) {
|
|
142
|
-
:where(.bf-theme) :where(.bf-grid) {
|
|
143
|
-
--bf-grid-columns: 8;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
:where(.bf-theme) :where(.bf-grid.bf-grid.is-controls) > :where(.bf-grid-item.is-control) {
|
|
147
|
-
grid-column: auto / span 2;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
:where(.bf-theme) :where(.bf-grid.bf-grid.is-controls) > :where(.bf-grid-item.is-control-pair) {
|
|
151
|
-
grid-column: auto / span 4;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
${mediumSpans}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
@container (width >= 105.0625rem) {
|
|
158
|
-
:where(.bf-theme) :where(.bf-grid) {
|
|
159
|
-
--bf-grid-columns: 16;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
:where(.bf-theme) :where(.bf-grid.bf-grid.is-controls) > :where(.bf-grid-item.is-control) {
|
|
163
|
-
grid-column: auto / span 4;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
:where(.bf-theme) :where(.bf-grid.bf-grid.is-controls) > :where(.bf-grid-item.is-control-pair) {
|
|
167
|
-
grid-column: auto / span 8;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
${largeSpans}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/* Full span follows every generated numbered-span rule so normal cascade
|
|
174
|
-
* order is sufficient; consumers never need cascade escalation. */
|
|
175
|
-
:where(.bf-theme) :where(.bf-grid) > :where(.bf-span-full) {
|
|
176
|
-
grid-column: 1 / -1;
|
|
177
|
-
}
|
|
6
|
+
return `/* ------------------------------------------------------------------ */
|
|
7
|
+
/* Gutter and margin escalation — viewport-based, all tiers */
|
|
8
|
+
/* Grid spec v0.3 §2.3: gutters set by global viewport breakpoint. */
|
|
9
|
+
/* Baseline Foundry models the spec's 460px x-small row as part of the */
|
|
10
|
+
/* default <620px bracket because the values do not change at 460px. */
|
|
11
|
+
/* ------------------------------------------------------------------ */
|
|
12
|
+
|
|
13
|
+
:where(.bf-theme) {
|
|
14
|
+
--bf-grid-gap-inline: 1rem;
|
|
15
|
+
--bf-grid-gap-block: 1rem;
|
|
16
|
+
--bf-page-margin: 1rem;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@media (width >= 38.75rem) {
|
|
20
|
+
:where(.bf-theme) {
|
|
21
|
+
--bf-grid-gap-inline: 1.5rem;
|
|
22
|
+
--bf-grid-gap-block: 1.5rem;
|
|
23
|
+
--bf-page-margin: 1.5rem;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@media (width >= 64.75rem) {
|
|
28
|
+
:where(.bf-theme) {
|
|
29
|
+
--bf-grid-gap-inline: 2rem;
|
|
30
|
+
--bf-grid-gap-block: 2rem;
|
|
31
|
+
--bf-page-margin: 2rem;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:where(.bf-theme.bf-tier-app) {
|
|
35
|
+
--bf-grid-gap-inline: 1.5rem;
|
|
36
|
+
--bf-grid-gap-block: 1.5rem;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:where(.bf-theme) :where(.bf-application),
|
|
40
|
+
:where(.bf-theme):where(.bf-application) {
|
|
41
|
+
--bf-grid-gap-inline: 1.5rem;
|
|
42
|
+
--bf-grid-gap-block: 1.5rem;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* ------------------------------------------------------------------ */
|
|
47
|
+
/* Container query contexts */
|
|
48
|
+
/* */
|
|
49
|
+
/* All tiers use container queries for column switching. In editorial */
|
|
50
|
+
/* and docs, .bf-page is the single grid container — centered and */
|
|
51
|
+
/* capped at --bf-content-max-width — so the container width mirrors */
|
|
52
|
+
/* the viewport (spec §3: "viewport-based grid"). In app tier, */
|
|
53
|
+
/* .bf-page is fluid (no max-width) and multiple concurrent containers */
|
|
54
|
+
/* can each establish their own grid context (spec §5). */
|
|
55
|
+
/* ------------------------------------------------------------------ */
|
|
56
|
+
|
|
57
|
+
:where(.bf-theme) :where(.bf-page, .bf-grid-scope, .bf-section, .bf-strip, .bf-fixed-width, .bf-panel-content, .bf-accordion-panel, .bf-main, .bf-aside),
|
|
58
|
+
:where(.bf-theme):where(.bf-page, .bf-grid-scope, .bf-section, .bf-strip, .bf-fixed-width, .bf-panel-content, .bf-accordion-panel, .bf-main, .bf-aside) {
|
|
59
|
+
container-type: inline-size;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* ------------------------------------------------------------------ */
|
|
63
|
+
/* Page-level layout */
|
|
64
|
+
/* Editorial/docs: centered + max-width (spec §3.2) */
|
|
65
|
+
/* App: fluid edge-to-edge (spec §5.2) */
|
|
66
|
+
/* ------------------------------------------------------------------ */
|
|
67
|
+
|
|
68
|
+
:where(.bf-theme) :where(.bf-fixed-width) {
|
|
69
|
+
margin-inline: auto;
|
|
70
|
+
max-inline-size: var(--bf-content-max-width);
|
|
71
|
+
padding-inline: max(var(--bf-page-margin), var(--bf-content-padding-inline));
|
|
72
|
+
width: 100%;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Keep a capped content row at the logical start of a wider panel. */
|
|
76
|
+
:where(.bf-theme) :where(.bf-fixed-width.is-start-aligned) {
|
|
77
|
+
margin-inline-end: auto;
|
|
78
|
+
margin-inline-start: 0;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:where(.bf-theme.bf-tier-app) :where(.bf-page) {
|
|
82
|
+
max-inline-size: none;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
:where(.bf-theme) :where(.bf-panel-content, .bf-accordion-panel) :where(.bf-fixed-width) {
|
|
86
|
+
padding-inline: 0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
:where(.bf-theme) :where(.bf-grid) :where(.bf-fixed-width) {
|
|
90
|
+
padding-inline: 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* ------------------------------------------------------------------ */
|
|
94
|
+
/* Grid base — 4 columns, all tiers */
|
|
95
|
+
/* ------------------------------------------------------------------ */
|
|
96
|
+
|
|
97
|
+
:where(.bf-theme) :where(.bf-grid) {
|
|
98
|
+
--bf-grid-columns: 4;
|
|
99
|
+
display: grid;
|
|
100
|
+
/* bf-grid keeps row-gap at 0; the block token stays available for */
|
|
101
|
+
/* two-dimensional layouts and other structural layout-gap cases. */
|
|
102
|
+
gap: 0 var(--bf-grid-gap-inline);
|
|
103
|
+
grid-template-columns: repeat(var(--bf-grid-columns), minmax(0, 1fr));
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
:where(.bf-theme) :where(ul.bf-grid, ol.bf-grid) {
|
|
107
|
+
list-style: none;
|
|
108
|
+
margin: 0;
|
|
109
|
+
padding: 0;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
:where(.bf-theme) :where(.bf-grid.is-guide) > * {
|
|
113
|
+
background: color-mix(in srgb, var(--bf-color-accent) 18%, var(--bf-color-background-default));
|
|
114
|
+
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bf-color-accent) 50%, var(--bf-color-rule));
|
|
115
|
+
min-block-size: calc(var(--bf-baseline) * 4);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
:where(.bf-theme) :where(.bf-grid) > * {
|
|
119
|
+
grid-column: auto / span var(--bf-grid-columns);
|
|
120
|
+
min-inline-size: 0;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
:where(.bf-theme) :where(.bf-grid.bf-grid.is-controls) {
|
|
124
|
+
container-type: inline-size;
|
|
125
|
+
gap: var(--bf-field-gap);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
:where(.bf-theme) :where(.bf-grid.bf-grid.is-controls) > :where(.bf-grid-item.is-control, .bf-grid-item.is-control-pair) {
|
|
129
|
+
grid-column: auto / span 4;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
${baseSpans}
|
|
133
|
+
|
|
134
|
+
/* ------------------------------------------------------------------ */
|
|
135
|
+
/* Container-based column switching — all tiers */
|
|
136
|
+
/* Editorial/docs containers are .bf-page (centered, max-width), so */
|
|
137
|
+
/* container width tracks viewport. App containers can be any layout */
|
|
138
|
+
/* region (panels, drawers, main area). */
|
|
139
|
+
/* ------------------------------------------------------------------ */
|
|
140
|
+
|
|
141
|
+
@container (width >= 38.75rem) {
|
|
142
|
+
:where(.bf-theme) :where(.bf-grid) {
|
|
143
|
+
--bf-grid-columns: 8;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
:where(.bf-theme) :where(.bf-grid.bf-grid.is-controls) > :where(.bf-grid-item.is-control) {
|
|
147
|
+
grid-column: auto / span 2;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
:where(.bf-theme) :where(.bf-grid.bf-grid.is-controls) > :where(.bf-grid-item.is-control-pair) {
|
|
151
|
+
grid-column: auto / span 4;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
${mediumSpans}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@container (width >= 105.0625rem) {
|
|
158
|
+
:where(.bf-theme) :where(.bf-grid) {
|
|
159
|
+
--bf-grid-columns: 16;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
:where(.bf-theme) :where(.bf-grid.bf-grid.is-controls) > :where(.bf-grid-item.is-control) {
|
|
163
|
+
grid-column: auto / span 4;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
:where(.bf-theme) :where(.bf-grid.bf-grid.is-controls) > :where(.bf-grid-item.is-control-pair) {
|
|
167
|
+
grid-column: auto / span 8;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
${largeSpans}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/* Full span follows every generated numbered-span rule so normal cascade
|
|
174
|
+
* order is sufficient; consumers never need cascade escalation. */
|
|
175
|
+
:where(.bf-theme) :where(.bf-grid) > :where(.bf-span-full) {
|
|
176
|
+
grid-column: 1 / -1;
|
|
177
|
+
}
|
|
178
178
|
`;
|
|
179
179
|
}
|