Skip to content

Commit c07a415

Browse files
authored
fix: scrollbar ui (#1880)
### What does it do? - Added `margin` - Removed `padding-inline` - Added `border-radius` ### Why is it needed? See #1875. ### How to test it? You'll need to check the preview. ### Related issue(s)/PR(s) fixes #1875
2 parents e9597d0 + 6e78ead commit c07a415

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.changeset/cool-mayflies-arrive.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@strapi/design-system': patch
3+
---
4+
5+
fix: scrollbar ui

packages/design-system/src/utilities/ScrollArea/ScrollArea.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ const ScrollAreaRoot = styled(ScrollArea.Root)`
3939

4040
const ScrollAreaViewport = styled(ScrollArea.Viewport)`
4141
min-width: 100%;
42-
padding-inline: 4px;
4342
`;
4443

4544
const Scrollbar = styled(ScrollArea.Scrollbar)`
@@ -51,19 +50,21 @@ const Scrollbar = styled(ScrollArea.Scrollbar)`
5150
5251
&[data-orientation='vertical'] {
5352
width: 0.4rem;
53+
margin: 0.4rem;
5454
}
5555
5656
&[data-orientation='horizontal'] {
5757
flex-direction: column;
5858
height: 0.4rem;
59+
margin: 0.4rem;
5960
}
6061
`;
6162

6263
const Thumb = styled(ScrollArea.Thumb)`
6364
position: relative;
6465
flex: 1;
6566
background-color: ${(props) => props.theme.colors.neutral150};
66-
border-radius: var(--scrollbar-size);
67+
border-radius: 0.4rem;
6768
6869
/* increase target size for touch devices https://www.w3.org/WAI/WCAG21/Understanding/target-size.html */
6970
&::before {

0 commit comments

Comments
 (0)