Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

wrapper.css

CSS for off-canvas dialog wrapper.

@internal

File

core/misc/dialog/off-canvas/css/wrapper.css

View source
  1. /*
  2. * DO NOT EDIT THIS FILE.
  3. * See the following change record for more information,
  4. * https://www.drupal.org/node/3084859
  5. * @preserve
  6. */
  7. /**
  8. * @file
  9. * CSS for off-canvas dialog wrapper.
  10. *
  11. * @internal
  12. */
  13. #drupal-off-canvas-wrapper {
  14. --off-canvas-wrapper-box-shadow: 0 0 0.25rem 2px rgba(0, 0, 0, 0.3);
  15. --off-canvas-wrapper-border-color: #2d2d2d;
  16. --off-canvas-wrapper-border-width: 1px;
  17. z-index: 501; /* Layer the dialog just under the toolbar. */
  18. overflow: auto;
  19. box-sizing: border-box;
  20. height: 100%;
  21. border-inline-start: solid var(--off-canvas-wrapper-border-width) var(--off-canvas-wrapper-border-color);
  22. box-shadow: var(--off-canvas-wrapper-box-shadow);
  23. /*
  24. * Force the off-canvas dialog to be 100% width at the same breakpoint the
  25. * dialog system uses to expand dialog widths.
  26. */
  27. }
  28. @media (max-width: 48rem) {
  29. #drupal-off-canvas-wrapper {
  30. width: 100% !important;
  31. }
  32. }
  33. /* When off-canvas dialog is at 100% width stop the body from scrolling */
  34. @media (max-width: 48rem) {
  35. body.js-off-canvas-dialog-open {
  36. position: fixed;
  37. }
  38. }
  39. /* This is a page level content wrapper that shrinks when off-canvas is open. */
  40. .dialog-off-canvas-main-canvas {
  41. transition:
  42. padding-right 0.7s ease,
  43. padding-left 0.7s ease,
  44. padding-top 0.3s ease;
  45. }
  46. @media (prefers-reduced-motion: reduce) {
  47. .dialog-off-canvas-main-canvas {
  48. transition: none;
  49. }
  50. }
RSS feed
Powered by Drupal