Skip to content

Commit

Permalink
Add class for screenreader only content
Browse files Browse the repository at this point in the history
  • Loading branch information
colepeters committed Apr 23, 2024
1 parent b3ba03f commit c6c0fab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion visibility.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
export default function overflow (query='') {
export default function overflow(query = '') {
return /*css*/`
/*** Visibility ***/
.invisible${query}{visibility:hidden;}
.visible${query}{visibility:visible;}
.screenreader-only${query}{border: 0; clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal;}
`
}

0 comments on commit c6c0fab

Please sign in to comment.