Skip to content

Commit

Permalink
feat: Scrollbar color contrast improvement (#32341)
Browse files Browse the repository at this point in the history
  • Loading branch information
dougfabris committed May 2, 2024
1 parent 70ab2a7 commit 92cf2b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/warm-squids-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': minor
---

Changes the scrollbar color in order to improve the contrast and accessibility compliance
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Palette } from '@rocket.chat/fuselage';
import type { ScrollValues } from 'rc-scrollbars';
import { Scrollbars } from 'rc-scrollbars';
import type { MutableRefObject, CSSProperties, ReactNode, ReactElement } from 'react';
Expand Down Expand Up @@ -43,7 +44,7 @@ const CustomScrollbars = forwardRef<HTMLElement, CustomScrollbarsProps>(function
overflowX ? undefined : (props): ReactElement => <div {...props} className='track-horizontal' style={{ display: 'none' }} />
}
renderThumbVertical={({ style, ...props }): JSX.Element => (
<div {...props} style={{ ...style, backgroundColor: 'rgba(0, 0, 0, 0.5)', borderRadius: '7px' }} />
<div {...props} style={{ ...style, backgroundColor: Palette.stroke['stroke-dark'].toString(), borderRadius: '4px' }} />
)}
children={children}
ref={refSetter}
Expand Down

0 comments on commit 92cf2b6

Please sign in to comment.