Mercurial > hg > isophonics-drupal-site
annotate core/modules/system/css/components/hidden.module.css @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | af1871eacc83 |
children |
rev | line source |
---|---|
Chris@0 | 1 /** |
Chris@0 | 2 * @file |
Chris@0 | 3 * Utility classes to hide elements in different ways. |
Chris@0 | 4 */ |
Chris@0 | 5 |
Chris@0 | 6 /** |
Chris@0 | 7 * Hide elements from all users. |
Chris@0 | 8 * |
Chris@0 | 9 * Used for elements which should not be immediately displayed to any user. An |
Chris@0 | 10 * example would be collapsible details that will be expanded with a click |
Chris@0 | 11 * from a user. The effect of this class can be toggled with the jQuery show() |
Chris@0 | 12 * and hide() functions. |
Chris@0 | 13 */ |
Chris@0 | 14 .hidden { |
Chris@0 | 15 display: none; |
Chris@0 | 16 } |
Chris@0 | 17 |
Chris@0 | 18 /** |
Chris@0 | 19 * Hide elements visually, but keep them available for screen readers. |
Chris@0 | 20 * |
Chris@0 | 21 * Used for information required for screen reader users to understand and use |
Chris@0 | 22 * the site where visual display is undesirable. Information provided in this |
Chris@0 | 23 * manner should be kept concise, to avoid unnecessary burden on the user. |
Chris@0 | 24 * "!important" is used to prevent unintentional overrides. |
Chris@0 | 25 */ |
Chris@0 | 26 .visually-hidden { |
Chris@0 | 27 position: absolute !important; |
Chris@18 | 28 overflow: hidden; |
Chris@0 | 29 clip: rect(1px, 1px, 1px, 1px); |
Chris@18 | 30 width: 1px; |
Chris@0 | 31 height: 1px; |
Chris@0 | 32 word-wrap: normal; |
Chris@0 | 33 } |
Chris@0 | 34 |
Chris@0 | 35 /** |
Chris@0 | 36 * The .focusable class extends the .visually-hidden class to allow |
Chris@0 | 37 * the element to be focusable when navigated to via the keyboard. |
Chris@0 | 38 */ |
Chris@0 | 39 .visually-hidden.focusable:active, |
Chris@0 | 40 .visually-hidden.focusable:focus { |
Chris@0 | 41 position: static !important; |
Chris@18 | 42 overflow: visible; |
Chris@0 | 43 clip: auto; |
Chris@18 | 44 width: auto; |
Chris@0 | 45 height: auto; |
Chris@0 | 46 } |
Chris@0 | 47 |
Chris@0 | 48 /** |
Chris@0 | 49 * Hide visually and from screen readers, but maintain layout. |
Chris@0 | 50 */ |
Chris@0 | 51 .invisible { |
Chris@0 | 52 visibility: hidden; |
Chris@0 | 53 } |