Skip to content

Commit 341589b

Browse files
committed
Switch to clip-path and protect against layout issues
1 parent 3cef94c commit 341589b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scss/mixins/_visually-hidden.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77

88
@mixin visually-hidden() {
99
display: inline-block !important; // using this rather than position:absolute to allow for width/height/clip to work without causing undue spacing (e.g. in responsive tables)
10+
flex: none !important;
1011
width: 1px !important;
1112
height: 1px !important;
1213
padding: 0 !important;
1314
margin: -1px !important; // Fix for https://github.com/twbs/bootstrap/issues/25686
1415
overflow: hidden !important;
15-
clip: rect(0, 0, 0, 0) !important;
16+
clip-path: inset(50%) !important;
17+
contain: strict !important;
1618
white-space: nowrap !important;
1719
border: 0 !important;
1820

0 commit comments

Comments
 (0)