Skip to content

Instantly share code, notes, and snippets.

@badlydrawnrob
Last active May 26, 2017 14:44
Show Gist options
  • Save badlydrawnrob/0646ec5ff050c2b94c14240aed9e2a0a to your computer and use it in GitHub Desktop.
Save badlydrawnrob/0646ec5ff050c2b94c14240aed9e2a0a to your computer and use it in GitHub Desktop.
# Some handy snippets for Cardinal Stylus framework
.cs-VisuallyHidden
position: absolute
overflow: hidden
clip: rect(0 0 0 0)
margin: -1px
padding: 0
width: 1px
height: 1px
border: 0
// Extends the `.vh` class to allow the element to be focusable when navigated
// to via the keyboard.
// - @link http://cbrac.co/RR8gO6
.cs-VisuallyHidden-focusable
.cs-VisuallyHidden &
&:active,
&:focus
position: static
overflow: visible
clip: auto
margin: 0
width: auto
height: auto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment