]> git.ipfire.org Git - thirdparty/bulma.git/commitdiff
A11y: Add .is-sr-only to helpers (#1764)
authorMuhannad Abdelrazek <muhnad.abdelrazek@gmail.com>
Mon, 9 Jul 2018 15:09:42 +0000 (17:09 +0200)
committerJeremy Thomas <bbxdesign@gmail.com>
Mon, 9 Jul 2018 15:09:42 +0000 (16:09 +0100)
CHANGELOG.md
docs/documentation/modifiers/helpers.html
sass/base/helpers.sass

index 9fd7fb0afdd4dc855e74392b7c4a0683c7d9b8ae..f86fd5d6d379da9c6faf70b8276afb23cc6f0a50 100644 (file)
 ### New features
 
 * ðŸŽ‰ Rounded buttons, inputs, pagination and toggle tabs
+* #1764 New `.is-sr-only` helper
 
 ### Improvements
 
index 3c1c915fec0370c09fab249f9b5fd3e2553fa7e6..2e69b971a19da7f56c1d1f5b0f352fb235c1e20f 100644 (file)
@@ -58,5 +58,9 @@ breadcrumb:
       <td><code>is-invisible</code></td>
       <td>Adds visibility <strong>hidden</strong></td>
     </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>
 </table>
index 32cafa4f7eb04e329e5e34214a19ffd7af098e63..87774bb4e8bb87774937bd2a14dcb2a6642a5a61 100644 (file)
@@ -158,6 +158,17 @@ $displays: 'block' 'flex' 'inline' 'inline-block' 'inline-flex'
 .is-hidden
   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
   .is-hidden-mobile
     display: none !important