Chris@0: /** Chris@0: * @file Chris@0: * Utility classes to hide elements in different ways. Chris@0: */ Chris@0: Chris@0: /** Chris@0: * Hide elements from all users. Chris@0: * Chris@0: * Used for elements which should not be immediately displayed to any user. An Chris@0: * example would be collapsible details that will be expanded with a click Chris@0: * from a user. The effect of this class can be toggled with the jQuery show() Chris@0: * and hide() functions. Chris@0: */ Chris@0: .hidden { Chris@0: display: none; Chris@0: } Chris@0: Chris@0: /** Chris@0: * Hide elements visually, but keep them available for screen readers. Chris@0: * Chris@0: * Used for information required for screen reader users to understand and use Chris@0: * the site where visual display is undesirable. Information provided in this Chris@0: * manner should be kept concise, to avoid unnecessary burden on the user. Chris@0: * "!important" is used to prevent unintentional overrides. Chris@0: */ Chris@0: .visually-hidden { Chris@0: position: absolute !important; Chris@18: overflow: hidden; Chris@0: clip: rect(1px, 1px, 1px, 1px); Chris@18: width: 1px; Chris@0: height: 1px; Chris@0: word-wrap: normal; Chris@0: } Chris@0: Chris@0: /** Chris@0: * The .focusable class extends the .visually-hidden class to allow Chris@0: * the element to be focusable when navigated to via the keyboard. Chris@0: */ Chris@0: .visually-hidden.focusable:active, Chris@0: .visually-hidden.focusable:focus { Chris@0: position: static !important; Chris@18: overflow: visible; Chris@0: clip: auto; Chris@18: width: auto; Chris@0: height: auto; Chris@0: } Chris@0: Chris@0: /** Chris@0: * Hide visually and from screen readers, but maintain layout. Chris@0: */ Chris@0: .invisible { Chris@0: visibility: hidden; Chris@0: }