A11y: Add .is-sr-only to helpers (#1764)

This commit is contained in:
Muhannad Abdelrazek 2018-07-09 17:09:42 +02:00 committed by Jeremy Thomas
parent 2b8f6680db
commit e71c248cde
3 changed files with 16 additions and 0 deletions

View File

@ -487,6 +487,7 @@
### New features ### New features
* 🎉 Rounded buttons, inputs, pagination and toggle tabs * 🎉 Rounded buttons, inputs, pagination and toggle tabs
* #1764 New `.is-sr-only` helper
### Improvements ### Improvements

View File

@ -58,5 +58,9 @@ breadcrumb:
<td><code>is-invisible</code></td> <td><code>is-invisible</code></td>
<td>Adds visibility <strong>hidden</strong></td> <td>Adds visibility <strong>hidden</strong></td>
</tr> </tr>
<tr>
<td><code>is-sr-only</code></td>
<td>Hide elements <strong>visually</strong> but keep the element available to be announced by a <strong>screen reader</strong></td>
</tr>
</tbody> </tbody>
</table> </table>

View File

@ -158,6 +158,17 @@ $displays: 'block' 'flex' 'inline' 'inline-block' 'inline-flex'
.is-hidden .is-hidden
display: none !important display: none !important
.is-sr-only
position: absolute !important
width: 1px !important
height: 1px !important
padding: 0 !important
border: 0 !important
overflow: hidden !important
clip: rect(0, 0, 0, 0) !important
clip-path: inset(50%) !important
white-space: nowrap !important
+mobile +mobile
.is-hidden-mobile .is-hidden-mobile
display: none !important display: none !important