Skip to content

Commit

Permalink
Merge pull request #441 from pixiv/toshusai/feat-update-focus-behavior
Browse files Browse the repository at this point in the history
feat: update focus behavior
  • Loading branch information
toshusai authored Feb 8, 2024
2 parents 580bba0 + 1f5ffb8 commit d419351
Show file tree
Hide file tree
Showing 23 changed files with 787 additions and 385 deletions.
8 changes: 2 additions & 6 deletions packages/react/src/components/Button/StyledButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Clickable from '../Clickable'
import { variantToFont } from './lib/variantToFont'
import { variantToBackground } from './lib/variantToBackground'
import type { Size } from '.'
import { focusVisibleFocusRingCss } from '@charcoal-ui/styled'

const horizontalPaddingSmall = css`
padding-right: 16px;
Expand Down Expand Up @@ -41,12 +42,7 @@ export const StyledButton = styled(Clickable)<StyledButtonProps>`
&:not(:disabled):not([aria-disabled]),
&[aria-disabled='false'] {
&:active,
&:focus,
&:focus-visible {
outline: none;
box-shadow: 0 0 0 4px rgba(0, 150, 250, 0.32);
}
${focusVisibleFocusRingCss}
&:hover {
color: var(--charcoal-${(p) => p.$color}-hover);
Expand Down
Loading

0 comments on commit d419351

Please sign in to comment.