AppTitle.module.scss 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. @use '@growi/core/scss/bootstrap/init' as bs;
  2. @use '@growi/core/scss/growi-official-colors';
  3. @use '~/styles/variables' as var;
  4. @use '../button-styles';
  5. // GROWI Logo
  6. .grw-app-title :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. // == Location
  21. .on-subnavigation {
  22. $grw-contextual-sub-navigation-width: 500px;
  23. left: var.$grw-sidebar-nav-width;
  24. // set width for truncation
  25. width: calc(100vw - $grw-contextual-sub-navigation-width);
  26. }
  27. .on-sidebar-head {
  28. $toggle-collapse-button-width: 50px;
  29. // set width for truncation
  30. width: calc(100% - $toggle-collapse-button-width);
  31. }
  32. // == Interaction
  33. @keyframes bounce-to-right {
  34. 10% { transform:translateX(3px); }
  35. 20% { transform:translateX(0%); }
  36. 25% { transform:translateX(2px); }
  37. 27% { transform:translateX(0%); }
  38. }
  39. .on-subnavigation {
  40. animation: bounce-to-right 1s ease;
  41. }
  42. @keyframes bounce-to-left {
  43. 0% { transform:translateX(48px); }
  44. 100% { transform:translateX(0%); }
  45. }
  46. .on-sidebar-head {
  47. animation: bounce-to-left 0.2s ease;
  48. }
  49. // == Colors
  50. .grw-app-title :global {
  51. .grw-logo {
  52. // set transition for fill
  53. svg, svg * {
  54. transition: fill 0.8s ease-out;
  55. }
  56. fill: var(--grw-app-title-color, var(--bs-tertiary-color));
  57. &:hover {
  58. svg {
  59. .group1 {
  60. fill: growi-official-colors.$growi-green;
  61. }
  62. .group2 {
  63. fill: growi-official-colors.$growi-blue;
  64. }
  65. }
  66. }
  67. }
  68. .grw-site-name {
  69. --bs-link-color-rgb: var(--grw-app-title-color-rgb, var(--bs-tertiary-color-rgb));
  70. --bs-link-opacity: 0.5;
  71. }
  72. }