Skip to content

Commit f3a22e0

Browse files
authored
[Button] Fixes base button shadow to correct values (#11364)
Fixes base button shadow so it has correct design and bevel. ### Before <img width="530" alt="Screenshot 2023-12-19 at 11 49 04 AM" src="https://github.com/Shopify/polaris/assets/5749440/41b6d6e6-beec-4e67-bc2e-69fb12659720"> ### Ater ![Screenshot 2023-12-19 at 11 44 59 AM](https://github.com/Shopify/polaris/assets/5749440/c0ffd131-fda3-4a09-b3c1-0917c7fea9b2) ### WHY are these changes introduced? Fixes #0000 <!-- link to issue if one exists --> <!-- Context about the problem that’s being addressed. --> ### WHAT is this pull request doing? <!-- Summary of the changes committed. Before / after screenshots are appreciated for UI changes. Make sure to include alt text that describes the screenshot. Include a video if your changes include interactive content. If you include an animated gif showing your change, wrapping it in a details tag is recommended. Gifs usually autoplay, which can cause accessibility issues for people reviewing your PR: <details> <summary>Summary of your gif(s)</summary> <img src="..." alt="Description of what the gif shows"> </details> --> ### How to 🎩 🖥 [Local development instructions](https://github.com/Shopify/polaris/blob/main/README.md#install-dependencies-and-build-workspaces) 🗒 [General tophatting guidelines](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md) 📄 [Changelog guidelines](https://github.com/Shopify/polaris/blob/main/.github/CONTRIBUTING.md#changelog) ### 🎩 checklist - [ ] Tested a [snapshot](https://github.com/Shopify/polaris/blob/main/documentation/Releasing.md#-snapshot-releases) - [ ] Tested on [mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing) - [ ] Tested on [multiple browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers) - [ ] Tested for [accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md) - [ ] Updated the component's `README.md` with documentation changes - [ ] [Tophatted documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md) changes in the style guide
1 parent af66cc6 commit f3a22e0

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.changeset/olive-buckets-relate.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/polaris': patch
3+
---
4+
5+
Fixes shadow and bevel of basic button

.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"css.validate": false,
44
"editor.codeActionsOnSave": {
5-
"source.fixAll.eslint": true
5+
"source.fixAll.eslint": "explicit"
66
},
77
"editor.defaultFormatter": "esbenp.prettier-vscode",
88
"editor.formatOnSave": true,

polaris-react/src/components/Button/Button.module.scss

+2-3
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,8 @@
131131

132132
.variantSecondary {
133133
// stylelint-disable -- custom button tokens
134-
--pc-button-box-shadow: 0 -1px 0 1px rgba(0, 0, 0, 0.051) inset,
135-
0 0 0 1px rgba(0, 0, 0, 0.149) inset, 0 0.5px 0 1.5px rgb(255, 255, 255) inset;
136-
--pc-button-box-shadow_active: -1px 0 1px 0 #1a1a1a1f inset,
134+
--pc-button-box-shadow: 0 -1px 0 0 #b5b5b5 inset, 0 0 0 1px rgba(0, 0, 0, 0.10) inset, 0 0.5px 0 1.5px #fff inset;
135+
--pc-button-box-shadow_active: -1px 0 1px 0 rgba(26, 26, 26, 0.122) inset,
137136
1px 0 1px 0 rgba(26, 26, 26, 0.122) inset, 0 2px 1px 0 rgba(26, 26, 26, 0.2) inset;
138137
// stylelint-enable
139138
--pc-button-bg: var(--p-color-bg-fill);

0 commit comments

Comments
 (0)