Skip to content

Commit

Permalink
fix: fix visually-hidden style to prevent a strange bug in Chrome
Browse files Browse the repository at this point in the history
Fixes #1200
  • Loading branch information
pdesoyres-cc committed Nov 15, 2024
1 parent 327b180 commit e05e85c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/styles/accessibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ import { css } from 'lit';
// language=CSS
export const accessibilityStyles = css`
.visually-hidden {
position: absolute;
overflow: hidden;
width: 1px;
height: 1px;
clip: rect(0 0 0 0);
clip-path: inset(50%);
height: 1px;
overflow: hidden;
position: absolute;
top: 0; /* this fixes a bug in Chrome when this style is used into a grid element (and has overflow) */
white-space: nowrap;
width: 1px;
}
`;

0 comments on commit e05e85c

Please sign in to comment.