baseline-foundry 0.1.3
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/LICENSE +21 -0
- package/README.md +588 -0
- package/config/experiments/ibm-plex-engine-smoke.json +115 -0
- package/config/experiments/ubuntu-engine-smoke.json +115 -0
- package/config/foundation-theme.json +117 -0
- package/config/tiers/app.json +120 -0
- package/config/tiers/documentation.json +120 -0
- package/config/tiers/editorial.json +120 -0
- package/config/tiers/os.json +120 -0
- package/dist/accordion.d.ts +5 -0
- package/dist/accordion.js +32 -0
- package/dist/application-layout.d.ts +4 -0
- package/dist/application-layout.js +181 -0
- package/dist/baseline-grid-overlay.d.ts +5 -0
- package/dist/baseline-grid-overlay.js +50 -0
- package/dist/baseline-grid-theme.d.ts +3 -0
- package/dist/baseline-grid-theme.js +3 -0
- package/dist/baseline-grid.d.ts +7 -0
- package/dist/baseline-grid.js +35 -0
- package/dist/build.d.ts +21 -0
- package/dist/build.js +440 -0
- package/dist/code-snippet.d.ts +6 -0
- package/dist/code-snippet.js +95 -0
- package/dist/contextual-menu.d.ts +4 -0
- package/dist/contextual-menu.js +156 -0
- package/dist/css-app-tier.d.ts +1 -0
- package/dist/css-app-tier.js +77 -0
- package/dist/css-components/article-pagination.d.ts +13 -0
- package/dist/css-components/article-pagination.js +151 -0
- package/dist/css-components/button-actions.d.ts +7 -0
- package/dist/css-components/button-actions.js +165 -0
- package/dist/css-components/cards-options.d.ts +6 -0
- package/dist/css-components/cards-options.js +180 -0
- package/dist/css-components/chip-badge-status.d.ts +10 -0
- package/dist/css-components/chip-badge-status.js +162 -0
- package/dist/css-components/content-card.d.ts +25 -0
- package/dist/css-components/content-card.js +517 -0
- package/dist/css-components/control-row.d.ts +2 -0
- package/dist/css-components/control-row.js +18 -0
- package/dist/css-components/cta-figure-aspect.d.ts +1 -0
- package/dist/css-components/cta-figure-aspect.js +123 -0
- package/dist/css-components/document-navigation.d.ts +13 -0
- package/dist/css-components/document-navigation.js +400 -0
- package/dist/css-components/editorial-content.d.ts +6 -0
- package/dist/css-components/editorial-content.js +52 -0
- package/dist/css-components/icon.d.ts +1 -0
- package/dist/css-components/icon.js +75 -0
- package/dist/css-components/interactive-feedback.d.ts +2 -0
- package/dist/css-components/interactive-feedback.js +230 -0
- package/dist/css-components/interactive-tables.d.ts +7 -0
- package/dist/css-components/interactive-tables.js +164 -0
- package/dist/css-components/linked-logo-site-layout.d.ts +21 -0
- package/dist/css-components/linked-logo-site-layout.js +214 -0
- package/dist/css-components/list-tree.d.ts +5 -0
- package/dist/css-components/list-tree.js +98 -0
- package/dist/css-components/list.d.ts +3 -0
- package/dist/css-components/list.js +119 -0
- package/dist/css-components/logo-media.d.ts +16 -0
- package/dist/css-components/logo-media.js +219 -0
- package/dist/css-components/navigation-layout.d.ts +5 -0
- package/dist/css-components/navigation-layout.js +151 -0
- package/dist/css-components/panel.d.ts +6 -0
- package/dist/css-components/panel.js +148 -0
- package/dist/css-components/search-box-and-filter.d.ts +9 -0
- package/dist/css-components/search-box-and-filter.js +267 -0
- package/dist/css-components/sites-editorial-ports.d.ts +19 -0
- package/dist/css-components/sites-editorial-ports.js +264 -0
- package/dist/css-components/sites-foundation.d.ts +17 -0
- package/dist/css-components/sites-foundation.js +173 -0
- package/dist/css-components/sites-rich-lists.d.ts +18 -0
- package/dist/css-components/sites-rich-lists.js +364 -0
- package/dist/css-components/static-content-ports.d.ts +14 -0
- package/dist/css-components/static-content-ports.js +206 -0
- package/dist/css-components/tab-section.d.ts +19 -0
- package/dist/css-components/tab-section.js +103 -0
- package/dist/css-components/table.d.ts +7 -0
- package/dist/css-components/table.js +79 -0
- package/dist/css-components/tabs-choice-breadcrumbs.d.ts +9 -0
- package/dist/css-components/tabs-choice-breadcrumbs.js +307 -0
- package/dist/css-components/tiered-list-equal-height-row.d.ts +1 -0
- package/dist/css-components/tiered-list-equal-height-row.js +286 -0
- package/dist/css-components.d.ts +2 -0
- package/dist/css-components.js +2701 -0
- package/dist/css-grid.d.ts +1 -0
- package/dist/css-grid.js +179 -0
- package/dist/css.d.ts +6 -0
- package/dist/css.js +431 -0
- package/dist/experiments/ibm-plex-engine-smoke/styles.css +8969 -0
- package/dist/experiments/ibm-plex-engine-smoke/surfaces.json +604 -0
- package/dist/experiments/ibm-plex-engine-smoke/tokens.json +217 -0
- package/dist/in-page-navigation.d.ts +7 -0
- package/dist/in-page-navigation.js +136 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.js +18 -0
- package/dist/interactive-feedback.d.ts +14 -0
- package/dist/interactive-feedback.js +96 -0
- package/dist/interactive-tables.d.ts +28 -0
- package/dist/interactive-tables.js +184 -0
- package/dist/list-tree.d.ts +4 -0
- package/dist/list-tree.js +44 -0
- package/dist/panel-drawer.d.ts +4 -0
- package/dist/panel-drawer.js +171 -0
- package/dist/presets/app-tier/styles.css +9459 -0
- package/dist/presets/app-tier/surfaces.json +1225 -0
- package/dist/presets/app-tier/tokens.json +221 -0
- package/dist/presets/prose/styles.css +9442 -0
- package/dist/presets/prose/surfaces.json +1225 -0
- package/dist/presets/prose/tokens.json +221 -0
- package/dist/presets.d.ts +6 -0
- package/dist/presets.js +27 -0
- package/dist/range-controls.d.ts +9 -0
- package/dist/range-controls.js +73 -0
- package/dist/resizable-aside.d.ts +4 -0
- package/dist/resizable-aside.js +328 -0
- package/dist/side-navigation.d.ts +4 -0
- package/dist/side-navigation.js +219 -0
- package/dist/styles.css +9442 -0
- package/dist/surfaces.json +1225 -0
- package/dist/tabs.d.ts +4 -0
- package/dist/tabs.js +88 -0
- package/dist/tier-registry.d.ts +10 -0
- package/dist/tier-registry.js +25 -0
- package/dist/tiers/app/styles.css +9459 -0
- package/dist/tiers/app/surfaces.json +1225 -0
- package/dist/tiers/app/tokens.json +221 -0
- package/dist/tiers/documentation/styles.css +9442 -0
- package/dist/tiers/documentation/surfaces.json +1225 -0
- package/dist/tiers/documentation/tokens.json +221 -0
- package/dist/tiers/editorial/styles.css +9442 -0
- package/dist/tiers/editorial/surfaces.json +1225 -0
- package/dist/tiers/editorial/tokens.json +221 -0
- package/dist/tiers/os/styles.css +9442 -0
- package/dist/tiers/os/surfaces.json +1225 -0
- package/dist/tiers/os/tokens.json +221 -0
- package/dist/tokens.json +221 -0
- package/dist/tooltip.d.ts +4 -0
- package/dist/tooltip.js +70 -0
- package/dist/top-navigation.d.ts +4 -0
- package/dist/top-navigation.js +354 -0
- package/dist/types.d.ts +155 -0
- package/dist/types.js +1 -0
- package/dist/vanilla-theme-colors.d.ts +5 -0
- package/dist/vanilla-theme-colors.js +208 -0
- package/docs/publishing.md +66 -0
- package/package.json +108 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
export function listTreeCss(options) {
|
|
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
|
+
}
|
|
97
|
+
`;
|
|
98
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
export function listCss({ bodyTypeStyles }) {
|
|
2
|
+
return `:where(.bf-theme) :where(.bf-list) {
|
|
3
|
+
align-content: start;
|
|
4
|
+
display: grid;
|
|
5
|
+
list-style: none;
|
|
6
|
+
margin: 0;
|
|
7
|
+
padding: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:where(.bf-theme) :where(.bf-list-item) {
|
|
11
|
+
${bodyTypeStyles} color: var(--bf-color-text-default);
|
|
12
|
+
margin: 0 0 var(--bf-body-margin-bottom);
|
|
13
|
+
min-inline-size: 0;
|
|
14
|
+
overflow-wrap: anywhere;
|
|
15
|
+
padding-block-end: 0;
|
|
16
|
+
padding-block-start: var(--bf-body-nudge-start);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
: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);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:where(.bf-theme) :where(.bf-list.is-divided) > :where(.bf-list-item:first-child) {
|
|
25
|
+
box-shadow: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
: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));
|
|
30
|
+
position: relative;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:where(.bf-theme) :where(.bf-list-item.is-ticked)::before,
|
|
34
|
+
:where(.bf-theme) :where(.bf-list-item.is-crossed)::before {
|
|
35
|
+
background-position: center;
|
|
36
|
+
background-repeat: no-repeat;
|
|
37
|
+
background-size: contain;
|
|
38
|
+
block-size: var(--bf-leading-icon-size);
|
|
39
|
+
content: "";
|
|
40
|
+
inline-size: var(--bf-leading-icon-size);
|
|
41
|
+
left: 0;
|
|
42
|
+
position: absolute;
|
|
43
|
+
top: var(--bf-leading-icon-offset);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:where(.bf-theme) :where(.bf-list-item.is-ticked)::before {
|
|
47
|
+
background-image: var(--bf-ui-icon-success-grey);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:where(.bf-theme) :where(.bf-list-item.is-crossed)::before {
|
|
51
|
+
background-image: var(--bf-ui-icon-error-grey);
|
|
52
|
+
}
|
|
53
|
+
|
|
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
|
+
:where(.bf-theme) :where(ol.bf-list.is-divided) {
|
|
59
|
+
counter-reset: bf-list-counter;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:where(.bf-theme) :where(ol.bf-list.is-divided) > :where(.bf-list-item) {
|
|
63
|
+
counter-increment: bf-list-counter;
|
|
64
|
+
list-style: none;
|
|
65
|
+
padding-inline-start: calc(var(--bf-baseline) * 4);
|
|
66
|
+
position: relative;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
:where(.bf-theme) :where(ol.bf-list.is-divided) > :where(.bf-list-item)::before {
|
|
70
|
+
${bodyTypeStyles} color: var(--bf-color-text-default);
|
|
71
|
+
content: counters(bf-list-counter, ".") ".";
|
|
72
|
+
inline-size: calc(var(--bf-baseline) * 2.5);
|
|
73
|
+
left: 0;
|
|
74
|
+
position: absolute;
|
|
75
|
+
text-align: right;
|
|
76
|
+
top: var(--bf-body-nudge-start);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:where(.bf-theme) :where(.bf-list-item) > :where(.bf-list) {
|
|
80
|
+
margin-inline-start: calc(var(--bf-baseline) * 3);
|
|
81
|
+
padding-block-start: var(--bf-body-nudge-end);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
:where(.bf-theme) :where(.bf-list-item.is-ticked, .bf-list-item.is-crossed) > :where(.bf-list) {
|
|
85
|
+
margin-inline-start: 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
:where(.bf-theme) :where(.bf-inline-list) {
|
|
89
|
+
margin: 0;
|
|
90
|
+
padding: 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
:where(.bf-theme) :where(.bf-inline-list-item) {
|
|
94
|
+
${bodyTypeStyles} display: inline-block;
|
|
95
|
+
list-style: none;
|
|
96
|
+
margin-inline-end: calc(var(--bf-baseline) * 1.5);
|
|
97
|
+
padding-block-end: var(--bf-body-nudge-end);
|
|
98
|
+
padding-block-start: var(--bf-body-nudge-start);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
:where(.bf-theme) :where(.bf-inline-list-item:last-of-type) {
|
|
102
|
+
margin-inline-end: 0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
:where(.bf-theme) :where(.bf-inline-list.is-middot) :where(.bf-inline-list-item) {
|
|
106
|
+
margin-inline-end: calc(var(--bf-baseline) * 1);
|
|
107
|
+
position: relative;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
:where(.bf-theme) :where(.bf-inline-list.is-middot) :where(.bf-inline-list-item)::after {
|
|
111
|
+
content: "\\2022";
|
|
112
|
+
display: inline;
|
|
113
|
+
margin-inline-start: calc(var(--bf-baseline) * 0.25);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
:where(.bf-theme) :where(.bf-inline-list.is-middot) :where(.bf-inline-list-item:last-of-type)::after {
|
|
117
|
+
content: "";
|
|
118
|
+
}`;
|
|
119
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vanilla parity ports: logo section and media object.
|
|
3
|
+
*
|
|
4
|
+
* Vanilla → BF rhythm mapping (at Vanilla's 8px unit):
|
|
5
|
+
* - Logo mark heights 72px / 104px → `space-8 + space-1` / `space-12 +
|
|
6
|
+
* space-1` (nine / thirteen BF baselines).
|
|
7
|
+
* - Logo 32px inline gap → `space-4`; Vanilla's 8px / 16px negative row pull
|
|
8
|
+
* and matching wrapper compensation → `space-1` / `space-2`.
|
|
9
|
+
* - Media thumbnails 48px / 96px → `space-6` / `space-12`; their 16px
|
|
10
|
+
* gap → `space-2`; trailing 24px → `section-space-shallow`; metadata top
|
|
11
|
+
* 8px → `space-1`.
|
|
12
|
+
*
|
|
13
|
+
* Those are relative values, rather than fixed pixels, so the same semantics
|
|
14
|
+
* retain the deliberately denser documentation, app, and OS tiers.
|
|
15
|
+
*/
|
|
16
|
+
export declare function logoMediaCss(): string;
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vanilla parity ports: logo section and media object.
|
|
3
|
+
*
|
|
4
|
+
* Vanilla → BF rhythm mapping (at Vanilla's 8px unit):
|
|
5
|
+
* - Logo mark heights 72px / 104px → `space-8 + space-1` / `space-12 +
|
|
6
|
+
* space-1` (nine / thirteen BF baselines).
|
|
7
|
+
* - Logo 32px inline gap → `space-4`; Vanilla's 8px / 16px negative row pull
|
|
8
|
+
* and matching wrapper compensation → `space-1` / `space-2`.
|
|
9
|
+
* - Media thumbnails 48px / 96px → `space-6` / `space-12`; their 16px
|
|
10
|
+
* gap → `space-2`; trailing 24px → `section-space-shallow`; metadata top
|
|
11
|
+
* 8px → `space-1`.
|
|
12
|
+
*
|
|
13
|
+
* Those are relative values, rather than fixed pixels, so the same semantics
|
|
14
|
+
* retain the deliberately denser documentation, app, and OS tiers.
|
|
15
|
+
*/
|
|
16
|
+
export function logoMediaCss() {
|
|
17
|
+
return `/* ------------------------------------------------------------------ */
|
|
18
|
+
/* Logo section — intrinsic linked marks, without the deprecated logo-block. */
|
|
19
|
+
/* ------------------------------------------------------------------ */
|
|
20
|
+
|
|
21
|
+
:where(.bf-theme) :where(.bf-logo-section) {
|
|
22
|
+
container-name: bf-logo-section;
|
|
23
|
+
container-type: inline-size;
|
|
24
|
+
margin-block-end: var(--bf-section-space-shallow);
|
|
25
|
+
min-inline-size: 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:where(.bf-theme) :where(.bf-logo-section-items) {
|
|
29
|
+
align-items: center;
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-wrap: wrap;
|
|
32
|
+
column-gap: var(--bf-space-4);
|
|
33
|
+
min-inline-size: 0;
|
|
34
|
+
padding-block: var(--bf-space-1);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:where(.bf-theme) :where(.bf-logo-section-item) {
|
|
38
|
+
align-items: center;
|
|
39
|
+
block-size: calc(var(--bf-space-8) + var(--bf-space-1));
|
|
40
|
+
display: flex;
|
|
41
|
+
flex: 0 0 auto;
|
|
42
|
+
max-inline-size: 100%;
|
|
43
|
+
margin-block: calc(var(--bf-space-1) * -1);
|
|
44
|
+
min-inline-size: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:where(.bf-theme) :where(.bf-logo-section-link) {
|
|
48
|
+
align-items: center;
|
|
49
|
+
display: inline-flex;
|
|
50
|
+
max-inline-size: 100%;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
:where(.bf-theme) :where(.bf-logo-section-link:focus:not(:focus-visible)) {
|
|
54
|
+
outline: none;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
:where(.bf-theme) :where(.bf-logo-section-link:focus-visible) {
|
|
58
|
+
outline: 2px solid var(--bf-color-focus);
|
|
59
|
+
outline-offset: 2px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:where(.bf-theme) :where(.bf-logo-section-logo) {
|
|
63
|
+
block-size: 100%;
|
|
64
|
+
display: block;
|
|
65
|
+
inline-size: auto;
|
|
66
|
+
max-inline-size: 100%;
|
|
67
|
+
object-fit: contain;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* An explicit fallback for marks supplied in inconsistent intrinsic ratios.
|
|
71
|
+
It is named for the component's behaviour—not Vanilla's legacy selector. */
|
|
72
|
+
:where(.bf-theme) :where(.bf-logo-section.is-contained) :where(.bf-logo-section-item) {
|
|
73
|
+
inline-size: calc(var(--bf-space-8) + var(--bf-space-1));
|
|
74
|
+
margin-block: 0 var(--bf-space-1);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
:where(.bf-theme) :where(.bf-logo-section.is-contained) :where(.bf-logo-section-items) {
|
|
78
|
+
padding-block: 0;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:where(.bf-theme) :where(.bf-logo-section.is-contained) :where(.bf-logo-section-logo) {
|
|
82
|
+
block-size: auto;
|
|
83
|
+
inline-size: 100%;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* Vanilla's small breakpoint is 620px. The items descendant, rather than the
|
|
87
|
+
query container itself, responds when its allocated space reaches it. */
|
|
88
|
+
@container bf-logo-section (width >= 38.75rem) {
|
|
89
|
+
:where(.bf-theme) :where(.bf-logo-section-items) {
|
|
90
|
+
padding-block: var(--bf-space-2);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
:where(.bf-theme) :where(.bf-logo-section-item) {
|
|
94
|
+
block-size: calc(var(--bf-space-12) + var(--bf-space-1));
|
|
95
|
+
margin-block: calc(var(--bf-space-2) * -1);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
:where(.bf-theme) :where(.bf-logo-section.is-contained) :where(.bf-logo-section-item) {
|
|
99
|
+
inline-size: calc(var(--bf-space-12) + var(--bf-space-1));
|
|
100
|
+
margin-block: 0 var(--bf-space-1);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
:where(.bf-theme) :where(.bf-logo-section.is-contained) :where(.bf-logo-section-items) {
|
|
104
|
+
padding-block: 0;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* ------------------------------------------------------------------ */
|
|
109
|
+
/* Media object — semantic media/content slots with a container-owned */
|
|
110
|
+
/* structural collapse only. Content roles retain their own spacing. */
|
|
111
|
+
/* ------------------------------------------------------------------ */
|
|
112
|
+
|
|
113
|
+
:where(.bf-theme) :where(.bf-media-object) {
|
|
114
|
+
margin-block-end: var(--bf-section-space-shallow);
|
|
115
|
+
min-inline-size: 0;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
:where(.bf-theme) :where(.bf-media-object-layout) {
|
|
119
|
+
display: grid;
|
|
120
|
+
align-items: start;
|
|
121
|
+
column-gap: var(--bf-space-2);
|
|
122
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
123
|
+
min-inline-size: 0;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
:where(.bf-theme) :where(.bf-media-object-media) {
|
|
127
|
+
align-self: start;
|
|
128
|
+
block-size: var(--bf-space-6);
|
|
129
|
+
inline-size: var(--bf-space-6);
|
|
130
|
+
max-inline-size: 100%;
|
|
131
|
+
min-inline-size: 0;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
:where(.bf-theme) :where(.bf-media-object-media > :where(img, picture, svg, video)) {
|
|
135
|
+
block-size: 100%;
|
|
136
|
+
display: block;
|
|
137
|
+
inline-size: 100%;
|
|
138
|
+
max-inline-size: 100%;
|
|
139
|
+
object-fit: contain;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
:where(.bf-theme) :where(.bf-media-object-media.is-round > :where(img, picture, svg, video)) {
|
|
143
|
+
border-radius: 50%;
|
|
144
|
+
object-fit: cover;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
:where(.bf-theme) :where(.bf-media-object-content) {
|
|
148
|
+
min-inline-size: 0;
|
|
149
|
+
overflow-wrap: anywhere;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/* This is a real heading slot. The class may be applied to h1–h6; regular
|
|
153
|
+
media objects use BF h4 while the large composition promotes to h1. */
|
|
154
|
+
:where(.bf-theme) :where(.bf-media-object-title) {
|
|
155
|
+
font-family: var(--bf-h4-font-family);
|
|
156
|
+
font-size: var(--bf-h4-font-size);
|
|
157
|
+
font-style: var(--bf-h4-font-style);
|
|
158
|
+
font-variant-caps: var(--bf-h4-font-variant-caps);
|
|
159
|
+
font-weight: var(--bf-h4-font-weight);
|
|
160
|
+
letter-spacing: var(--bf-h4-letter-spacing);
|
|
161
|
+
line-height: var(--bf-h4-line-height);
|
|
162
|
+
margin-block: 0 var(--bf-h4-margin-bottom);
|
|
163
|
+
overflow-wrap: anywhere;
|
|
164
|
+
padding-block: var(--bf-h4-nudge-start) 0;
|
|
165
|
+
text-transform: var(--bf-h4-text-transform);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
:where(.bf-theme) :where(.bf-media-object.is-large) :where(.bf-media-object-media) {
|
|
169
|
+
block-size: var(--bf-space-12);
|
|
170
|
+
inline-size: var(--bf-space-12);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
:where(.bf-theme) :where(.bf-media-object.is-large) :where(.bf-media-object-title) {
|
|
174
|
+
font-family: var(--bf-h1-font-family);
|
|
175
|
+
font-size: var(--bf-h1-font-size);
|
|
176
|
+
font-style: var(--bf-h1-font-style);
|
|
177
|
+
font-variant-caps: var(--bf-h1-font-variant-caps);
|
|
178
|
+
font-weight: var(--bf-h1-font-weight);
|
|
179
|
+
letter-spacing: var(--bf-h1-letter-spacing);
|
|
180
|
+
line-height: var(--bf-h1-line-height);
|
|
181
|
+
margin-block: 0 var(--bf-h1-margin-bottom);
|
|
182
|
+
padding-block: var(--bf-h1-nudge-start) 0;
|
|
183
|
+
text-transform: var(--bf-h1-text-transform);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
:where(.bf-theme) :where(.bf-media-object-meta-list) {
|
|
187
|
+
list-style: none;
|
|
188
|
+
margin: var(--bf-space-1) 0 0;
|
|
189
|
+
padding: 0;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
:where(.bf-theme) :where(.bf-media-object-meta) {
|
|
193
|
+
align-items: start;
|
|
194
|
+
column-gap: var(--bf-space-1);
|
|
195
|
+
display: grid;
|
|
196
|
+
grid-template-columns: var(--bf-icon-size-default) minmax(0, 1fr);
|
|
197
|
+
min-inline-size: 0;
|
|
198
|
+
overflow-wrap: anywhere;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
:where(.bf-theme) :where(.bf-media-object-meta + .bf-media-object-meta) {
|
|
202
|
+
margin-block-start: var(--bf-space-1);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
:where(.bf-theme) :where(.bf-media-object-meta .bf-icon) {
|
|
206
|
+
margin-block-start: var(--bf-body-nudge-start);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
:where(.bf-theme) :where(.bf-media-object.is-media-end) :where(.bf-media-object-content) {
|
|
210
|
+
grid-column: 1;
|
|
211
|
+
grid-row: 1;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
:where(.bf-theme) :where(.bf-media-object.is-media-end) :where(.bf-media-object-media) {
|
|
215
|
+
grid-column: 2;
|
|
216
|
+
grid-row: 1;
|
|
217
|
+
}
|
|
218
|
+
`;
|
|
219
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Navigation and page composition contracts that compose existing navigation
|
|
3
|
+
* primitives without changing their interaction ownership.
|
|
4
|
+
*/
|
|
5
|
+
export function navigationLayoutCss() {
|
|
6
|
+
return `/* ------------------------------------------------------------------ */
|
|
7
|
+
/* Navigation layout and page shell */
|
|
8
|
+
/* ------------------------------------------------------------------ */
|
|
9
|
+
|
|
10
|
+
/* The row is only a layout owner. Interactive children own the occupied
|
|
11
|
+
* block; row padding would leave an unpainted strip below their highlights. */
|
|
12
|
+
:where(.bf-theme) :where(.bf-top-navigation-row) {
|
|
13
|
+
padding-block: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* The tagged treatment is opt-in. The Circle of Friends is aligned to the
|
|
17
|
+
* first title line, then the 38px tag extends upward to the navigation edge.
|
|
18
|
+
* Its 22px inline size preserves the established 38:22 (~1.73) tag ratio; the
|
|
19
|
+
* tag must not stretch to the full occupied navigation row. */
|
|
20
|
+
:where(.bf-theme) :where(.bf-top-navigation-logo.is-canonical-tagged) {
|
|
21
|
+
min-inline-size: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:where(.bf-theme) :where(.bf-top-navigation-logo.is-canonical-tagged) > :where(.bf-top-navigation-link) {
|
|
25
|
+
align-items: start;
|
|
26
|
+
column-gap: 0;
|
|
27
|
+
display: inline-flex;
|
|
28
|
+
inline-size: 100%;
|
|
29
|
+
justify-content: flex-start;
|
|
30
|
+
padding-block: 0;
|
|
31
|
+
padding-inline: 0;
|
|
32
|
+
padding-inline-start: calc(var(--bf-top-navigation-logo-tag-inline-size) + var(--bf-top-navigation-logo-tag-gap));
|
|
33
|
+
position: relative;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:where(.bf-theme) :where(.bf-top-navigation-logo.is-canonical-tagged) :where(.bf-top-navigation-logo-tag) {
|
|
37
|
+
align-items: flex-end;
|
|
38
|
+
background: var(--bf-color-brand);
|
|
39
|
+
block-size: var(--bf-top-navigation-logo-tag-block-size);
|
|
40
|
+
box-sizing: border-box;
|
|
41
|
+
display: flex;
|
|
42
|
+
inline-size: var(--bf-top-navigation-logo-tag-inline-size);
|
|
43
|
+
inset-block-start: 0;
|
|
44
|
+
inset-inline-start: 0;
|
|
45
|
+
justify-content: center;
|
|
46
|
+
padding-block: 0 var(--bf-top-navigation-logo-icon-bottom-offset);
|
|
47
|
+
padding-inline: 0;
|
|
48
|
+
position: absolute;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:where(.bf-theme) :where(.bf-top-navigation-logo.is-canonical-tagged) ~ :where(.bf-top-navigation-list.is-banner-actions) :where(.bf-top-navigation-menu-toggle, .bf-top-navigation-search-toggle),
|
|
52
|
+
:where(.bf-theme) :where(.bf-top-navigation.is-grid-aligned) :where(.bf-top-navigation-nav) :where(.bf-top-navigation-link, .bf-top-navigation-search-toggle) {
|
|
53
|
+
block-size: 100%;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:where(.bf-theme) :where(.bf-top-navigation-logo.is-canonical-tagged) :where(.bf-top-navigation-logo-icon) {
|
|
57
|
+
block-size: var(--bf-top-navigation-logo-icon-size);
|
|
58
|
+
display: block;
|
|
59
|
+
flex: 0 0 auto;
|
|
60
|
+
inline-size: var(--bf-top-navigation-logo-icon-size);
|
|
61
|
+
transform: translateX(var(--bf-top-navigation-logo-icon-optical-offset-inline));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:where(.bf-theme) :where(.bf-top-navigation-logo.is-canonical-tagged) :where(.bf-top-navigation-logo-title) {
|
|
65
|
+
align-self: start;
|
|
66
|
+
color: var(--bf-color-text-default);
|
|
67
|
+
font-size: var(--bf-top-navigation-logo-title-font-size, var(--bf-body-font-size, 1rem));
|
|
68
|
+
font-weight: 300;
|
|
69
|
+
line-height: var(--bf-top-navigation-logo-title-line-height, var(--bf-body-line-height, 1.5));
|
|
70
|
+
overflow: visible;
|
|
71
|
+
overflow-wrap: anywhere;
|
|
72
|
+
/* The first title line and the 16px mark share the mark's fixed centre:
|
|
73
|
+
* tag block-end minus the 6px inset minus half the mark. Symmetric title
|
|
74
|
+
* padding keeps the occupied row stable across all four type-density tiers. */
|
|
75
|
+
padding-block: calc(
|
|
76
|
+
var(--bf-top-navigation-logo-tag-block-size)
|
|
77
|
+
- var(--bf-top-navigation-logo-icon-bottom-offset)
|
|
78
|
+
- (var(--bf-top-navigation-logo-icon-size) / 2)
|
|
79
|
+
- (var(--bf-top-navigation-logo-title-line-height, var(--bf-body-line-height, 1.5rem)) / 2)
|
|
80
|
+
);
|
|
81
|
+
text-overflow: clip;
|
|
82
|
+
white-space: normal;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* A grid-aligned header uses the same eight tracks and gutter as page content.
|
|
86
|
+
* The brand/banner owns columns one and two; primary navigation starts at
|
|
87
|
+
* column three. No independent brand-width token can drift from that grid. */
|
|
88
|
+
:where(.bf-theme) :where(.bf-top-navigation.is-grid-aligned) {
|
|
89
|
+
container-type: inline-size;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@media (min-width: 64.75rem) {
|
|
93
|
+
:where(.bf-theme) :where(.bf-top-navigation.is-grid-aligned) :where(.bf-top-navigation-row) {
|
|
94
|
+
column-gap: var(--bf-grid-gap-inline);
|
|
95
|
+
display: grid;
|
|
96
|
+
grid-template-columns: repeat(8, minmax(0, 1fr));
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
:where(.bf-theme) :where(.bf-top-navigation.is-grid-aligned) :where(.bf-top-navigation-banner) {
|
|
100
|
+
grid-column: 1 / span 2;
|
|
101
|
+
min-inline-size: 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
:where(.bf-theme) :where(.bf-top-navigation.is-grid-aligned) :where(.bf-top-navigation-nav) {
|
|
105
|
+
grid-column: 3 / -1;
|
|
106
|
+
min-inline-size: 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
:where(.bf-theme) :where(.bf-top-navigation.is-grid-aligned) :where(.bf-top-navigation-dropdown) {
|
|
110
|
+
top: 100%;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* Documentation composition stays single-column until its own container can
|
|
115
|
+
* support the intentional 2/6 navigation/content split. The optional
|
|
116
|
+
* navigation slot never creates a mobile rail. */
|
|
117
|
+
:where(.bf-theme) :where(.bf-docs-layout) {
|
|
118
|
+
align-items: start;
|
|
119
|
+
column-gap: var(--bf-grid-gap-inline);
|
|
120
|
+
container-type: inline-size;
|
|
121
|
+
display: grid;
|
|
122
|
+
grid-template-columns: repeat(8, minmax(0, 1fr));
|
|
123
|
+
min-inline-size: 0;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
:where(.bf-theme) :where(.bf-docs-layout-navigation, .bf-docs-layout-content) {
|
|
127
|
+
grid-column: 1 / -1;
|
|
128
|
+
min-inline-size: 0;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@media (min-width: 64.75rem) {
|
|
132
|
+
@container (width >= 38.75rem) {
|
|
133
|
+
:where(.bf-theme) :where(.bf-docs-layout:has(> .bf-docs-layout-navigation)) > :where(.bf-docs-layout-navigation) {
|
|
134
|
+
grid-column: span 2;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
:where(.bf-theme) :where(.bf-docs-layout:has(> .bf-docs-layout-navigation)) > :where(.bf-docs-layout-content) {
|
|
138
|
+
grid-column: span 6;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* This is deliberately scoped to an explicit page shell. Importing a BF tier
|
|
144
|
+
* alone never changes the consuming document body's user-agent margin. */
|
|
145
|
+
:where(body.bf-theme.bf-page-shell) {
|
|
146
|
+
background: var(--bf-color-background-default);
|
|
147
|
+
margin: 0;
|
|
148
|
+
min-block-size: 100dvb;
|
|
149
|
+
}
|
|
150
|
+
`;
|
|
151
|
+
}
|