SidebarNav.module.scss 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. @use '@growi/core/scss/bootstrap/init' as bs;
  2. @use '~/styles/variables' as var;
  3. .grw-sidebar-nav :global {
  4. $sidebar-nav-button-height: 55px;
  5. %fukidashi-for-active {
  6. position: relative;
  7. // speech balloon
  8. &:after {
  9. position: absolute;
  10. right: -0.1em;
  11. display: block;
  12. width: 0;
  13. content: '';
  14. border: 9px solid transparent;
  15. border-right-color: white;
  16. border-left-width: 0;
  17. transform: translateY(-#{$sidebar-nav-button-height / 2});
  18. }
  19. }
  20. // set position and z-index to prevent dropdowns covered by other element
  21. position: relative;
  22. z-index: bs.$zindex-fixed;
  23. height: 100vh;
  24. .grw-logo {
  25. svg {
  26. width: var.$grw-logo-width;
  27. height: var.$grw-logo-width;
  28. padding: (var.$grw-logo-width - var.$grw-logomark-width) / 2;
  29. }
  30. }
  31. .grw-apperance-mode-dropdown,
  32. .grw-personal-dropdown {
  33. .dropdown-menu {
  34. min-width: 15rem;
  35. .grw-icon-container svg {
  36. width: 18px;
  37. height: 18px;
  38. }
  39. }
  40. }
  41. .btn {
  42. width: var.$grw-sidebar-nav-width;
  43. line-height: 1em;
  44. border: 0;
  45. border-radius: 0;
  46. box-shadow: none !important;
  47. // icon opacity
  48. &:not(.active) {
  49. i {
  50. opacity: 0.6;
  51. }
  52. &:hover,
  53. &:focus {
  54. i {
  55. opacity: 0.7;
  56. }
  57. }
  58. }
  59. }
  60. .grw-sidebar-nav-primary-container {
  61. .btn {
  62. padding: 1em;
  63. i {
  64. font-size: 2.3em;
  65. }
  66. &.active {
  67. @extend %fukidashi-for-active;
  68. }
  69. }
  70. }
  71. .grw-sidebar-nav-secondary-container {
  72. position: fixed;
  73. bottom: 1.5rem;
  74. .btn {
  75. padding: 0.9em;
  76. i {
  77. font-size: 1.5em;
  78. }
  79. }
  80. }
  81. }
  82. .grw-sidebar-nav :global {
  83. .btn-primary {
  84. --bs-btn-bg: transparent !important;
  85. --bs-btn-active-bg: transparent !important;
  86. }
  87. }
  88. @include bs.color-mode(light) {
  89. .grw-sidebar-nav :global {
  90. background-color: var(--grw-highlight-100);
  91. .btn-primary {
  92. --bs-btn-color: var(--grw-primary-500);
  93. --bs-btn-hover-color: var(--grw-primary-500);
  94. --bs-btn-hover-bg: var(--grw-highlight-300);
  95. --bs-btn-active-color: var(--grw-primary-500);
  96. }
  97. }
  98. }
  99. @include bs.color-mode(dark) {
  100. .grw-sidebar-nav :global {
  101. background-color: var(--grw-highlight-900);
  102. .btn-primary {
  103. --bs-btn-color: var(--grw-primary-400);
  104. --bs-btn-hover-color: var(--grw-primary-400);
  105. --bs-btn-hover-bg: var(--grw-highlight-700);
  106. --bs-btn-active-color: var(--grw-primary-400);
  107. }
  108. }
  109. }