@stackoverflow/stacks 1.8.0 → 1.9.1

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 (137) hide show
  1. package/README.md +161 -153
  2. package/dist/{controllers/s-banner.d.ts → components/banner/banner.d.ts} +1 -1
  3. package/dist/{controllers/s-expandable-control.d.ts → components/expandable/expandable.d.ts} +1 -1
  4. package/dist/{controllers/s-modal.d.ts → components/modal/modal.d.ts} +1 -1
  5. package/dist/{controllers/s-navigation-tablist.d.ts → components/navigation/navigation.d.ts} +1 -1
  6. package/dist/{controllers/s-popover.d.ts → components/popover/popover.d.ts} +1 -1
  7. package/dist/{controllers/s-tooltip.d.ts → components/popover/tooltip.d.ts} +1 -1
  8. package/dist/components/table/table.d.ts +30 -0
  9. package/dist/{controllers/s-toast.d.ts → components/toast/toast.d.ts} +1 -1
  10. package/dist/{controllers/s-uploader.d.ts → components/uploader/uploader.d.ts} +1 -1
  11. package/dist/controllers.d.ts +9 -0
  12. package/dist/css/stacks.css +2063 -1994
  13. package/dist/css/stacks.min.css +1 -1
  14. package/dist/index.d.ts +1 -1
  15. package/dist/js/stacks.js +1465 -1436
  16. package/dist/js/stacks.min.js +1 -1
  17. package/lib/{css/atomic/borders.less → atomic/border.less} +397 -379
  18. package/lib/{css/atomic/colors.less → atomic/color.less} +210 -210
  19. package/lib/{css/atomic → atomic}/flex.less +426 -426
  20. package/lib/{css/atomic → atomic}/gap.less +44 -44
  21. package/lib/{css/atomic → atomic}/grid.less +139 -139
  22. package/lib/{css/atomic → atomic}/misc.less +343 -343
  23. package/lib/{css/atomic → atomic}/spacing.less +342 -342
  24. package/lib/{css/atomic → atomic}/typography.less +267 -267
  25. package/lib/{css/atomic → atomic}/width-height.less +194 -194
  26. package/lib/{css/base → base}/body.less +44 -44
  27. package/lib/{css/base → base}/configuration-static.less +61 -61
  28. package/lib/{css/base → base}/fieldset.less +5 -5
  29. package/lib/{css/base/icons.less → base/icon.less} +11 -20
  30. package/lib/{css/base/internals.less → base/internal.less} +220 -220
  31. package/lib/{css/base → base}/reset-meyer.less +64 -64
  32. package/lib/{css/base → base}/reset-normalize.less +449 -449
  33. package/lib/{css/base → base}/reset.less +20 -20
  34. package/lib/components/activity-indicator/activity-indicator.a11y.test.ts +21 -0
  35. package/lib/{css/components → components/activity-indicator}/activity-indicator.less +40 -40
  36. package/lib/components/activity-indicator/activity-indicator.visual.test.ts +23 -0
  37. package/lib/{css/components/anchors.less → components/anchor/anchor.less} +61 -61
  38. package/lib/components/avatar/avatar.a11y.test.ts +36 -0
  39. package/lib/{css/components/avatars.less → components/avatar/avatar.less} +108 -108
  40. package/lib/components/avatar/avatar.visual.test.ts +54 -0
  41. package/lib/components/award-bling/award-bling.a11y.test.ts +17 -0
  42. package/lib/{css/components → components/award-bling}/award-bling.less +31 -31
  43. package/lib/components/award-bling/award-bling.visual.test.ts +26 -0
  44. package/lib/{css/components/badges.less → components/badge/badge.less} +251 -251
  45. package/lib/components/banner/banner.a11y.test.ts +37 -0
  46. package/lib/components/banner/banner.less +51 -0
  47. package/lib/{test/s-banner.test.ts → components/banner/banner.test.ts} +73 -73
  48. package/lib/{ts/controllers/s-banner.ts → components/banner/banner.ts} +149 -149
  49. package/lib/components/banner/banner.visual.test.ts +37 -0
  50. package/lib/components/block-link/block-link.a11y.test.ts +68 -0
  51. package/lib/{css/components → components/block-link}/block-link.less +80 -80
  52. package/lib/components/block-link/block-link.visual.test.ts +61 -0
  53. package/lib/components/breadcrumbs/breadcrumbs.a11y.test.ts +37 -0
  54. package/lib/{css/components → components/breadcrumbs}/breadcrumbs.less +41 -41
  55. package/lib/components/breadcrumbs/breadcrumbs.visual.test.ts +37 -0
  56. package/lib/components/button/button.a11y.test.ts +32 -0
  57. package/lib/{css/components/buttons.less → components/button/button.less} +502 -501
  58. package/lib/components/button/button.visual.test.ts +52 -0
  59. package/lib/{css/components/button-groups.less → components/button-group/button-group.less} +83 -83
  60. package/lib/components/card/card.a11y.test.ts +13 -0
  61. package/lib/{css/components/cards.less → components/card/card.less} +29 -29
  62. package/lib/components/card/card.visual.test.ts +54 -0
  63. package/lib/components/check-control/check-control.less +17 -0
  64. package/lib/components/check-group/check-group.less +19 -0
  65. package/lib/{css/components/checkboxes-radios.less → components/checkbox_radio/checkbox_radio.less} +158 -158
  66. package/lib/{css/components/code-blocks.less → components/code-block/code-block.less} +116 -116
  67. package/lib/{css/components → components/description}/description.less +9 -9
  68. package/lib/{css/components/empty-states.less → components/empty-state/empty-state.less} +16 -16
  69. package/lib/{css/components → components/expandable}/expandable.less +118 -115
  70. package/lib/components/expandable/expandable.test.ts +51 -0
  71. package/lib/{ts/controllers/s-expandable-control.ts → components/expandable/expandable.ts} +238 -238
  72. package/lib/components/input-fill/input-fill.less +35 -0
  73. package/lib/components/input-icon/input-icon.less +45 -0
  74. package/lib/components/input-message/input-message.less +48 -0
  75. package/lib/{css/components/inputs.less → components/input_textarea/input_textarea.less} +166 -297
  76. package/lib/{css/components/labels.less → components/label/label.less} +111 -111
  77. package/lib/{css/components → components/link}/link.less +119 -119
  78. package/lib/{css/components/link-previews.less → components/link-preview/link-preview.less} +139 -139
  79. package/lib/{css/components → components/menu}/menu.less +41 -41
  80. package/lib/{css/components/modals.less → components/modal/modal.less} +113 -113
  81. package/lib/{ts/controllers/s-modal.ts → components/modal/modal.ts} +379 -379
  82. package/lib/{css/components → components/navigation}/navigation.less +134 -134
  83. package/lib/{ts/controllers/s-navigation-tablist.ts → components/navigation/navigation.ts} +128 -128
  84. package/lib/{css/components/notices.less → components/notice/notice.less} +203 -292
  85. package/lib/{css/components/page-titles.less → components/page-title/page-title.less} +51 -51
  86. package/lib/{css/components → components/pagination}/pagination.less +52 -52
  87. package/lib/{css/components/popovers.less → components/popover/popover.less} +148 -147
  88. package/lib/{ts/controllers/s-popover.ts → components/popover/popover.ts} +651 -651
  89. package/lib/{test/s-tooltip.test.ts → components/popover/tooltip.test.ts} +62 -62
  90. package/lib/{ts/controllers/s-tooltip.ts → components/popover/tooltip.ts} +343 -343
  91. package/lib/{test/s-tooltip.visual.test.ts → components/popover/tooltip.visual.test.ts} +31 -31
  92. package/lib/{css/components → components/post-summary}/post-summary.less +415 -415
  93. package/lib/{css/components/progress-bars.less → components/progress-bar/progress-bar.less} +291 -291
  94. package/lib/{css/components → components/prose}/prose.less +452 -452
  95. package/lib/{css/components → components/select}/select.less +148 -148
  96. package/lib/{css/components/sidebar-widgets.less → components/sidebar-widget/sidebar-widget.less} +257 -259
  97. package/lib/{css/components → components/spinner}/spinner.less +103 -103
  98. package/lib/{css/components → components/table}/table.less +307 -297
  99. package/lib/components/table/table.test.ts +366 -0
  100. package/lib/{ts/controllers/s-table.ts → components/table/table.ts} +296 -263
  101. package/lib/components/table-container/table-container.less +4 -0
  102. package/lib/{css/components/tags.less → components/tag/tag.less} +213 -213
  103. package/lib/components/toast/toast.less +35 -0
  104. package/lib/{test/s-toast.test.ts → components/toast/toast.test.ts} +63 -63
  105. package/lib/{ts/controllers/s-toast.ts → components/toast/toast.ts} +357 -357
  106. package/lib/components/toast/toast.visual.test.ts +27 -0
  107. package/lib/{css/components/toggle-switches.less → components/toggle-switch/toggle-switch.less} +110 -110
  108. package/lib/{css/components → components/topbar}/topbar.less +436 -435
  109. package/lib/{css/components → components/uploader}/uploader.less +195 -195
  110. package/lib/{ts/controllers/s-uploader.ts → components/uploader/uploader.ts} +205 -205
  111. package/lib/{css/components/user-cards.less → components/user-card/user-card.less} +129 -129
  112. package/lib/controllers.ts +33 -0
  113. package/lib/{css/exports → exports}/constants-colors.less +1112 -1111
  114. package/lib/{css/exports → exports}/constants-helpers.less +108 -108
  115. package/lib/{css/exports → exports}/constants-type.less +153 -153
  116. package/lib/{css/exports → exports}/exports.less +15 -15
  117. package/lib/{css/exports → exports}/mixins.less +299 -299
  118. package/lib/{ts/index.ts → index.ts} +32 -32
  119. package/lib/{css/input-utils.less → input-utils.less} +44 -44
  120. package/lib/{css/stacks-dynamic.less → stacks-dynamic.less} +24 -25
  121. package/lib/stacks-static.less +93 -0
  122. package/lib/{css/stacks.less → stacks.less} +13 -13
  123. package/lib/{ts/stacks.ts → stacks.ts} +113 -113
  124. package/lib/test/open-wc-testing-patch.d.ts +26 -0
  125. package/lib/test/test-utils.ts +466 -0
  126. package/lib/tsconfig.build.json +4 -0
  127. package/lib/tsconfig.json +16 -13
  128. package/package.json +106 -105
  129. package/dist/controllers/index.d.ts +0 -9
  130. package/dist/controllers/s-table.d.ts +0 -8
  131. package/lib/css/stacks-static.less +0 -87
  132. package/lib/test/s-avatar.a11y.test.ts +0 -77
  133. package/lib/test/s-banner.visual.test.ts +0 -61
  134. package/lib/test/s-btn.a11y.test.ts +0 -123
  135. package/lib/test/s-btn.visual.test.ts +0 -16
  136. package/lib/test/s-toast.visual.test.ts +0 -48
  137. package/lib/ts/controllers/index.ts +0 -17
