Skip to content

Commit d234ac1

Browse files
Color Picker: Improve color picker slider focus styles
1 parent 5c7c4e7 commit d234ac1

File tree

1 file changed

+10
-0
lines changed
  • packages/components/src/color-picker

1 file changed

+10
-0
lines changed

packages/components/src/color-picker/styles.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,16 @@ export const ColorfulWrapper = styled.div`
9191
9292
// Shown instead of box-shadow to Windows high contrast mode.
9393
outline: 2px solid transparent;
94+
95+
@media not ( prefers-reduced-motion ) {
96+
transition: transform ${ CONFIG.transitionDurationFast } ease-in-out;
97+
}
98+
}
99+
100+
.react-colorful__interactive:focus .react-colorful__pointer {
101+
box-shadow: 0 0 0 ${ CONFIG.borderWidthFocus } ${ CONFIG.surfaceColor };
102+
border: ${ CONFIG.borderWidthFocus } solid black;
103+
transform: translate( -50%, -50% ) scale( 1.5 );
94104
}
95105
96106
.react-colorful__pointer-fill {

0 commit comments

Comments
 (0)