mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-20 12:21:35 +02:00
Expand visually-hidden-focusable
so it can be used on a container, so the container becomes visible when focus is inside it / on one of its child elements.
This commit is contained in:
committed by
XhmikosR
parent
9b6c815148
commit
eae52b1cb0
@@ -3,6 +3,6 @@
|
||||
//
|
||||
|
||||
.visually-hidden,
|
||||
.visually-hidden-focusable:not(:focus) {
|
||||
.visually-hidden-focusable:not(:focus):not(:focus-within) {
|
||||
@include visually-hidden();
|
||||
}
|
||||
|
@@ -17,12 +17,13 @@
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
// Use to only display content when it's focused.
|
||||
// Use to only display content when it's focused, or one of its child elements is focused
|
||||
// (i.e. when focus is within the element/container that the class was applied to)
|
||||
//
|
||||
// Useful for "Skip to main content" links; see https://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
|
||||
|
||||
@mixin visually-hidden-focusable() {
|
||||
&:not(:focus) {
|
||||
&:not(:focus):not(:focus-within) {
|
||||
@include visually-hidden();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user