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

Breadcrumb

  1. Drupal Core 11.1.x

wrapper.pcss.css

CSS for off-canvas dialog wrapper.

@internal

File

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

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