annotate core/themes/stable/css/system/components/hidden.module.css @ 0:c75dbcec494b

Initial commit from drush-created site
author Chris Cannam
date Thu, 05 Jul 2018 14:24:15 +0000
parents
children 12f9dff5fda9
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@0 28 clip: rect(1px, 1px, 1px, 1px);
Chris@0 29 overflow: hidden;
Chris@0 30 height: 1px;
Chris@0 31 width: 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@0 42 clip: auto;
Chris@0 43 overflow: visible;
Chris@0 44 height: auto;
Chris@0 45 width: 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 }