Skip to content

Commit 4610d3a

Browse files
feat(button) - update button base styles for SHINE (#2008)
* update default and xs * Update button.less * Update based on changes * fix duplicate * Update button.less * update docs * update button svelte files * add changeset * update dependent svelte files * update to theme secondary * Update accessibility tests * remove contextual styles * reintroduce contextual styles * Update based on figma update and pr comments * Update badge background color for danger clear variant * add breaking changes * Update docs * correct gradients * use color instead of opacity * Update based on comments * Button styles refactor (#2052) * Button styles refactor * minor tweaks * Styles and such * update svelte component * Update migration guide * fix lint issue * Fix button prop in Menu story --------- Co-authored-by: Dan Cormier <[email protected]> Co-authored-by: Dan Cormier <[email protected]>
1 parent 6f6d576 commit 4610d3a

File tree

2,820 files changed

+6758
-5466
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,820 files changed

+6758
-5466
lines changed

.changeset/beige-bats-like.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
"@stackoverflow/stacks": minor
3+
"@stackoverflow/stacks-svelte": minor
4+
---
5+
6+
Update button to new Shine styles
7+
8+
BREAKING CHANGES:
9+
10+
- The secondary style `outlined` has been removed i.e. `.s-btn__outlined`
11+
- The variant `Muted` has been removed
12+
- `s-btn__md` has been removed

MIGRATION_GUIDE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@
2828
- The Award Bling component has been renamed to Bling.
2929
- Bling no longer accepts children elements besides those for screen readers. Please include any visually represented strings (such as counts) as siblings to the bling component.
3030

31+
#### Buttons
32+
- The secondary style `outlined` has been removed i.e. `.s-btn__outlined`
33+
- The default button style is `filled`, use `.s-btn__clear` to use a clear style of a button
34+
- The featured and tonal variant no longer have a clear style
35+
- The variant `Muted` has been removed, `Tonal` has been added
36+
- `s-btn__md` has been removed, `s-btn__lg` has been added
37+
3138
#### Menu
3239

3340
The menu component has been updated to use new class names and structure. The following changes are breaking:

packages/stacks-classic/lib/components/button-group/button-group.test.setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const getBtn = ({
1818
isSelected?: boolean;
1919
hasBadge?: boolean;
2020
}): string => {
21-
const baseClasses = "s-btn s-btn__muted";
21+
const baseClasses = "s-btn s-btn__tonal";
2222
const btnChildren = `
2323
<span class="s-btn--text" data-text="${name}">${name}</span>
2424
${

packages/stacks-classic/lib/components/button/button.a11y.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ describe("button", () => {
1414
/s-btn-(light|dark).*?badge/,
1515
// matches tests with a badge in highcontrast-light modes, excluding filled, danger, github, facebook, sm, or xs
1616
/s-btn-highcontrast-light-(?!.*(filled|danger|github|facebook|sm|xs)).*?badge/,
17-
// matches tests with a badge in highcontrast-light modes, are muted or featured and/or outlined, and are sm or xs
18-
/s-btn-highcontrast-light-(?:muted-|featured-)?(?:outlined-)?(?:sm|xs).*?badge/,
17+
// matches tests with a badge in highcontrast-light modes, are tonal or featured, and are sm or xs
18+
/s-btn-highcontrast-light-(?:tonal-|featured-)?(?:sm|xs).*?badge/,
1919
],
2020
});
2121
});

0 commit comments

Comments
 (0)