Skip to content

Commit

Permalink
[Dropzone] Fix wonky border radius (#9166)
Browse files Browse the repository at this point in the history
The border radius of the `DropZone` component was messed up. This PR
fixes that.


![dropzone-border-radius](https://user-images.githubusercontent.com/875708/236408252-cca2bdab-b9f0-42f3-9b4b-166cb7247ee7.jpg)

### 🎩 checklist

- [x] Tested on
[mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing)
- [x] Tested on [multiple
browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers)
- [x] Tested for
[accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md)
- [x] Updated the component's `README.md` with documentation changes
- [x] [Tophatted
documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md)
changes in the style guide

---------

Co-authored-by: Chloe Rice <chloerice@users.noreply.github.com>
  • Loading branch information
martenbjork and chloerice committed May 8, 2023
1 parent 563af50 commit 048502c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/breezy-mirrors-fetch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris': patch
---

Fixed the border radius of `DropZone`
8 changes: 4 additions & 4 deletions polaris-react/src/components/DropZone/DropZone.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ $dropzone-stacking-order: (
display: flex;
justify-content: center;
background-color: var(--p-color-bg);
border-radius: var(--p-border-radius-1);
border-radius: var(--p-border-radius-2);

&::after {
content: '';
Expand All @@ -45,7 +45,7 @@ $dropzone-stacking-order: (
bottom: 0;
left: 0;
border: var(--p-border-width-1) $dropzone-border-style transparent;
border-radius: var(--p-border-radius-1);
border-radius: var(--p-border-radius-2);
pointer-events: none;
}

Expand Down Expand Up @@ -125,7 +125,7 @@ $dropzone-stacking-order: (

.Container {
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
@include focus-ring($border-width: 1px);
@include focus-ring($size: 'wide', $border-width: var(--p-border-width-1));
flex: 1;
}

Expand Down Expand Up @@ -164,7 +164,7 @@ $dropzone-stacking-order: (
&:not(.isDisabled) {
.Container {
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
@include focus-ring($style: 'focused');
@include focus-ring($size: 'wide', $style: 'focused');
}
}
}

0 comments on commit 048502c

Please sign in to comment.