AppTitle.module.scss 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. @use '@growi/core-styles/scss/bootstrap/init' as bs;
  2. @use '@growi/core-styles/scss/variables/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. @include bs.media-breakpoint-up(sm) {
  38. width: calc(100vw - #{$grw-page-controls-width + $grw-page-editor-mode-manager-width + $grw-contextual-subnavigation-padding-right + $gap * 2});
  39. }
  40. @include bs.media-breakpoint-up(md) {
  41. $grw-page-editor-mode-manager-width: 140px;
  42. $gap: 24px;
  43. $grw-contextual-subnavigation-padding-right: 24px;
  44. 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});
  45. }
  46. }
  47. .on-sidebar-head {
  48. $toggle-collapse-button-width: 50px;
  49. // set width for truncation
  50. width: calc(100% - $toggle-collapse-button-width);
  51. }
  52. // == Interaction
  53. @keyframes bounce-to-right {
  54. 10% { transform:translateX(3px); }
  55. 20% { transform:translateX(0%); }
  56. 25% { transform:translateX(2px); }
  57. 27% { transform:translateX(0%); }
  58. }
  59. .on-subnavigation {
  60. animation: bounce-to-right 1s ease;
  61. }
  62. @keyframes bounce-to-left {
  63. 0% { transform:translateX(48px); }
  64. 100% { transform:translateX(0%); }
  65. }
  66. .on-sidebar-head {
  67. animation: bounce-to-left 0.2s ease;
  68. }
  69. // == Colors
  70. .grw-app-title :global {
  71. .grw-site-name {
  72. --bs-link-color-rgb: var(--grw-app-title-color-rgb, var(--bs-tertiary-color-rgb));
  73. --bs-link-opacity: 0.5;
  74. }
  75. }