ToggleCollapseButton.module.scss 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. @use '@growi/core/scss/bootstrap/init' as bs;
  2. @use '../button-styles';
  3. @use '../variables' as var;
  4. .btn-toggle-collapse :global {
  5. @extend %btn-primary-basis;
  6. $height: var.$grw-sidebar-nav-width; // declare $height with the same value as the sidebar nav width
  7. height: $height;
  8. }
  9. // icon
  10. .btn-toggle-collapse :global {
  11. .material-symbols-outlined {
  12. transition: transform 0.25s;
  13. // rotation
  14. &.rotate180 {
  15. transform: rotate(180deg);
  16. }
  17. }
  18. }
  19. // == Colors
  20. .btn-toggle-collapse {
  21. &:global {
  22. &.btn.btn-primary {
  23. @extend %btn-primary-color-vars;
  24. }
  25. }
  26. }
  27. @include bs.color-mode(light) {
  28. .btn-toggle-collapse {
  29. &:global {
  30. &.btn.btn-primary {
  31. --bs-btn-color: var(--grw-sidebar-nav-btn-color, var(--bs-gray-500));
  32. --bs-btn-hover-bg: var(--grw-sidebar-nav-btn-hover-bg, var(--grw-highlight-300));
  33. }
  34. }
  35. }
  36. }
  37. @include bs.color-mode(dark) {
  38. .btn-toggle-collapse {
  39. &:global {
  40. &.btn.btn-primary {
  41. --bs-btn-color: var(--grw-sidebar-nav-btn-color, var(--bs-gray-600));
  42. --bs-btn-hover-bg: var(--grw-sidebar-nav-btn-hover-bg, var(--grw-highlight-700));
  43. }
  44. }
  45. }
  46. }