@@ -1,502 +1,503 @@
1
- .s-btn {
2
- // BASE COMPONENT-SPECIFIC CUSTOM PROPERTIES
3
- --_bu-baw: var(--su-static1);
4
- --_bu-bc: transparent;
5
- --_bu-bg: transparent;
6
- --_bu-br: var(--br-sm);
7
- --_bu-bs: none;
8
- --_bu-fc: var(--theme-button-color);
9
- --_bu-focus-ring: 0 0 0 var(--su-static4) var(--focus-ring);
10
- --_bu-fs: var(--fs-body1);
11
- --_bu-p: 0.8em;
12
- // STATE AND INTERACTION CUSTOM PROPERTIES
13
- --_bu-bc-selected: transparent;
14
- --_bu-bg-active: var(--theme-button-active-background-color);
15
- --_bu-bg-hover: var(--theme-button-hover-background-color);
16
- --_bu-bg-selected: var(--theme-button-selected-background-color);
17
- --_bu-fc-active: var(--theme-button-hover-color); // Note: hover color used here intentionally
18
- --_bu-fc-hover: var(--theme-button-hover-color);
19
- --_bu-fc-selected: var(--theme-button-selected-color);
20
- // Filled
21
- --_bu-filled-bc: var(--theme-button-filled-border-color);
22
- --_bu-filled-bc-active: var(--theme-button-filled-active-border-color);
23
- --_bu-filled-bg-hover: var(--theme-button-filled-hover-background-color);
24
- --_bu-filled-bc-selected: var(--theme-button-filled-selected-border-color);
25
- --_bu-filled-bg: var(--theme-button-filled-background-color);
26
- --_bu-filled-bg-active: var(--theme-button-filled-active-background-color);
27
- --_bu-filled-bg-selected: var(--theme-button-filled-selected-background-color);
28
- --_bu-filled-bs: inset 0 var(--su-static1) 0 0 hsla(0, 0, 100%, 0.7);
29
- --_bu-filled-fc: var(--theme-button-filled-color);
30
- --_bu-filled-fc-active: var(--theme-button-filled-hover-color); // Note: hover color used here intentionally
31
- --_bu-filled-fc-hover: var(--theme-button-filled-hover-color);
32
- --_bu-filled-fc-selected: var(--theme-button-filled-selected-color);
33
- // Outlined
34
- --_bu-outlined-bc: var(--theme-button-outlined-border-color);
35
- --_bu-outlined-bg: var(--theme-button-outlined-background-color);
36
- --_bu-outlined-bc-selected: var(--theme-button-outlined-selected-border-color);
37
- --_bu-outlined-bg-selected: var(--theme-button-selected-background-color);
38
- --_bu-outlined-fc-selected: var(--theme-button-selected-color);
39
- // CHILD COMPONENT CUSTOM PROPERTIES
40
- --_bu-badge-o: 0.5;
41
- --_bu-dropdown-bw: var(--su-static4);
42
- --_bu-number-fc: var(--white);
43
- --_bu-number-fc-selected: var(--_bu-number-fc);
44
-
45
- // CONTEXTUAL STYLES
46
- .dark-mode({
47
- --_bu-bs: none;
48
- --_bu-filled-bs: var(--_bu-bs);
49
- });
50
-
51
- .highcontrast-mode({
52
- --_bu-bc: currentColor;
53
- --_bu-filled-bc: var(--_bu-bc);
54
- --_bu-outlined-bc: var(--_bu-bc);
55
- --_bu-bc-selected: var(--_bu-bc);
56
- --_bu-badge-o: 0.8;
57
- });
58
-
59
- // STATES
60
- fieldset[disabled] &,
61
- &[disabled],
62
- &[aria-disabled="true"] {
63
- --_bu-bs: none !important;
64
- --_bu-filled-bs: var(--_bu-bs);
65
- opacity: var(--_o-disabled-static);
66
- pointer-events: none;
67
- text-decoration: none;
68
- }
69
-
70
- button &,
71
- button[type="submit"] &,
72
- button[type="reset"] & {
73
- -webkit-appearance: button; // [1]
74
- }
75
-
76
- &.grid {
77
- display: flex; // Override &&__danger buttons having inline-block by default
78
- }
79
-
80
- &.is-loading {
81
- .svg-icon:first-child {
82
- margin-left: -23px;
83
- opacity: 0; // [2]
84
- }
85
-
86
- padding-left: 2.2em;
87
- }
88
-
89
- &.is-selected,
90
- .s-btn-group.s-btn-group--radio &--radio:checked + & {
91
- background-color: var(--_bu-bg-selected);
92
- border-color: var(--_bu-bc-selected);
93
- color: var(--_bu-fc-selected);
94
-
95
- .s-btn--number {
96
- color: var(--_bu-number-fc-selected);
97
- }
98
-
99
- &.s-btn__filled { // this needs to live here to adapt to radio button-group
100
- border-color: var(--_bu-filled-bc-selected);
101
- background-color: var(--_bu-filled-bg-selected);
102
- color: var(--_bu-filled-fc-selected);
103
- }
104
- &.s-btn__outlined { // this needs to live here to adapt to radio button-group
105
- border-color: var(--_bu-outlined-bc-selected);
106
- background-color: var(--_bu-outlined-bg-selected);
107
- color: var(--_bu-outlined-fc-selected);
108
-
109
- &.s-btn__muted {
110
- .highcontrast-mode({
111
- --_bu-outlined-bc-selected: var(--_bu-filled-bc-selected);
112
- --_bu-outlined-bg-selected: var(--_bu-filled-bg-selected);
113
- --_bu-outlined-fc-selected: var(--_bu-filled-fc-selected);
114
- --_bu-number-fc-selected: var(--_bu-filled-bg-selected);
115
- });
116
- }
117
- }
118
- }
119
-
120
- &.is-selected:not(:focus),
121
- .s-btn-group.s-btn-group--radio &--radio:checked:not(:focus) + & {
122
- box-shadow: none;
123
- }
124
-
125
- // MODIFIERS
126
- &&__filled {
127
- border-color: var(--_bu-filled-bc);
128
- background-color: var(--_bu-filled-bg);
129
- box-shadow: var(--_bu-filled-bs);
130
- color: var(--_bu-filled-fc);
131
- }
132
-
133
- &&__outlined {
134
- border-color: var(--_bu-outlined-bc);
135
- background-color: var(--_bu-outlined-bg);
136
- }
137
-
138
- // Resets
139
- &&__link,
140
- &&__unset {
141
- &:focus,
142
- &:focus-visible {
143
- outline-style: auto;
144
- }
145
-
146
- outline: initial;
147
- }
148
-
149
- &&__link {
150
- --_bu-baw: 0;
151
- --_bu-br: 0;
152
- --_bu-bs: none;
153
- --_bu-filled-bs: var(--_bu-bs);
154
- --_bu-focus-ring: none;
155
- --_bu-p: 0;
156
-
157
- &,
158
- &:hover,
159
- &:active,
160
- &:focus,
161
- &[disabled],
162
- &[aria-disabled="true"] {
163
- --_bu-bg: none;
164
- }
165
-
166
- &.s-btn__dropdown {
167
- padding-right: 0.9em;
168
- }
169
-
170
- .s-link();
171
- display: inline;
172
- font: inherit;
173
- text-align: inherit;
174
- }
175
-
176
- &&__unset {
177
- &,
178
- &:hover,
179
- &:active,
180
- &:focus {
181
- --_bu-baw: 0;
182
- --_bu-bg: none;
183
- --_bu-br: 0;
184
- --_bu-bs: none;
185
- --_bu-filled-bs: var(--_bu-bs);
186
- --_bu-fc: unset;
187
- --_bu-focus-ring: none;
188
- --_bu-p: 0;
189
-
190
- cursor: default;
191
- font: unset;
192
- user-select: auto;
193
- }
194
- }
195
-
196
- // Pseudo-elements and child-based modifiers
197
- &&__dropdown {
198
- &:after {
199
- border-color: currentColor transparent;
200
- border-style: solid;
201
- border-width: var(--_bu-dropdown-bw);
202
- border-bottom-width: 0;
203
- content: "";
204
- pointer-events: none;
205
- position: absolute;
206
- right: var(--_bu-p);
207
- top: calc(50% - var(--su-static2));
208
- z-index: var(--zi-active);
209
- }
210
-
211
- padding-right: calc(var(--_bu-p) * 2.5);
212
- }
213
-
214
- &&__icon {
215
- .svg-icon {
216
- vertical-align: baseline;
217
- margin-top: -0.3em; // [3]
218
- margin-bottom: -0.3em; // [3]
219
- transition: opacity 200ms var(--te-smooth); // Animate the transition to .is-loading
220
- }
221
- }
222
-
223
- // Size
224
- &&__xs {
225
- .size-styles(xs; bu; @styles: fs);
226
- --_bu-dropdown-bw: calc(var(--su-static4) - var(--su-static1));
227
- --_bu-p: 0.6em;
228
- }
229
-
230
- &&__sm {
231
- .size-styles(sm; bu; @styles: fs);
232
- }
233
-
234
- &&__md {
235
- .size-styles(md; bu; @styles: br, fs);
236
- --_bu-p: 0.7em;
237
- }
238
-
239
- // VARIANTS
240
- &&__danger,
241
- &&__muted {
242
- .highcontrast-mode({
243
- --_bu-filled-bc: transparent;
244
- });
245
- }
246
-
247
- &&__danger {
248
- --_bu-bg-active: var(--red-100);
249
- --_bu-bg-hover: var(--red-050);
250
- --_bu-bg-selected: var(--red-200);
251
- --_bu-fc: var(--red-600);
252
- --_bu-fc-active: var(--_bu-fc);
253
- --_bu-fc-hover: var(--red-700);
254
- --_bu-fc-selected: var(--red-900);
255
- --_bu-focus-ring: 0 0 0 var(--su-static4) var(--focus-ring-error);
256
- --_bu-filled-bc: transparent;
257
- --_bu-filled-bc-selected: var(--_bu-filled-bc);
258
- --_bu-filled-bg: var(--red-500);
259
- --_bu-filled-bg-active: var(--red-700);
260
- --_bu-filled-bg-hover: var(--red-600);
261
- --_bu-filled-bg-selected: var(--red-800);
262
- --_bu-filled-bs: inset 0 var(--su-static1) 0 0 hsla(0, 0%, 100%, 0.4);
263
- --_bu-filled-fc: var(--white);
264
- --_bu-filled-fc-active: var(--_bu-filled-fc);
265
- --_bu-filled-fc-hover: var(--_bu-filled-fc);
266
- --_bu-filled-fc-selected: var(--_bu-filled-fc);
267
- --_bu-outlined-bc: var(--red-500);
268
- --_bu-outlined-bc-selected: var(--red-700);
269
- --_bu-outlined-bg-selected: var(--_bu-bg-selected);
270
- --_bu-outlined-fc-selected: var(--_bu-fc-selected);
271
-
272
- &.s-btn__filled {
273
- --_bu-number-fc: var(--black);
274
-
275
- .dark-mode({
276
- --_bu-filled-fc: var(--black);
277
- --_bu-filled-fc-selected: var(--white);
278
- --_bu-number-fc: var(--white);
279
- --_bu-number-fc-selected: var(--black);
280
- });
281
-
282
- .highcontrast-dark-mode({
283
- --_bu-filled-fc: var(--white);
284
- --_bu-number-fc: var(--black);
285
- --_bu-number-fc-selected: var(--black);
286
- });
287
- }
288
- }
289
-
290
- &&__muted {
291
- --_bu-bg-active: var(--black-050);
292
- --_bu-bg-hover: var(--black-025);
293
- --_bu-bg-selected: var(--black-075);
294
- --_bu-fc: var(--black-500);
295
- --_bu-fc-active: var(--_bu-fc);
296
- --_bu-fc-hover: var(--black-600);
297
- --_bu-fc-selected: var(--black-700);
298
- --_bu-focus-ring: 0 0 0 var(--su-static4) var(--focus-ring-muted);
299
- --_bu-filled-bc: transparent;
300
- --_bu-filled-bc-selected: var(--_bu-filled-bc);
301
- --_bu-filled-bg: var(--black-100);
302
- --_bu-filled-bg-active: var(--black-200);
303
- --_bu-filled-bg-hover: var(--black-150);
304
- --_bu-filled-bg-selected: var(--black-350);
305
- --_bu-filled-bs: inset 0 var(--su-static1) 0 0 hsla(0, 0%, 100%, 0.4);
306
- --_bu-filled-fc: var(--black-700);
307
- --_bu-filled-fc-active: var(--_bu-filled-fc);
308
- --_bu-filled-fc-hover: var(--_bu-filled-fc);
309
- --_bu-filled-fc-selected: var(--black-800);
310
- --_bu-outlined-bc: var(--black-300);
311
- --_bu-outlined-bc-selected: var(--black-400);
312
- --_bu-outlined-bg-selected: var(--_bu-bg-selected);
313
- --_bu-outlined-fc-selected: var(--_bu-fc-selected);
314
-
315
- .highcontrast-mode({
316
- --_bu-filled-bg: var(--black-400);
317
- --_bu-filled-bg-active: var(--black-600);
318
- --_bu-filled-bg-hover: var(--black-500);
319
- --_bu-filled-bg-selected: var(--black-700);
320
- --_bu-filled-fc: var(--white);
321
- --_bu-filled-fc-selected: var(--_bu-filled-fc);
322
-
323
- &.s-btn__filled {
324
- --_bu-number-fc: var(--black);
325
- }
326
- });
327
- }
328
-
329
- &&__primary {
330
- --_bu-bg: var(--theme-button-primary-background-color);
331
- --_bu-bg-active: var(--theme-button-primary-active-background-color);
332
- --_bu-bg-hover: var(--theme-button-primary-hover-background-color);
333
- --_bu-bg-selected: var(--theme-button-primary-selected-background-color);
334
- --_bu-bs: inset 0 1px 0 0 hsla(0, 0%, 100%, 0.4);
335
- --_bu-fc: var(--theme-button-primary-color);
336
- --_bu-fc-active: var(--theme-button-primary-hover-color);
337
- --_bu-fc-hover: var(--theme-button-primary-hover-color);
338
- --_bu-fc-selected: var(--theme-button-primary-selected-color);
339
- --_bu-number-fc: var(--theme-button-primary-number-color);
340
-
341
- .dark-mode({
342
- --_bu-bg: var(--theme-secondary-300);
343
- --_bu-bg-active: var(--theme-secondary-400);
344
- --_bu-bg-hover: var(--theme-secondary-350);
345
- --_bu-fc: var(--black);
346
- --_bu-fc-active: var(--_bu-fc);
347
- --_bu-fc-hover: var(--_bu-fc);
348
- --_bu-fc-selected: var(--white);
349
- --_bu-number-fc: var(--white);
350
- --_bu-number-fc-selected: var(--black);
351
- });
352
-
353
- .highcontrast-mode({
354
- --_bu-bc: transparent;
355
- });
356
-
357
- .highcontrast-dark-mode({
358
- --_bu-bg: var(--theme-secondary-400);
359
- --_bu-bg-active: var(--theme-secondary-600);
360
- --_bu-bg-hover: var(--theme-secondary-500);
361
- --_bu-fc: var(--white);
362
- --_bu-number-fc: var(--black);
363
- });
364
- }
365
-
366
- // Social
367
- &&__facebook,
368
- &&__github {
369
- .highcontrast-mode({
370
- --_bu-bc: transparent;
371
- });
372
- }
373
-
374
- &&__facebook {
375
- @_fb-brand: #385499;
376
- --_bu-bc: transparent;
377
- --_bu-bg: @_fb-brand;
378
- --_bu-bg-active: darken(@_fb-brand, 10%);
379
- --_bu-bg-hover: darken(@_fb-brand, 5%);
380
- --_bu-fc: #fff;
381
- --_bu-fc-active: var(--_bu-fc);
382
- --_bu-fc-hover: var(--_bu-fc);
383
- --_bu-hc-bc: transparent;
384
- }
385
-
386
- &&__google {
387
- --_bu-bc: var(--bc-medium);
388
- --_bu-bg: var(--white);
389
- --_bu-bg-active: var(--black-050);
390
- --_bu-bg-hover: var(--black-025);
391
- --_bu-fc: var(--fc-medium);
392
- --_bu-fc-active: var(--fc-dark);
393
- --_bu-fc-hover: var(--black-800);
394
- --_bu-focus-ring: 0 0 0 var(--su-static4) var(--focus-ring-muted);
395
- }
396
-
397
- &&__github {
398
- --_bu-bg: var(--black-750);
399
- --_bu-bg-active: var(--black);
400
- --_bu-bg-hover: var(--black-800);
401
- --_bu-fc: var(--white);
402
- --_bu-fc-active: var(--white);
403
- --_bu-fc-hover: var(--white);
404
- --_bu-focus-ring: 0 0 0 var(--su-static4) var(--focus-ring-muted);
405
- --_bu-hc-bc: transparent;
406
- }
407
-
408
- // CHILD ELEMENTS
409
- & &--badge {
410
- opacity: var(--_bu-badge-o);
411
- display: inline-block;
412
- border-radius: var(--br-sm);
413
- padding: var(--su2) calc(var(--su4) - var(--su1));
414
- font-size: var(--fs-caption);
415
- line-height: var(--lh-xs);
416
- background-color: currentColor;
417
- }
418
-
419
- & &--number {
420
- color: var(--_bu-number-fc);
421
- }
422
-
423
- &--radio { // This lives alongside a .s-btn element. These styles are the equivelent of `.v-visible-sr`
424
- border: 0;
425
- clip-path: inset(50%);
426
- clip: rect(1px, 1px, 1px, 1px);
427
- height: 1px;
428
- margin: -1px;
429
- overflow-wrap: normal;
430
- overflow: hidden;
431
- padding: 0;
432
- position: absolute;
433
- width: 1px;
434
- }
435
-
436
- // INTERACTION
437
- &:not(.is-selected):not(&__link):not(&__unset) {
438
- &:hover, &:focus {
439
- &.s-btn__filled {
440
- background-color: var(--_bu-filled-bg-hover);
441
- color: var(--_bu-filled-fc-hover);
442
- }
443
-
444
- background-color: var(--_bu-bg-hover);
445
- color: var(--_bu-fc-hover);
446
- }
447
-
448
- &:active {
449
- &.s-btn__filled {
450
- background-color: var(--_bu-filled-bg-active);
451
- color: var(--_bu-filled-fc-active);
452
- }
453
-
454
- background-color: var(--_bu-bg-active);
455
- color: var(--_bu-fc-active);
456
- }
457
-
458
- &:visited:not(:hover):not(:focus) {
459
- &.s-btn__filled {
460
- background-color: var(--_bu-filled-bg);
461
- color: var(--_bu-filled-fc);
462
- }
463
-
464
- background-color: var(--_bu-bg);
465
- color: var(--_bu-fc);
466
- }
467
- }
468
-
469
- &:focus,
470
- &--radio:focus + & {
471
- box-shadow: var(--_bu-focus-ring);
472
- outline: none;
473
- }
474
-
475
- background-color: var(--_bu-bg);
476
- border: var(--_bu-baw) solid var(--_bu-bc);
477
- border-radius: var(--_bu-br);
478
- box-shadow: var(--_bu-bs);
479
- color: var(--_bu-fc);
480
- font-size: var(--_bu-fs);
481
- padding: var(--_bu-p);
482
-
483
- cursor: pointer;
484
- display: inline-block;
485
- font-family: inherit;
486
- font-weight: normal;
487
- line-height: var(--lh-sm);
488
- position: relative;
489
- outline: none;
490
- text-align: center;
491
- text-decoration: none;
492
- user-select: none;
493
- }
494
-
495
- // [1] Guard against the difference in configurable resets
496
- // Eric Meyer's reset does not include this, while normalize.css does
497
- // Correct the inability to style buttons in iOS and Safari.
498
- // [2] If the first thing in the button is an icon, let's hide it on loading
499
- // We only want to modify the visibility, since we still want it to have shape and keep the same layout.
500
- // [3] Most svg icons are 18px tall, but the button's line-height is 1 (13px).
501
- // This means we need to off set the margin y-axis so we don't add
1
+ .s-btn {
2
+ // BASE COMPONENT-SPECIFIC CUSTOM PROPERTIES
3
+ --_bu-baw: var(--su-static1);
4
+ --_bu-bc: transparent;
5
+ --_bu-bg: transparent;
6
+ --_bu-br: var(--br-sm);
7
+ --_bu-bs: none;
8
+ --_bu-fc: var(--theme-button-color);
9
+ --_bu-focus-ring: 0 0 0 var(--su-static4) var(--focus-ring);
10
+ --_bu-fs: var(--fs-body1);
11
+ --_bu-p: 0.8em;
12
+ // STATE AND INTERACTION CUSTOM PROPERTIES
13
+ --_bu-bc-selected: transparent;
14
+ --_bu-bg-active: var(--theme-button-active-background-color);
15
+ --_bu-bg-hover: var(--theme-button-hover-background-color);
16
+ --_bu-bg-selected: var(--theme-button-selected-background-color);
17
+ --_bu-fc-active: var(--theme-button-hover-color); // Note: hover color used here intentionally
18
+ --_bu-fc-hover: var(--theme-button-hover-color);
19
+ --_bu-fc-selected: var(--theme-button-selected-color);
20
+ // Filled
21
+ --_bu-filled-bc: var(--theme-button-filled-border-color);
22
+ --_bu-filled-bc-active: var(--theme-button-filled-active-border-color);
23
+ --_bu-filled-bg-hover: var(--theme-button-filled-hover-background-color);
24
+ --_bu-filled-bc-selected: var(--theme-button-filled-selected-border-color);
25
+ --_bu-filled-bg: var(--theme-button-filled-background-color);
26
+ --_bu-filled-bg-active: var(--theme-button-filled-active-background-color);
27
+ --_bu-filled-bg-selected: var(--theme-button-filled-selected-background-color);
28
+ --_bu-filled-bs: inset 0 var(--su-static1) 0 0 hsla(0, 0, 100%, 0.7);
29
+ --_bu-filled-fc: var(--theme-button-filled-color);
30
+ --_bu-filled-fc-active: var(--theme-button-filled-hover-color); // Note: hover color used here intentionally
31
+ --_bu-filled-fc-hover: var(--theme-button-filled-hover-color);
32
+ --_bu-filled-fc-selected: var(--theme-button-filled-selected-color);
33
+ // Outlined
34
+ --_bu-outlined-bc: var(--theme-button-outlined-border-color);
35
+ --_bu-outlined-bg: var(--theme-button-outlined-background-color);
36
+ --_bu-outlined-bc-selected: var(--theme-button-outlined-selected-border-color);
37
+ --_bu-outlined-bg-selected: var(--theme-button-selected-background-color);
38
+ --_bu-outlined-fc-selected: var(--theme-button-selected-color);
39
+ // CHILD COMPONENT CUSTOM PROPERTIES
40
+ --_bu-badge-o: 0.5;
41
+ --_bu-dropdown-bw: var(--su-static4);
42
+ --_bu-number-fc: var(--white);
43
+ --_bu-number-fc-selected: var(--_bu-number-fc);
44
+
45
+ // CONTEXTUAL STYLES
46
+ .dark-mode({
47
+ --_bu-bs: none;
48
+ --_bu-filled-bs: var(--_bu-bs);
49
+ });
50
+
51
+ .highcontrast-mode({
52
+ --_bu-bc: currentColor;
53
+ --_bu-filled-bc: var(--_bu-bc);
54
+ --_bu-outlined-bc: var(--_bu-bc);
55
+ --_bu-bc-selected: var(--_bu-bc);
56
+ --_bu-badge-o: 0.8;
57
+ });
58
+
59
+ // STATES
60
+ fieldset[disabled] &,
61
+ &[disabled],
62
+ &[aria-disabled="true"] {
63
+ --_bu-bs: none !important;
64
+ --_bu-filled-bs: var(--_bu-bs);
65
+ opacity: var(--_o-disabled-static);
66
+ pointer-events: none;
67
+ text-decoration: none;
68
+ }
69
+
70
+ button &,
71
+ button[type="submit"] &,
72
+ button[type="reset"] & {
73
+ -webkit-appearance: button; // [1]
74
+ }
75
+
76
+ &.grid {
77
+ display: flex; // Override &&__danger buttons having inline-block by default
78
+ }
79
+
80
+ &.is-loading {
81
+ .svg-icon:first-child {
82
+ margin-left: -23px;
83
+ opacity: 0; // [2]
84
+ }
85
+
86
+ padding-left: 2.2em;
87
+ }
88
+
89
+ &.is-selected,
90
+ .s-btn-group.s-btn-group--radio &--radio:checked + & {
91
+ background-color: var(--_bu-bg-selected);
92
+ border-color: var(--_bu-bc-selected);
93
+ color: var(--_bu-fc-selected);
94
+
95
+ .s-btn--number {
96
+ color: var(--_bu-number-fc-selected);
97
+ }
98
+
99
+ &.s-btn__filled { // this needs to live here to adapt to radio button-group
100
+ border-color: var(--_bu-filled-bc-selected);
101
+ background-color: var(--_bu-filled-bg-selected);
102
+ color: var(--_bu-filled-fc-selected);
103
+ }
104
+ &.s-btn__outlined { // this needs to live here to adapt to radio button-group
105
+ border-color: var(--_bu-outlined-bc-selected);
106
+ background-color: var(--_bu-outlined-bg-selected);
107
+ color: var(--_bu-outlined-fc-selected);
108
+
109
+ &.s-btn__muted {
110
+ .highcontrast-mode({
111
+ --_bu-outlined-bc-selected: var(--_bu-filled-bc-selected);
112
+ --_bu-outlined-bg-selected: var(--_bu-filled-bg-selected);
113
+ --_bu-outlined-fc-selected: var(--_bu-filled-fc-selected);
114
+ --_bu-number-fc-selected: var(--_bu-filled-bg-selected);
115
+ });
116
+ }
117
+ }
118
+ }
119
+
120
+ &.is-selected:not(:focus),
121
+ .s-btn-group.s-btn-group--radio &--radio:checked:not(:focus) + & {
122
+ box-shadow: none;
123
+ }
124
+
125
+ // MODIFIERS
126
+ &&__filled {
127
+ border-color: var(--_bu-filled-bc);
128
+ background-color: var(--_bu-filled-bg);
129
+ box-shadow: var(--_bu-filled-bs);
130
+ color: var(--_bu-filled-fc);
131
+ }
132
+
133
+ &&__outlined {
134
+ border-color: var(--_bu-outlined-bc);
135
+ background-color: var(--_bu-outlined-bg);
136
+ }
137
+
138
+ // Resets
139
+ &&__link,
140
+ &&__unset {
141
+ &:focus,
142
+ &:focus-visible {
143
+ outline-style: auto;
144
+ }
145
+ }
146
+
147
+ &&__link {
148
+ --_bu-baw: 0;
149
+ --_bu-br: 0;
150
+ --_bu-bs: none;
151
+ --_bu-filled-bs: var(--_bu-bs);
152
+ --_bu-focus-ring: none;
153
+ --_bu-p: 0;
154
+
155
+ &,
156
+ &:hover,
157
+ &:active,
158
+ &:focus,
159
+ &[disabled],
160
+ &[aria-disabled="true"] {
161
+ --_bu-bg: none;
162
+ }
163
+
164
+ &.s-btn__dropdown {
165
+ padding-right: 0.9em;
166
+ }
167
+
168
+ .s-link();
169
+ display: inline;
170
+ font: inherit;
171
+ outline: revert;
172
+ text-align: inherit;
173
+ }
174
+
175
+ &&__unset {
176
+ &,
177
+ &:hover,
178
+ &:active,
179
+ &:focus {
180
+ --_bu-baw: 0;
181
+ --_bu-bg: none;
182
+ --_bu-br: 0;
183
+ --_bu-bs: none;
184
+ --_bu-filled-bs: var(--_bu-bs);
185
+ --_bu-fc: unset;
186
+ --_bu-focus-ring: none;
187
+ --_bu-p: 0;
188
+
189
+ cursor: default;
190
+ font: unset;
191
+ user-select: auto;
192
+ }
193
+
194
+ outline: initial;
195
+ }
196
+
197
+ // Pseudo-elements and child-based modifiers
198
+ &&__dropdown {
199
+ &:after {
200
+ border-color: currentColor transparent;
201
+ border-style: solid;
202
+ border-width: var(--_bu-dropdown-bw);
203
+ border-bottom-width: 0;
204
+ content: "";
205
+ pointer-events: none;
206
+ position: absolute;
207
+ right: var(--_bu-p);
208
+ top: calc(50% - var(--su-static2));
209
+ z-index: var(--zi-active);
210
+ }
211
+
212
+ padding-right: calc(var(--_bu-p) * 2.5);
213
+ }
214
+
215
+ &&__icon {
216
+ .svg-icon {
217
+ vertical-align: baseline;
218
+ margin-top: -0.3em; // [3]
219
+ margin-bottom: -0.3em; // [3]
220
+ transition: opacity 200ms var(--te-smooth); // Animate the transition to .is-loading
221
+ }
222
+ }
223
+
224
+ // Size
225
+ &&__xs {
226
+ .size-styles(xs; bu; @styles: fs);
227
+ --_bu-dropdown-bw: calc(var(--su-static4) - var(--su-static1));
228
+ --_bu-p: 0.6em;
229
+ }
230
+
231
+ &&__sm {
232
+ .size-styles(sm; bu; @styles: fs);
233
+ }
234
+
235
+ &&__md {
236
+ .size-styles(md; bu; @styles: br, fs);
237
+ --_bu-p: 0.7em;
238
+ }
239
+
240
+ // VARIANTS
241
+ &&__danger,
242
+ &&__muted {
243
+ .highcontrast-mode({
244
+ --_bu-filled-bc: transparent;
245
+ });
246
+ }
247
+
248
+ &&__danger {
249
+ --_bu-bg-active: var(--red-100);
250
+ --_bu-bg-hover: var(--red-050);
251
+ --_bu-bg-selected: var(--red-200);
252
+ --_bu-fc: var(--red-600);
253
+ --_bu-fc-active: var(--_bu-fc);
254
+ --_bu-fc-hover: var(--red-700);
255
+ --_bu-fc-selected: var(--red-900);
256
+ --_bu-focus-ring: 0 0 0 var(--su-static4) var(--focus-ring-error);
257
+ --_bu-filled-bc: transparent;
258
+ --_bu-filled-bc-selected: var(--_bu-filled-bc);
259
+ --_bu-filled-bg: var(--red-500);
260
+ --_bu-filled-bg-active: var(--red-700);
261
+ --_bu-filled-bg-hover: var(--red-600);
262
+ --_bu-filled-bg-selected: var(--red-800);
263
+ --_bu-filled-bs: inset 0 var(--su-static1) 0 0 hsla(0, 0%, 100%, 0.4);
264
+ --_bu-filled-fc: var(--white);
265
+ --_bu-filled-fc-active: var(--_bu-filled-fc);
266
+ --_bu-filled-fc-hover: var(--_bu-filled-fc);
267
+ --_bu-filled-fc-selected: var(--_bu-filled-fc);
268
+ --_bu-outlined-bc: var(--red-500);
269
+ --_bu-outlined-bc-selected: var(--red-700);
270
+ --_bu-outlined-bg-selected: var(--_bu-bg-selected);
271
+ --_bu-outlined-fc-selected: var(--_bu-fc-selected);
272
+
273
+ &.s-btn__filled {
274
+ --_bu-number-fc: var(--black);
275
+
276
+ .dark-mode({
277
+ --_bu-filled-fc: var(--black);
278
+ --_bu-filled-fc-selected: var(--white);
279
+ --_bu-number-fc: var(--white);
280
+ --_bu-number-fc-selected: var(--black);
281
+ });
282
+
283
+ .highcontrast-dark-mode({
284
+ --_bu-filled-fc: var(--white);
285
+ --_bu-number-fc: var(--black);
286
+ --_bu-number-fc-selected: var(--black);
287
+ });
288
+ }
289
+ }
290
+
291
+ &&__muted {
292
+ --_bu-bg-active: var(--black-050);
293
+ --_bu-bg-hover: var(--black-025);
294
+ --_bu-bg-selected: var(--black-075);
295
+ --_bu-fc: var(--black-500);
296
+ --_bu-fc-active: var(--_bu-fc);
297
+ --_bu-fc-hover: var(--black-600);
298
+ --_bu-fc-selected: var(--black-700);
299
+ --_bu-focus-ring: 0 0 0 var(--su-static4) var(--focus-ring-muted);
300
+ --_bu-filled-bc: transparent;
301
+ --_bu-filled-bc-selected: var(--_bu-filled-bc);
302
+ --_bu-filled-bg: var(--black-100);
303
+ --_bu-filled-bg-active: var(--black-200);
304
+ --_bu-filled-bg-hover: var(--black-150);
305
+ --_bu-filled-bg-selected: var(--black-350);
306
+ --_bu-filled-bs: inset 0 var(--su-static1) 0 0 hsla(0, 0%, 100%, 0.4);
307
+ --_bu-filled-fc: var(--black-700);
308
+ --_bu-filled-fc-active: var(--_bu-filled-fc);
309
+ --_bu-filled-fc-hover: var(--_bu-filled-fc);
310
+ --_bu-filled-fc-selected: var(--black-800);
311
+ --_bu-outlined-bc: var(--black-300);
312
+ --_bu-outlined-bc-selected: var(--black-400);
313
+ --_bu-outlined-bg-selected: var(--_bu-bg-selected);
314
+ --_bu-outlined-fc-selected: var(--_bu-fc-selected);
315
+
316
+ .highcontrast-mode({
317
+ --_bu-filled-bg: var(--black-400);
318
+ --_bu-filled-bg-active: var(--black-600);
319
+ --_bu-filled-bg-hover: var(--black-500);
320
+ --_bu-filled-bg-selected: var(--black-700);
321
+ --_bu-filled-fc: var(--white);
322
+ --_bu-filled-fc-selected: var(--_bu-filled-fc);
323
+
324
+ &.s-btn__filled {
325
+ --_bu-number-fc: var(--black);
326
+ }
327
+ });
328
+ }
329
+
330
+ &&__primary {
331
+ --_bu-bg: var(--theme-button-primary-background-color);
332
+ --_bu-bg-active: var(--theme-button-primary-active-background-color);
333
+ --_bu-bg-hover: var(--theme-button-primary-hover-background-color);
334
+ --_bu-bg-selected: var(--theme-button-primary-selected-background-color);
335
+ --_bu-bs: inset 0 1px 0 0 hsla(0, 0%, 100%, 0.4);
336
+ --_bu-fc: var(--theme-button-primary-color);
337
+ --_bu-fc-active: var(--theme-button-primary-hover-color);
338
+ --_bu-fc-hover: var(--theme-button-primary-hover-color);
339
+ --_bu-fc-selected: var(--theme-button-primary-selected-color);
340
+ --_bu-number-fc: var(--theme-button-primary-number-color);
341
+
342
+ .dark-mode({
343
+ --_bu-bg: var(--theme-secondary-300);
344
+ --_bu-bg-active: var(--theme-secondary-400);
345
+ --_bu-bg-hover: var(--theme-secondary-350);
346
+ --_bu-fc: var(--black);
347
+ --_bu-fc-active: var(--_bu-fc);
348
+ --_bu-fc-hover: var(--_bu-fc);
349
+ --_bu-fc-selected: var(--white);
350
+ --_bu-number-fc: var(--white);
351
+ --_bu-number-fc-selected: var(--black);
352
+ });
353
+
354
+ .highcontrast-mode({
355
+ --_bu-bc: transparent;
356
+ });
357
+
358
+ .highcontrast-dark-mode({
359
+ --_bu-bg: var(--theme-secondary-400);
360
+ --_bu-bg-active: var(--theme-secondary-600);
361
+ --_bu-bg-hover: var(--theme-secondary-500);
362
+ --_bu-fc: var(--white);
363
+ --_bu-number-fc: var(--black);
364
+ });
365
+ }
366
+
367
+ // Social
368
+ &&__facebook,
369
+ &&__github {
370
+ .highcontrast-mode({
371
+ --_bu-bc: transparent;
372
+ });
373
+ }
374
+
375
+ &&__facebook {
376
+ @_fb-brand: #385499;
377
+ --_bu-bc: transparent;
378
+ --_bu-bg: @_fb-brand;
379
+ --_bu-bg-active: darken(@_fb-brand, 10%);
380
+ --_bu-bg-hover: darken(@_fb-brand, 5%);
381
+ --_bu-fc: #fff;
382
+ --_bu-fc-active: var(--_bu-fc);
383
+ --_bu-fc-hover: var(--_bu-fc);
384
+ --_bu-hc-bc: transparent;
385
+ }
386
+
387
+ &&__google {
388
+ --_bu-bc: var(--bc-medium);
389
+ --_bu-bg: var(--white);
390
+ --_bu-bg-active: var(--black-050);
391
+ --_bu-bg-hover: var(--black-025);
392
+ --_bu-fc: var(--fc-medium);
393
+ --_bu-fc-active: var(--fc-dark);
394
+ --_bu-fc-hover: var(--black-800);
395
+ --_bu-focus-ring: 0 0 0 var(--su-static4) var(--focus-ring-muted);
396
+ }
397
+
398
+ &&__github {
399
+ --_bu-bg: var(--black-750);
400
+ --_bu-bg-active: var(--black);
401
+ --_bu-bg-hover: var(--black-800);
402
+ --_bu-fc: var(--white);
403
+ --_bu-fc-active: var(--white);
404
+ --_bu-fc-hover: var(--white);
405
+ --_bu-focus-ring: 0 0 0 var(--su-static4) var(--focus-ring-muted);
406
+ --_bu-hc-bc: transparent;
407
+ }
408
+
409
+ // CHILD ELEMENTS
410
+ & &--badge {
411
+ opacity: var(--_bu-badge-o);
412
+ display: inline-block;
413
+ border-radius: var(--br-sm);
414
+ padding: var(--su2) calc(var(--su4) - var(--su1));
415
+ font-size: var(--fs-caption);
416
+ line-height: var(--lh-xs);
417
+ background-color: currentColor;
418
+ }
419
+
420
+ & &--number {
421
+ color: var(--_bu-number-fc);
422
+ }
423
+
424
+ &--radio { // This lives alongside a .s-btn element. These styles are the equivelent of `.v-visible-sr`
425
+ border: 0;
426
+ clip-path: inset(50%);
427
+ clip: rect(1px, 1px, 1px, 1px);
428
+ height: 1px;
429
+ margin: -1px;
430
+ overflow-wrap: normal;
431
+ overflow: hidden;
432
+ padding: 0;
433
+ position: absolute;
434
+ width: 1px;
435
+ }
436
+
437
+ // INTERACTION
438
+ &:not(.is-selected):not(&__link):not(&__unset) {
439
+ &:hover, &:focus {
440
+ &.s-btn__filled {
441
+ background-color: var(--_bu-filled-bg-hover);
442
+ color: var(--_bu-filled-fc-hover);
443
+ }
444
+
445
+ background-color: var(--_bu-bg-hover);
446
+ color: var(--_bu-fc-hover);
447
+ }
448
+
449
+ &:active {
450
+ &.s-btn__filled {
451
+ background-color: var(--_bu-filled-bg-active);
452
+ color: var(--_bu-filled-fc-active);
453
+ }
454
+
455
+ background-color: var(--_bu-bg-active);
456
+ color: var(--_bu-fc-active);
457
+ }
458
+
459
+ &:visited:not(:hover):not(:focus) {
460
+ &.s-btn__filled {
461
+ background-color: var(--_bu-filled-bg);
462
+ color: var(--_bu-filled-fc);
463
+ }
464
+
465
+ background-color: var(--_bu-bg);
466
+ color: var(--_bu-fc);
467
+ }
468
+ }
469
+
470
+ &:focus,
471
+ &--radio:focus + & {
472
+ box-shadow: var(--_bu-focus-ring);
473
+ outline: none;
474
+ }
475
+
476
+ background-color: var(--_bu-bg);
477
+ border: var(--_bu-baw) solid var(--_bu-bc);
478
+ border-radius: var(--_bu-br);
479
+ box-shadow: var(--_bu-bs);
480
+ color: var(--_bu-fc);
481
+ font-size: var(--_bu-fs);
482
+ padding: var(--_bu-p);
483
+
484
+ cursor: pointer;
485
+ display: inline-block;
486
+ font-family: inherit;
487
+ font-weight: normal;
488
+ line-height: var(--lh-sm);
489
+ position: relative;
490
+ outline: none;
491
+ text-align: center;
492
+ text-decoration: none;
493
+ user-select: none;
494
+ }
495
+
496
+ // [1] Guard against the difference in configurable resets
497
+ // Eric Meyer's reset does not include this, while normalize.css does
498
+ // Correct the inability to style buttons in iOS and Safari.
499
+ // [2] If the first thing in the button is an icon, let's hide it on loading
500
+ // We only want to modify the visibility, since we still want it to have shape and keep the same layout.
501
+ // [3] Most svg icons are 18px tall, but the button's line-height is 1 (13px).
502
+ // This means we need to off set the margin y-axis so we don't add
502
503
  // additional height to the button.