hidden.module.css 1.3 KB

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