AppTitle.module.scss 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. .confidential-tooltip {
  20. max-width: 180px;
  21. }
  22. }
  23. // == Location
  24. .on-subnavigation {
  25. top: 0;
  26. @include bs.media-breakpoint-up(md) {
  27. left: var.$grw-sidebar-nav-width;
  28. }
  29. }
  30. // == App title truncation
  31. .on-subnavigation {
  32. // set width for truncation
  33. $grw-page-controls-width: 280px;
  34. $grw-page-editor-mode-manager-width: 90px;
  35. $grw-contextual-subnavigation-padding-right: 12px;
  36. $gap: 8px;
  37. width: calc(100vw - #{$grw-page-controls-width + $grw-page-editor-mode-manager-width + $grw-contextual-subnavigation-padding-right + $gap * 2});
  38. @include bs.media-breakpoint-up(md) {
  39. $grw-page-editor-mode-manager-width: 140px;
  40. $gap: 24px;
  41. $grw-contextual-subnavigation-padding-right: 24px;
  42. width: calc(100vw - #{var.$grw-sidebar-nav-width + $grw-page-controls-width + $grw-page-editor-mode-manager-width + $grw-contextual-subnavigation-padding-right + $gap * 2});
  43. }
  44. }
  45. .on-sidebar-head {
  46. $toggle-collapse-button-width: 50px;
  47. // set width for truncation
  48. width: calc(100% - $toggle-collapse-button-width);
  49. }
  50. // == Interaction
  51. @keyframes bounce-to-right {
  52. 10% { transform:translateX(3px); }
  53. 20% { transform:translateX(0%); }
  54. 25% { transform:translateX(2px); }
  55. 27% { transform:translateX(0%); }
  56. }
  57. .on-subnavigation {
  58. animation: bounce-to-right 1s ease;
  59. }
  60. @keyframes bounce-to-left {
  61. 0% { transform:translateX(48px); }
  62. 100% { transform:translateX(0%); }
  63. }
  64. .on-sidebar-head {
  65. animation: bounce-to-left 0.2s ease;
  66. }
  67. // == Colors
  68. .grw-app-title :global {
  69. .grw-site-name {
  70. --bs-link-color-rgb: var(--grw-app-title-color-rgb, var(--bs-tertiary-color-rgb));
  71. --bs-link-opacity: 0.5;
  72. }
  73. }