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.
- package/README.md +577 -553
- 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/build.js +4 -4
- package/dist/code-snippet.js +1 -1
- package/dist/css-app-tier.js +78 -73
- package/dist/css-components/article-pagination.js +141 -140
- package/dist/css-components/button-actions.js +181 -161
- package/dist/css-components/cards-options.js +176 -176
- package/dist/css-components/chip-badge-status.d.ts +0 -3
- package/dist/css-components/chip-badge-status.js +174 -159
- package/dist/css-components/content-card.d.ts +7 -7
- package/dist/css-components/content-card.js +498 -497
- package/dist/css-components/control-row.d.ts +1 -1
- package/dist/css-components/control-row.js +15 -15
- package/dist/css-components/cta-figure-aspect.js +120 -120
- package/dist/css-components/document-navigation.js +427 -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 +239 -217
- package/dist/css-components/interactive-tables.js +160 -155
- package/dist/css-components/legacy-navigation.d.ts +8 -0
- package/dist/css-components/legacy-navigation.js +816 -0
- package/dist/css-components/linked-logo-site-layout.d.ts +3 -3
- package/dist/css-components/linked-logo-site-layout.js +177 -180
- package/dist/css-components/list-tree.js +96 -94
- package/dist/css-components/list.js +9 -7
- package/dist/css-components/logo-media.d.ts +6 -6
- package/dist/css-components/logo-media.js +218 -207
- package/dist/css-components/navigation-layout.js +144 -144
- package/dist/css-components/panel.js +148 -144
- package/dist/css-components/search-box-and-filter.d.ts +0 -1
- package/dist/css-components/search-box-and-filter.js +263 -264
- package/dist/css-components/sites-editorial-ports.d.ts +3 -4
- package/dist/css-components/sites-editorial-ports.js +279 -247
- package/dist/css-components/sites-foundation.js +142 -146
- package/dist/css-components/sites-rich-lists.d.ts +5 -5
- package/dist/css-components/sites-rich-lists.js +339 -349
- package/dist/css-components/static-content-ports.d.ts +3 -3
- package/dist/css-components/static-content-ports.js +200 -186
- package/dist/css-components/tab-section.d.ts +3 -3
- package/dist/css-components/tab-section.js +93 -85
- package/dist/css-components/table.js +76 -75
- package/dist/css-components/tabs-choice-breadcrumbs.js +307 -303
- package/dist/css-components/tiered-list-equal-height-row.js +271 -271
- package/dist/css-components.js +1881 -2554
- package/dist/css-grid.d.ts +1 -1
- package/dist/css-grid.js +183 -173
- package/dist/css.js +317 -241
- package/dist/experiments/ibm-plex-engine-smoke/styles.css +894 -538
- package/dist/experiments/ibm-plex-engine-smoke/surfaces.json +2 -2
- package/dist/experiments/ibm-plex-engine-smoke/tokens.json +1 -1
- package/dist/in-page-navigation.js +1 -1
- package/dist/presets/app-tier/styles.css +928 -568
- package/dist/presets/app-tier/surfaces.json +17 -17
- package/dist/presets/app-tier/tokens.json +7 -7
- package/dist/presets/prose/styles.css +919 -562
- package/dist/presets/prose/surfaces.json +17 -17
- package/dist/presets/prose/tokens.json +1 -1
- package/dist/resizable-aside.js +12 -4
- package/dist/styles.css +919 -562
- package/dist/surfaces.json +17 -17
- package/dist/tiers/app/styles.css +928 -568
- package/dist/tiers/app/surfaces.json +17 -17
- package/dist/tiers/app/tokens.json +7 -7
- package/dist/tiers/documentation/styles.css +920 -563
- package/dist/tiers/documentation/surfaces.json +17 -17
- package/dist/tiers/documentation/tokens.json +2 -2
- package/dist/tiers/editorial/styles.css +919 -562
- package/dist/tiers/editorial/surfaces.json +17 -17
- package/dist/tiers/editorial/tokens.json +1 -1
- package/dist/tiers/os/styles.css +925 -568
- package/dist/tiers/os/surfaces.json +17 -17
- package/dist/tiers/os/tokens.json +7 -7
- package/dist/tokens.json +1 -1
- package/dist/types.d.ts +1 -1
- package/docs/publishing.md +31 -14
- package/package.json +119 -108
|
@@ -7,145 +7,146 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export function articlePaginationCss(options) {
|
|
9
9
|
const { bodyCaseTypeStyles, titleTypeStyles } = options;
|
|
10
|
-
return `:where(.bf-theme) :where(.bf-article-pagination) {
|
|
11
|
-
container-name: bf-article-pagination;
|
|
12
|
-
container-type: inline-size;
|
|
13
|
-
display: grid;
|
|
14
|
-
grid-template-columns: auto minmax(0, 1fr);
|
|
15
|
-
margin
|
|
16
|
-
min-inline-size: 0;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
:where(.bf-theme) :where(.bf-article-pagination-link) {
|
|
20
|
-
background-color: var(--bf-color-background-default);
|
|
21
|
-
border: var(--bf-border-width) solid transparent;
|
|
22
|
-
box-sizing: border-box;
|
|
23
|
-
color: var(--bf-color-text-default);
|
|
24
|
-
display: grid;
|
|
25
|
-
column-gap: var(--bf-space-2);
|
|
26
|
-
grid-template-rows: auto auto;
|
|
27
|
-
inline-size: calc((100cqi - var(--bf-space-2)) / 2);
|
|
28
|
-
min-inline-size: 0;
|
|
29
|
-
padding-block: calc(var(--bf-space-2) + (var(--bf-baseline) / 4) - var(--bf-border-width));
|
|
30
|
-
position: relative;
|
|
31
|
-
row-gap: var(--bf-space-half);
|
|
32
|
-
text-decoration: none;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
:where(.bf-theme) :where(.bf-article-pagination-link:hover) {
|
|
36
|
-
background-color: var(--bf-color-background-hover);
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
outline
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
grid-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
grid-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
grid-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
:where(.bf-theme) :where(.bf-article-pagination-link.is-previous .bf-article-pagination-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
grid-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
:where(.bf-theme) :where(.bf-article-pagination-link.is-next .bf-article-pagination-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
:where(.bf-theme) :where(.bf-article-pagination-link.is-previous:not(:only-child) .bf-article-pagination-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
clip
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}
|
|
149
|
-
|
|
10
|
+
return `:where(.bf-theme) :where(.bf-article-pagination) {
|
|
11
|
+
container-name: bf-article-pagination;
|
|
12
|
+
container-type: inline-size;
|
|
13
|
+
display: grid;
|
|
14
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
15
|
+
margin: 0;
|
|
16
|
+
min-inline-size: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:where(.bf-theme) :where(a.bf-article-pagination-link) {
|
|
20
|
+
background-color: var(--bf-color-background-default);
|
|
21
|
+
border: var(--bf-border-width) solid transparent;
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
color: var(--bf-color-text-default);
|
|
24
|
+
display: grid;
|
|
25
|
+
column-gap: var(--bf-space-2);
|
|
26
|
+
grid-template-rows: auto auto;
|
|
27
|
+
inline-size: calc((100cqi - var(--bf-space-2)) / 2);
|
|
28
|
+
min-inline-size: 0;
|
|
29
|
+
padding-block: calc(var(--bf-space-2) + (var(--bf-baseline) / 4) - var(--bf-border-width));
|
|
30
|
+
position: relative;
|
|
31
|
+
row-gap: var(--bf-space-half);
|
|
32
|
+
text-decoration: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:where(.bf-theme) :where(a.bf-article-pagination-link:hover) {
|
|
36
|
+
background-color: var(--bf-color-background-hover);
|
|
37
|
+
text-decoration: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:where(.bf-theme) :where(.bf-article-pagination-link:focus:not(:focus-visible)) {
|
|
41
|
+
outline: none;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:where(.bf-theme) :where(.bf-article-pagination-link:focus-visible) {
|
|
45
|
+
outline: 0.125rem solid var(--bf-color-focus);
|
|
46
|
+
outline-offset: 0.125rem;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:where(.bf-theme) :where(.bf-article-pagination-link.is-previous) {
|
|
50
|
+
grid-column: 1;
|
|
51
|
+
grid-template-columns: var(--bf-icon-size-default) minmax(0, 1fr);
|
|
52
|
+
padding-inline: var(--bf-space-1) var(--bf-space-2);
|
|
53
|
+
text-align: start;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:where(.bf-theme) :where(.bf-article-pagination-link.is-next) {
|
|
57
|
+
grid-column: 2;
|
|
58
|
+
grid-template-columns: minmax(0, 1fr) var(--bf-icon-size-default);
|
|
59
|
+
justify-self: end;
|
|
60
|
+
padding-inline: var(--bf-space-2) var(--bf-space-1);
|
|
61
|
+
text-align: end;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:where(.bf-theme) :where(.bf-article-pagination-direction) {
|
|
65
|
+
${bodyCaseTypeStyles} color: inherit;
|
|
66
|
+
display: contents;
|
|
67
|
+
margin: 0;
|
|
68
|
+
min-inline-size: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:where(.bf-theme) :where(.bf-article-pagination-link.is-previous .bf-icon) {
|
|
72
|
+
align-self: center;
|
|
73
|
+
grid-column: 1;
|
|
74
|
+
grid-row: 1;
|
|
75
|
+
justify-self: start;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:where(.bf-theme) :where(.bf-article-pagination-link.is-previous .bf-article-pagination-label),
|
|
79
|
+
:where(.bf-theme) :where(.bf-article-pagination-link.is-previous .bf-article-pagination-title) {
|
|
80
|
+
grid-column: 2;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
:where(.bf-theme) :where(.bf-article-pagination-link.is-next .bf-icon) {
|
|
84
|
+
align-self: center;
|
|
85
|
+
grid-column: 2;
|
|
86
|
+
grid-row: 1;
|
|
87
|
+
justify-self: end;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
:where(.bf-theme) :where(.bf-article-pagination-link.is-next .bf-article-pagination-label),
|
|
91
|
+
:where(.bf-theme) :where(.bf-article-pagination-link.is-next .bf-article-pagination-title) {
|
|
92
|
+
grid-column: 1;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
:where(.bf-theme) :where(.bf-article-pagination-direction > .bf-icon) {
|
|
96
|
+
--bf-icon-size: var(--bf-icon-size-default);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
:where(.bf-theme) .bf-article-pagination:dir(rtl) .bf-article-pagination-link.is-previous .bf-icon {
|
|
100
|
+
--bf-icon-transform: rotate(-90deg);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
:where(.bf-theme) .bf-article-pagination:dir(rtl) .bf-article-pagination-link.is-next .bf-icon {
|
|
104
|
+
--bf-icon-transform: rotate(90deg);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
:where(.bf-theme) :where(.bf-article-pagination-label) {
|
|
108
|
+
grid-row: 1;
|
|
109
|
+
min-inline-size: 0;
|
|
110
|
+
overflow-wrap: anywhere;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
:where(.bf-theme) :where(.bf-article-pagination-title) {
|
|
114
|
+
${titleTypeStyles} color: inherit;
|
|
115
|
+
grid-row: 2;
|
|
116
|
+
margin: 0;
|
|
117
|
+
overflow-wrap: anywhere;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@container bf-article-pagination (width < 28.75rem) {
|
|
121
|
+
:where(.bf-theme) :where(.bf-article-pagination-link:only-child) {
|
|
122
|
+
grid-column: 1 / -1;
|
|
123
|
+
inline-size: 100%;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
:where(.bf-theme) :where(.bf-article-pagination-link.is-previous:not(:only-child)) {
|
|
127
|
+
grid-template-columns: var(--bf-icon-size-default);
|
|
128
|
+
inline-size: calc(var(--bf-space-6) + var(--bf-space-1));
|
|
129
|
+
padding-inline: var(--bf-space-1);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
:where(.bf-theme) :where(.bf-article-pagination-link.is-next:not(:only-child)) {
|
|
133
|
+
inline-size: 100%;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
:where(.bf-theme) :where(.bf-article-pagination-link.is-previous:not(:only-child) .bf-article-pagination-label),
|
|
137
|
+
:where(.bf-theme) :where(.bf-article-pagination-link.is-previous:not(:only-child) .bf-article-pagination-title) {
|
|
138
|
+
block-size: 0.0625rem;
|
|
139
|
+
border: 0;
|
|
140
|
+
clip: rect(0 0 0 0);
|
|
141
|
+
clip-path: inset(50%);
|
|
142
|
+
inline-size: 0.0625rem;
|
|
143
|
+
margin: -0.0625rem;
|
|
144
|
+
overflow: hidden;
|
|
145
|
+
padding: 0;
|
|
146
|
+
position: absolute;
|
|
147
|
+
white-space: nowrap;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
150
151
|
`;
|
|
151
152
|
}
|
|
@@ -1,165 +1,185 @@
|
|
|
1
1
|
export function buttonActionsCss(options) {
|
|
2
2
|
const { bodyTypeStyles, buttonMarginBottom, buttonPadding } = options;
|
|
3
|
-
return `:where(.bf-theme) :where(.bf-button, .bf-button.is-base) {
|
|
4
|
-
${bodyTypeStyles} appearance: none;
|
|
5
|
-
background-color: var(--bf-color-background-default);
|
|
6
|
-
border: var(--bf-border-width) solid var(--bf-color-border-high-contrast);
|
|
7
|
-
border-radius: var(--bf-radius);
|
|
8
|
-
color: var(--bf-color-text-default);
|
|
9
|
-
cursor: pointer;
|
|
10
|
-
display: inline-block;
|
|
11
|
-
margin-bottom: ${buttonMarginBottom};
|
|
12
|
-
${buttonPadding} padding-inline: var(--bf-control-inline-padding-action);
|
|
13
|
-
text-align: center;
|
|
14
|
-
text-decoration: none;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
:where(.bf-theme) :where(.bf-button) {
|
|
18
|
-
background-color: var(--bf-color-background-default);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
:where(.bf-theme) :where(.bf-button.is-base) {
|
|
22
|
-
background-color: transparent;
|
|
23
|
-
border-color: transparent;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
:where(.bf-theme) :where(.bf-button:hover, .bf-button.is-base:hover) {
|
|
27
|
-
background-color: var(--bf-color-background-hover);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
color: var(--bf-color-button-positive-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
color: var(--bf-color-button-positive-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
color: var(--bf-color-button-negative-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
color: var(--bf-color-button-negative-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
:where(.bf-theme) :where(.bf-button-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
:
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
3
|
+
return `:where(.bf-theme) :where(.bf-button, .bf-button.is-base) {
|
|
4
|
+
${bodyTypeStyles} appearance: none;
|
|
5
|
+
background-color: var(--bf-color-background-default);
|
|
6
|
+
border: var(--bf-border-width) solid var(--bf-color-border-high-contrast);
|
|
7
|
+
border-radius: var(--bf-radius);
|
|
8
|
+
color: var(--bf-color-text-default);
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
display: inline-block;
|
|
11
|
+
margin-bottom: ${buttonMarginBottom};
|
|
12
|
+
${buttonPadding} padding-inline: var(--bf-control-inline-padding-action-bordered);
|
|
13
|
+
text-align: center;
|
|
14
|
+
text-decoration: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:where(.bf-theme) :where(.bf-button) {
|
|
18
|
+
background-color: var(--bf-color-background-default);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:where(.bf-theme) :where(.bf-button.is-base) {
|
|
22
|
+
background-color: transparent;
|
|
23
|
+
border-color: transparent;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:where(.bf-theme) :where(.bf-button:hover, .bf-button.is-base:hover) {
|
|
27
|
+
background-color: var(--bf-color-background-hover);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* Anchor buttons are controls, not prose links. Qualifying the element and
|
|
31
|
+
* its interaction states prevents the generic anchor underline from leaking
|
|
32
|
+
* through while leaving the explicit is-link variant unchanged. */
|
|
33
|
+
:where(.bf-theme) :where(a.bf-button:not(.is-link):is(:hover, :active)) {
|
|
34
|
+
text-decoration: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:where(.bf-theme) :where(.bf-button:not(.is-base):is(:active, [aria-pressed='true'])) {
|
|
38
|
+
background-color: var(--bf-color-background-active);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:where(.bf-theme) :where(.bf-button, .bf-button.is-base):focus:not(:focus-visible) {
|
|
42
|
+
outline: none;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:where(.bf-theme) :where(.bf-button, .bf-button.is-base):focus-visible {
|
|
46
|
+
outline: 0.125rem solid var(--bf-color-focus);
|
|
47
|
+
outline-offset: 0.125rem;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* ------------------------------------------------------------------ */
|
|
51
|
+
/* Button — semantic positive modifier (Vanilla parity). */
|
|
52
|
+
/* Vanilla uses themed positive tokens for default/hover/active */
|
|
53
|
+
/* backgrounds plus a white text colour on a coloured surface. */
|
|
54
|
+
/* ------------------------------------------------------------------ */
|
|
55
|
+
|
|
56
|
+
:where(.bf-theme) :where(.bf-button.is-positive) {
|
|
57
|
+
background-color: var(--bf-color-button-positive-default);
|
|
58
|
+
border-color: var(--bf-color-button-positive-default);
|
|
59
|
+
color: var(--bf-color-button-positive-text);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:where(.bf-theme) :where(.bf-button.is-positive:hover) {
|
|
63
|
+
background-color: var(--bf-color-button-positive-hover);
|
|
64
|
+
border-color: var(--bf-color-button-positive-hover);
|
|
65
|
+
color: var(--bf-color-button-positive-text);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:where(.bf-theme) :where(.bf-button.is-positive:is(:active, [aria-pressed='true'])) {
|
|
69
|
+
background-color: var(--bf-color-button-positive-active);
|
|
70
|
+
border-color: var(--bf-color-button-positive-active);
|
|
71
|
+
color: var(--bf-color-button-positive-text);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* ------------------------------------------------------------------ */
|
|
75
|
+
/* Button — semantic negative modifier (Vanilla parity). */
|
|
76
|
+
/* Vanilla uses themed negative tokens for default/hover/active */
|
|
77
|
+
/* backgrounds plus a white text colour on a coloured surface. */
|
|
78
|
+
/* ------------------------------------------------------------------ */
|
|
79
|
+
|
|
80
|
+
:where(.bf-theme) :where(.bf-button.is-negative) {
|
|
81
|
+
background-color: var(--bf-color-button-negative-default);
|
|
82
|
+
border-color: var(--bf-color-button-negative-default);
|
|
83
|
+
color: var(--bf-color-button-negative-text);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
:where(.bf-theme) :where(.bf-button.is-negative:hover) {
|
|
87
|
+
background-color: var(--bf-color-button-negative-hover);
|
|
88
|
+
border-color: var(--bf-color-button-negative-hover);
|
|
89
|
+
color: var(--bf-color-button-negative-text);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
:where(.bf-theme) :where(.bf-button.is-negative:is(:active, [aria-pressed='true'])) {
|
|
93
|
+
background-color: var(--bf-color-button-negative-active);
|
|
94
|
+
border-color: var(--bf-color-button-negative-active);
|
|
95
|
+
color: var(--bf-color-button-negative-text);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* ------------------------------------------------------------------ */
|
|
99
|
+
/* Button — link-style modifier (Vanilla parity). */
|
|
100
|
+
/* BF starts from the shared button control contract, so the modifier */
|
|
101
|
+
/* has to strip control chrome and padding back down to inline-link */
|
|
102
|
+
/* behavior while reusing the shared link tokens. */
|
|
103
|
+
/* ------------------------------------------------------------------ */
|
|
104
|
+
|
|
105
|
+
:where(.bf-theme) :where(.bf-button.is-link) {
|
|
106
|
+
background-color: transparent;
|
|
107
|
+
border: 0;
|
|
108
|
+
border-radius: 0;
|
|
109
|
+
color: var(--bf-color-link-default);
|
|
110
|
+
margin-bottom: 0;
|
|
111
|
+
padding-block: 0;
|
|
112
|
+
padding-inline: 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
:where(.bf-theme) :where(.bf-button.is-link:hover) {
|
|
116
|
+
background-color: transparent;
|
|
117
|
+
color: var(--bf-color-link-default);
|
|
118
|
+
text-decoration: underline;
|
|
119
|
+
text-decoration-thickness: 0.0625rem;
|
|
120
|
+
text-underline-offset: 0.075em;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
:where(.bf-theme) :where(.bf-button.is-link:focus-visible) {
|
|
124
|
+
outline-offset: 0;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* ------------------------------------------------------------------ */
|
|
128
|
+
/* Button — icon-spacing modifier (Vanilla parity). */
|
|
129
|
+
/* Icon buttons make the icon/label relationship explicit. Bare text */
|
|
130
|
+
/* nodes cannot be distinguished from icon-only buttons in CSS because */
|
|
131
|
+
/* :first-child/:last-child ignore text nodes. A real label slot lets */
|
|
132
|
+
/* the component use one truthful, token-driven gap in either order. */
|
|
133
|
+
/* ------------------------------------------------------------------ */
|
|
134
|
+
|
|
135
|
+
:where(.bf-theme) :where(.bf-button.is-icon) > :where(.bf-icon) {
|
|
136
|
+
margin: 0;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
:where(.bf-theme) :where(.bf-button.is-icon) {
|
|
140
|
+
align-items: center;
|
|
141
|
+
column-gap: var(--bf-space-1);
|
|
142
|
+
display: inline-flex;
|
|
143
|
+
justify-content: center;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/* An icon-only flex button has no text line box to preserve the occupied
|
|
147
|
+
* control rhythm. A zero-width metric strut restores the active body line
|
|
148
|
+
* without imposing a target block size or changing icon/label spacing. */
|
|
149
|
+
:where(.bf-theme) :where(.bf-button.is-icon:not(:has(.bf-button-label))) {
|
|
150
|
+
column-gap: 0;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
:where(.bf-theme) :where(.bf-button.is-icon:not(:has(.bf-button-label)))::before {
|
|
154
|
+
block-size: var(--bf-body-line-height);
|
|
155
|
+
content: "";
|
|
156
|
+
inline-size: 0;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
:where(.bf-theme) :where(.bf-button-label) {
|
|
160
|
+
min-inline-size: 0;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
:where(.bf-theme) :where(.bf-actions) {
|
|
164
|
+
align-items: center;
|
|
165
|
+
display: flex;
|
|
166
|
+
flex-wrap: wrap;
|
|
167
|
+
gap: var(--bf-field-gap);
|
|
168
|
+
min-inline-size: 0;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
:where(.bf-theme) :where(.bf-actions.is-end) {
|
|
172
|
+
justify-content: flex-end;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
:where(.bf-theme) :where(.bf-actions.is-nowrap) {
|
|
176
|
+
flex-wrap: nowrap;
|
|
177
|
+
overflow-x: auto;
|
|
178
|
+
scrollbar-width: thin;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
:where(.bf-theme) :where(.bf-actions.is-nowrap) > * {
|
|
182
|
+
flex: 0 0 auto;
|
|
183
|
+
}
|
|
164
184
|
`;
|
|
165
185
|
}
|