SidebarHead.module.scss 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. @use '@growi/core/scss/bootstrap/init' as bs;
  2. @use '@growi/core/scss/growi-official-colors';
  3. @use '../button-styles';
  4. @use '../variables' as var;
  5. // GROWI Logo
  6. .grw-sidebar-head :global {
  7. .grw-logo {
  8. $width: var.$grw-sidebar-nav-width;
  9. $height: var.$grw-sidebar-nav-width; // declare $height with the same value as the sidebar nav width
  10. $logomark-width: 27.7px;
  11. $logomark-height: 24px;
  12. width: $width;
  13. svg {
  14. width: $width;
  15. height: $height;
  16. padding: (($height - $logomark-height) / 2) (($width - $logomark-width) / 2);
  17. }
  18. }
  19. }
  20. // Popout for the collapsed mode
  21. .grw-sidebar-head :global {
  22. .popout {
  23. position: absolute;
  24. &.grw-logo {
  25. left: var.$grw-sidebar-nav-width;
  26. }
  27. &.grw-app-title {
  28. left: var.$grw-sidebar-nav-width * 2;
  29. }
  30. }
  31. }
  32. // == Colors
  33. .grw-sidebar-head :global {
  34. .grw-logo {
  35. // set transition for fill
  36. svg, svg * {
  37. transition: fill 0.8s ease-out;
  38. }
  39. &:hover {
  40. svg {
  41. .group1 {
  42. fill: growi-official-colors.$growi-green;
  43. }
  44. .group2 {
  45. fill: growi-official-colors.$growi-blue;
  46. }
  47. }
  48. }
  49. }
  50. }
  51. @include bs.color-mode(light) {
  52. .grw-sidebar-head :global {
  53. background-color: var(
  54. --grw-sidebar-head-bg,
  55. var(
  56. --grw-sidebar-nav-bg,
  57. var(--grw-highlight-100)
  58. )
  59. );
  60. .grw-logo {
  61. fill: var(--grw-logo-color, var(--bs-gray-500));
  62. }
  63. .grw-app-title {
  64. color: var(--grw-app-title-color, var(--bs-gray-600));
  65. }
  66. }
  67. }
  68. @include bs.color-mode(dark) {
  69. .grw-sidebar-head :global {
  70. background-color: var(
  71. --grw-sidebar-head-bg,
  72. var(
  73. --grw-sidebar-nav-bg,
  74. var(--grw-highlight-800)
  75. )
  76. );
  77. .grw-logo {
  78. fill: var(--grw-logo-color, var(--bs-gray-600));
  79. }
  80. .grw-app-title {
  81. color: var(--grw-app-title-color, var(--bs-gray-500));
  82. }
  83. }
  84. }