You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
1.9 KiB

  1. .offcanvas {
  2. position: fixed;
  3. bottom: 0;
  4. z-index: $zindex-offcanvas;
  5. display: flex;
  6. flex-direction: column;
  7. max-width: 100%;
  8. color: $offcanvas-color;
  9. visibility: hidden;
  10. background-color: $offcanvas-bg-color;
  11. background-clip: padding-box;
  12. outline: 0;
  13. @include box-shadow($offcanvas-box-shadow);
  14. @include transition(transform $offcanvas-transition-duration ease-in-out);
  15. }
  16. .offcanvas-backdrop {
  17. @include overlay-backdrop($zindex-offcanvas-backdrop, $offcanvas-backdrop-bg, $offcanvas-backdrop-opacity);
  18. }
  19. .offcanvas-header {
  20. display: flex;
  21. align-items: center;
  22. justify-content: space-between;
  23. padding: $offcanvas-padding-y $offcanvas-padding-x;
  24. .btn-close {
  25. padding: ($offcanvas-padding-y * .5) ($offcanvas-padding-x * .5);
  26. margin-top: $offcanvas-padding-y * -.5;
  27. margin-right: $offcanvas-padding-x * -.5;
  28. margin-bottom: $offcanvas-padding-y * -.5;
  29. }
  30. }
  31. .offcanvas-title {
  32. margin-bottom: 0;
  33. line-height: $offcanvas-title-line-height;
  34. }
  35. .offcanvas-body {
  36. flex-grow: 1;
  37. padding: $offcanvas-padding-y $offcanvas-padding-x;
  38. overflow-y: auto;
  39. }
  40. .offcanvas-start {
  41. top: 0;
  42. left: 0;
  43. width: $offcanvas-horizontal-width;
  44. border-right: $offcanvas-border-width solid $offcanvas-border-color;
  45. transform: translateX(-100%);
  46. }
  47. .offcanvas-end {
  48. top: 0;
  49. right: 0;
  50. width: $offcanvas-horizontal-width;
  51. border-left: $offcanvas-border-width solid $offcanvas-border-color;
  52. transform: translateX(100%);
  53. }
  54. .offcanvas-top {
  55. top: 0;
  56. right: 0;
  57. left: 0;
  58. height: $offcanvas-vertical-height;
  59. max-height: 100%;
  60. border-bottom: $offcanvas-border-width solid $offcanvas-border-color;
  61. transform: translateY(-100%);
  62. }
  63. .offcanvas-bottom {
  64. right: 0;
  65. left: 0;
  66. height: $offcanvas-vertical-height;
  67. max-height: 100%;
  68. border-top: $offcanvas-border-width solid $offcanvas-border-color;
  69. transform: translateY(100%);
  70. }
  71. .offcanvas.show {
  72. transform: none;
  73. }