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
@@ -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-block-end: var(--bf-section-space-shallow);
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
- :where(.bf-theme) :where(.bf-article-pagination-link:focus:not(:focus-visible)) {
40
- outline: none;
41
- }
42
-
43
- :where(.bf-theme) :where(.bf-article-pagination-link:focus-visible) {
44
- outline: 2px solid var(--bf-color-focus);
45
- outline-offset: 2px;
46
- }
47
-
48
- :where(.bf-theme) :where(.bf-article-pagination-link.is-previous) {
49
- grid-column: 1;
50
- grid-template-columns: var(--bf-icon-size-default) minmax(0, 1fr);
51
- padding-inline: var(--bf-space-1) var(--bf-space-2);
52
- text-align: start;
53
- }
54
-
55
- :where(.bf-theme) :where(.bf-article-pagination-link.is-next) {
56
- grid-column: 2;
57
- grid-template-columns: minmax(0, 1fr) var(--bf-icon-size-default);
58
- justify-self: end;
59
- padding-inline: var(--bf-space-2) var(--bf-space-1);
60
- text-align: end;
61
- }
62
-
63
- :where(.bf-theme) :where(.bf-article-pagination-direction) {
64
- ${bodyCaseTypeStyles} color: inherit;
65
- display: contents;
66
- margin: 0;
67
- min-inline-size: 0;
68
- }
69
-
70
- :where(.bf-theme) :where(.bf-article-pagination-link.is-previous .bf-icon) {
71
- align-self: center;
72
- grid-column: 1;
73
- grid-row: 1;
74
- justify-self: start;
75
- }
76
-
77
- :where(.bf-theme) :where(.bf-article-pagination-link.is-previous .bf-article-pagination-label),
78
- :where(.bf-theme) :where(.bf-article-pagination-link.is-previous .bf-article-pagination-title) {
79
- grid-column: 2;
80
- }
81
-
82
- :where(.bf-theme) :where(.bf-article-pagination-link.is-next .bf-icon) {
83
- align-self: center;
84
- grid-column: 2;
85
- grid-row: 1;
86
- justify-self: end;
87
- }
88
-
89
- :where(.bf-theme) :where(.bf-article-pagination-link.is-next .bf-article-pagination-label),
90
- :where(.bf-theme) :where(.bf-article-pagination-link.is-next .bf-article-pagination-title) {
91
- grid-column: 1;
92
- }
93
-
94
- :where(.bf-theme) :where(.bf-article-pagination-direction > .bf-icon) {
95
- --bf-icon-size: var(--bf-icon-size-default);
96
- }
97
-
98
- :where(.bf-theme) .bf-article-pagination:dir(rtl) .bf-article-pagination-link.is-previous .bf-icon {
99
- --bf-icon-transform: rotate(-90deg);
100
- }
101
-
102
- :where(.bf-theme) .bf-article-pagination:dir(rtl) .bf-article-pagination-link.is-next .bf-icon {
103
- --bf-icon-transform: rotate(90deg);
104
- }
105
-
106
- :where(.bf-theme) :where(.bf-article-pagination-label) {
107
- grid-row: 1;
108
- min-inline-size: 0;
109
- overflow-wrap: anywhere;
110
- }
111
-
112
- :where(.bf-theme) :where(.bf-article-pagination-title) {
113
- ${titleTypeStyles} color: inherit;
114
- grid-row: 2;
115
- margin: 0;
116
- overflow-wrap: anywhere;
117
- }
118
-
119
- @container bf-article-pagination (width < 28.75rem) {
120
- :where(.bf-theme) :where(.bf-article-pagination-link:only-child) {
121
- grid-column: 1 / -1;
122
- inline-size: 100%;
123
- }
124
-
125
- :where(.bf-theme) :where(.bf-article-pagination-link.is-previous:not(:only-child)) {
126
- grid-template-columns: var(--bf-icon-size-default);
127
- inline-size: calc(var(--bf-space-6) + var(--bf-space-1));
128
- padding-inline: var(--bf-space-1);
129
- }
130
-
131
- :where(.bf-theme) :where(.bf-article-pagination-link.is-next:not(:only-child)) {
132
- inline-size: 100%;
133
- }
134
-
135
- :where(.bf-theme) :where(.bf-article-pagination-link.is-previous:not(:only-child) .bf-article-pagination-label),
136
- :where(.bf-theme) :where(.bf-article-pagination-link.is-previous:not(:only-child) .bf-article-pagination-title) {
137
- block-size: 1px;
138
- border: 0;
139
- clip: rect(0 0 0 0);
140
- clip-path: inset(50%);
141
- inline-size: 1px;
142
- margin: -1px;
143
- overflow: hidden;
144
- padding: 0;
145
- position: absolute;
146
- white-space: nowrap;
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
- :where(.bf-theme) :where(.bf-button:not(.is-base):is(:active, [aria-pressed='true'])) {
31
- background-color: var(--bf-color-background-active);
32
- }
33
-
34
- :where(.bf-theme) :where(.bf-button, .bf-button.is-base):focus:not(:focus-visible) {
35
- outline: none;
36
- }
37
-
38
- :where(.bf-theme) :where(.bf-button, .bf-button.is-base):focus-visible {
39
- outline: 2px solid var(--bf-color-focus);
40
- outline-offset: 2px;
41
- }
42
-
43
- /* ------------------------------------------------------------------ */
44
- /* Button — semantic positive modifier (Vanilla parity). */
45
- /* Vanilla uses themed positive tokens for default/hover/active */
46
- /* backgrounds plus a white text colour on a coloured surface. */
47
- /* ------------------------------------------------------------------ */
48
-
49
- :where(.bf-theme) :where(.bf-button.is-positive) {
50
- background-color: var(--bf-color-button-positive-default);
51
- border-color: var(--bf-color-button-positive-default);
52
- color: var(--bf-color-button-positive-text);
53
- }
54
-
55
- :where(.bf-theme) :where(.bf-button.is-positive:hover) {
56
- background-color: var(--bf-color-button-positive-hover);
57
- border-color: var(--bf-color-button-positive-hover);
58
- color: var(--bf-color-button-positive-text);
59
- }
60
-
61
- :where(.bf-theme) :where(.bf-button.is-positive:is(:active, [aria-pressed='true'])) {
62
- background-color: var(--bf-color-button-positive-active);
63
- border-color: var(--bf-color-button-positive-active);
64
- color: var(--bf-color-button-positive-text);
65
- }
66
-
67
- /* ------------------------------------------------------------------ */
68
- /* Button — semantic negative modifier (Vanilla parity). */
69
- /* Vanilla uses themed negative tokens for default/hover/active */
70
- /* backgrounds plus a white text colour on a coloured surface. */
71
- /* ------------------------------------------------------------------ */
72
-
73
- :where(.bf-theme) :where(.bf-button.is-negative) {
74
- background-color: var(--bf-color-button-negative-default);
75
- border-color: var(--bf-color-button-negative-default);
76
- color: var(--bf-color-button-negative-text);
77
- }
78
-
79
- :where(.bf-theme) :where(.bf-button.is-negative:hover) {
80
- background-color: var(--bf-color-button-negative-hover);
81
- border-color: var(--bf-color-button-negative-hover);
82
- color: var(--bf-color-button-negative-text);
83
- }
84
-
85
- :where(.bf-theme) :where(.bf-button.is-negative:is(:active, [aria-pressed='true'])) {
86
- background-color: var(--bf-color-button-negative-active);
87
- border-color: var(--bf-color-button-negative-active);
88
- color: var(--bf-color-button-negative-text);
89
- }
90
-
91
- /* ------------------------------------------------------------------ */
92
- /* Button — link-style modifier (Vanilla parity). */
93
- /* BF starts from the shared button control contract, so the modifier */
94
- /* has to strip control chrome and padding back down to inline-link */
95
- /* behavior while reusing the shared link tokens. */
96
- /* ------------------------------------------------------------------ */
97
-
98
- :where(.bf-theme) :where(.bf-button.is-link) {
99
- background-color: transparent;
100
- border: 0;
101
- border-radius: 0;
102
- color: var(--bf-color-link-default);
103
- margin-bottom: 0;
104
- padding-block: 0;
105
- padding-inline: 0;
106
- }
107
-
108
- :where(.bf-theme) :where(.bf-button.is-link:hover) {
109
- background-color: transparent;
110
- color: var(--bf-color-link-default);
111
- text-decoration: underline;
112
- text-decoration-thickness: 1px;
113
- text-underline-offset: 0.075em;
114
- }
115
-
116
- :where(.bf-theme) :where(.bf-button.is-link:focus-visible) {
117
- outline-offset: 0;
118
- }
119
-
120
- /* ------------------------------------------------------------------ */
121
- /* Button — icon-spacing modifier (Vanilla parity). */
122
- /* Icon buttons make the icon/label relationship explicit. Bare text */
123
- /* nodes cannot be distinguished from icon-only buttons in CSS because */
124
- /* :first-child/:last-child ignore text nodes. A real label slot lets */
125
- /* the component use one truthful, token-driven gap in either order. */
126
- /* ------------------------------------------------------------------ */
127
-
128
- :where(.bf-theme) :where(.bf-button.is-icon) > :where(.bf-icon) {
129
- margin: 0;
130
- }
131
-
132
- :where(.bf-theme) :where(.bf-button.is-icon) {
133
- align-items: center;
134
- column-gap: var(--bf-space-1);
135
- display: inline-flex;
136
- justify-content: center;
137
- }
138
-
139
- :where(.bf-theme) :where(.bf-button-label) {
140
- min-inline-size: 0;
141
- }
142
-
143
- :where(.bf-theme) :where(.bf-actions) {
144
- align-items: center;
145
- display: flex;
146
- flex-wrap: wrap;
147
- gap: var(--bf-field-gap);
148
- min-inline-size: 0;
149
- }
150
-
151
- :where(.bf-theme) :where(.bf-actions.is-end) {
152
- justify-content: flex-end;
153
- }
154
-
155
- :where(.bf-theme) :where(.bf-actions.is-nowrap) {
156
- flex-wrap: nowrap;
157
- overflow-x: auto;
158
- scrollbar-width: thin;
159
- }
160
-
161
- :where(.bf-theme) :where(.bf-actions.is-nowrap) > * {
162
- flex: 0 0 auto;
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
  }