Better handling of focus outlines

This commit is contained in:
Jackson Harper
2023-05-25 15:26:29 +08:00
parent 5f7ca75273
commit b6410976e5
5 changed files with 7 additions and 9 deletions

View File

@ -32,7 +32,6 @@ export const Button = styled('button', {
bg: '$omnivoreCtaYellow',
},
'&:focus': {
outline: 'none !important',
border: '1px solid $omnivoreCtaYellow',
},
},

View File

@ -96,6 +96,7 @@ export function LibraryGridCard(props: LinkedItemCardProps): JSX.Element {
<a
href={`${props.viewer.profile.username}/${props.item.slug}`}
style={{ textDecoration: 'unset', width: '100%', height: '100%' }}
tabIndex={-1}
>
<HStack
css={{

View File

@ -66,6 +66,7 @@ export function LibraryListCard(props: LinkedItemCardProps): JSX.Element {
<a
href={`${props.viewer.profile.username}/${props.item.slug}`}
style={{ textDecoration: 'unset', width: '100%', height: '100%' }}
tabIndex={-1}
>
<HStack css={MetaStyle} distribution="start">
<LibraryItemMetadata item={props.item} showProgress={true} />

View File

@ -932,11 +932,16 @@ function LibraryItems(props: LibraryItemsProps): JSX.Element {
key={linkedItem.node.id}
css={{
width: '100%',
'&:focus-visible': {
outline: 'none',
},
'&> div': {
bg: '$thBackground3',
},
'&:focus': {
outline: 'none',
'> div': {
outline: 'none',
bg: '$thBackgroundActive',
},
},

View File

@ -336,14 +336,6 @@ export const globalStyles = globalCss({
colorScheme: 'var(--colorScheme-colorScheme)',
backgroundColor: '$thBackground',
},
'*': {
'&:focus': {
outline: 'none',
},
'&:focus-visible': {
outline: 'none',
},
},
// browser prefers this loaded here vs in the article styling css
'.article-inner-css': {
'::selection': {