offsidebar.scss 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /* ========================================================================
  2. Component: offsidebar
  3. ========================================================================== */
  4. //
  5. // A sidebar in offcanvas mode
  6. // Open status toggled via JS
  7. // -----------------------------------------
  8. $offsidebar-bg: #fff;
  9. $offsidebar-border-color: grayscale(darken($offsidebar-bg, 20%));
  10. $offsidebar-color: $body-color;
  11. $offsidebar-wd: $aside-wd + 15px; // match the width with the main aside component
  12. .offsidebar {
  13. position: absolute;
  14. top: 0;
  15. bottom: 0;
  16. right: 0;
  17. width: $offsidebar-wd;
  18. margin-top: $navbar-height;
  19. border-left: 1px solid $offsidebar-border-color;
  20. background-color: $offsidebar-bg;
  21. color: $offsidebar-color;
  22. overflow: auto;
  23. -webkit-overflow-scrolling: touch;
  24. z-index: -1;
  25. >.list-group {
  26. min-height: 100%;
  27. overflow: hidden;
  28. -webkit-transform: translateZ(0px);
  29. }
  30. .progress {
  31. border: 0;
  32. }
  33. .tab-content {
  34. padding: 0;
  35. border: 0;
  36. } // change style of tab component inside offsidebar
  37. .nav-tabs {
  38. border-bottom: 1px solid rgba(0, 0, 0, .05);
  39. >.nav-item>.nav-link {
  40. background-color: transparent;
  41. border: 0;
  42. border-right: 1px solid rgba(0, 0, 0, .05);
  43. border-radius: 0;
  44. color: $text-muted;
  45. &.active {
  46. color: $primary;
  47. }
  48. }
  49. }
  50. @include media-breakpoint-up(md) {
  51. margin-top: $navbar-height;
  52. }
  53. }
  54. // Global open status (attach to body)
  55. .offsidebar-open {
  56. .offsidebar {
  57. overflow-y: auto;
  58. z-index: $z-index-main-section + 5;
  59. }
  60. @include media-breakpoint-up(md) {
  61. overflow-y: auto;
  62. }
  63. }
  64. /* Transformation ready devices*/
  65. .offsidebar {
  66. right: 0;
  67. transform: translate3d( ($offsidebar-wd), 0, 0);
  68. transition: transform .3s ease, z-index 0s linear .3s;
  69. }
  70. .offsidebar-open {
  71. .offsidebar {
  72. transform: translate3d(0, 0, 0);
  73. transition: transform .3s ease;
  74. }
  75. }