scss: utils: add sr-only utility mixin & class (36909)

This commit is contained in:
Thomas Jund 2019-10-14 16:22:00 +02:00 committed by Frédéric Péters
parent 37af4b4ac8
commit 9b37bd3edb
1 changed files with 17 additions and 0 deletions

View File

@ -38,3 +38,20 @@ $black: #000000 !default;
@function is-positive-number($value) {
@return type-of($value) == 'number' and $value > 0;
}
// Only display content to screen readers
@mixin sr-only {
position: absolute !important;
width: 1px !important;
height: 1px !important;
padding: 0 !important;
margin: -1px !important;
overflow: hidden !important;
clip: rect(0, 0, 0, 0) !important;
white-space: nowrap !important;
border: 0 !important;
}
.sr-only {
@include sr-only();
}