offcanvas.css 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. html,
  2. body {
  3. overflow-x: hidden; /* Prevent scroll on narrow devices */
  4. }
  5. @media (max-width: 767.98px) {
  6. .offcanvas-collapse {
  7. position: fixed;
  8. top: 56px; /* Height of navbar */
  9. bottom: 0;
  10. width: 100%;
  11. padding-right: 1rem;
  12. padding-left: 1rem;
  13. overflow-y: auto;
  14. background-color: #fff;
  15. transition: -webkit-transform .3s ease-in-out;
  16. transition: transform .3s ease-in-out;
  17. transition: transform .3s ease-in-out, -webkit-transform .3s ease-in-out;
  18. -webkit-transform: translateX(100%);
  19. transform: translateX(100%);
  20. z-index: 1;
  21. }
  22. .offcanvas-collapse.open {
  23. -webkit-transform: translateX(-1rem);
  24. transform: translateX(-1rem); /* Account for horizontal padding on navbar */
  25. }
  26. }
  27. .nav-scroller {
  28. position: relative;
  29. z-index: 2;
  30. height: 2.75rem;
  31. overflow-y: hidden;
  32. }
  33. .nav-scroller .nav {
  34. display: -webkit-box;
  35. display: -ms-flexbox;
  36. display: flex;
  37. -ms-flex-wrap: nowrap;
  38. flex-wrap: nowrap;
  39. padding-bottom: 1rem;
  40. margin-top: -1px;
  41. overflow-x: auto;
  42. color: rgba(255, 255, 255, .75);
  43. text-align: center;
  44. white-space: nowrap;
  45. -webkit-overflow-scrolling: touch;
  46. }
  47. .nav-underline .nav-link {
  48. padding-top: .75rem;
  49. padding-bottom: .75rem;
  50. font-size: .875rem;
  51. color: var(--secondary);
  52. }
  53. .nav-underline .nav-link:hover {
  54. color: var(--blue);
  55. }
  56. .nav-underline .active {
  57. font-weight: 500;
  58. color: var(--gray-dark);
  59. }
  60. .text-white-50 { color: rgba(255, 255, 255, .5); }
  61. .bg-purple { background-color: var(--purple); }
  62. .border-bottom { border-bottom: 1px solid #e5e5e5; }
  63. .box-shadow { box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); }
  64. .lh-100 { line-height: 1; }
  65. .lh-125 { line-height: 1.25; }
  66. .lh-150 { line-height: 1.5; }