mirror of
https://github.com/primer/css.git
synced 2024-11-25 07:33:41 +03:00
add show-on-focus utility
This commit is contained in:
parent
31c14f00d0
commit
f26b09c64a
@ -81,7 +81,6 @@
|
||||
// Only display content to screen readers
|
||||
//
|
||||
// See: http://a11yproject.com/posts/how-to-hide-content/
|
||||
|
||||
.sr-only {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
@ -93,3 +92,20 @@
|
||||
word-wrap: normal;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
// Only display content on focus
|
||||
.show-on-focus {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
clip: rect(1px, 1px, 1px, 1px);
|
||||
|
||||
&:focus {
|
||||
z-index: 20;
|
||||
width: auto;
|
||||
height: auto;
|
||||
clip: auto;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user