Skip to content

Commit

Permalink
Add negative margin on VisuallyHidden on both sides (#4177)
Browse files Browse the repository at this point in the history
  • Loading branch information
filipw01 committed Mar 29, 2023
1 parent db4c617 commit 615bcfc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/@react-aria/live-announcer/src/LiveAnnouncer.tsx
Expand Up @@ -71,7 +71,7 @@ class LiveAnnouncer {
clip: 'rect(0 0 0 0)',
clipPath: 'inset(50%)',
height: '1px',
margin: '0 -1px -1px 0',
margin: '-1px',
overflow: 'hidden',
padding: 0,
position: 'absolute',
Expand Down
6 changes: 3 additions & 3 deletions packages/@react-aria/visually-hidden/src/VisuallyHidden.tsx
Expand Up @@ -33,12 +33,12 @@ const styles: CSSProperties = {
border: 0,
clip: 'rect(0 0 0 0)',
clipPath: 'inset(50%)',
height: 1,
margin: '0 -1px -1px 0',
height: '1px',
margin: '-1px',
overflow: 'hidden',
padding: 0,
position: 'absolute',
width: 1,
width: '1px',
whiteSpace: 'nowrap'
};

Expand Down

1 comment on commit 615bcfc

@rspbot
Copy link

@rspbot rspbot commented on 615bcfc Mar 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.