toolbar-redesign.scss 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. @use 'sass:math';
  2. :root {
  3. --redesign-toolbar-home-button-hover-background: var(--bg-dark-secondary);
  4. --redesign-toolbar-border-divider: var(--border-divider-dark);
  5. --redesign-toolbar-background: var(--bg-dark-primary);
  6. --redesign-toolbar-home-link-color: var(--content-primary-dark);
  7. --redesign-toolbar-logo-url: url('../../../../public/img/ol-brand/overleaf-o-white.svg');
  8. --redesign-subdued-button-color: var(--content-primary-dark);
  9. --redesign-subdued-button-hover-background: var(--bg-dark-tertiary);
  10. --redesign-toolbar-feedback-link-color: var(--link-ui-dark);
  11. }
  12. @include theme('light') {
  13. --redesign-toolbar-home-button-hover-background: var(--neutral-20);
  14. --redesign-toolbar-border-divider: var(--border-divider);
  15. --redesign-toolbar-background: var(--bg-light-primary);
  16. --redesign-toolbar-home-link-color: var(--content-primary);
  17. --redesign-toolbar-logo-url: url('../../../../public/img/ol-brand/overleaf-o-dark.svg');
  18. --redesign-subdued-button-color: var(--content-primary);
  19. --redesign-subdued-button-hover-background: var(--bg-light-tertiary);
  20. --redesign-toolbar-feedback-link-color: var(--link-ui);
  21. }
  22. .ide-redesign-toolbar {
  23. $toolbar-height: 40px;
  24. $home-button-size: 32px;
  25. $ol-icon-height: 24px;
  26. $home-icon-font-size: 24px;
  27. border-bottom: 1px solid var(--redesign-toolbar-border-divider);
  28. background-color: var(--redesign-toolbar-background);
  29. display: flex;
  30. flex-direction: row;
  31. justify-content: space-between;
  32. box-sizing: border-box;
  33. height: $toolbar-height;
  34. padding: 0 var(--spacing-02);
  35. gap: var(--spacing-05);
  36. .ide-redesign-toolbar-menu {
  37. display: flex;
  38. gap: var(--spacing-05);
  39. }
  40. .ide-redesign-toolbar-menu,
  41. .ide-redesign-toolbar-actions {
  42. flex: 0 0 auto;
  43. }
  44. .ide-redesign-toolbar-home-button {
  45. width: $home-button-size;
  46. height: $home-button-size;
  47. margin: math.div($toolbar-height - $home-button-size, 2) 0;
  48. }
  49. .ide-redesign-toolbar-button-subdued {
  50. @include ol-button-variant(
  51. var(--redesign-subdued-button-color),
  52. transparent,
  53. transparent,
  54. var(--redesign-subdued-button-hover-background),
  55. transparent,
  56. true
  57. );
  58. text-decoration: none;
  59. &.ide-redesign-toolbar-button-icon {
  60. @include ol-button-variant(
  61. var(--redesign-subdued-button-color),
  62. var(--redesign-toolbar-background),
  63. transparent,
  64. var(--redesign-subdued-button-hover-background),
  65. transparent,
  66. true
  67. );
  68. border-radius: var(--border-radius-full);
  69. display: flex;
  70. justify-content: center;
  71. padding: var(--spacing-02);
  72. &:visited,
  73. &:focus {
  74. color: var(--redesign-subdued-button-color);
  75. }
  76. }
  77. }
  78. .ide-redesign-toolbar-home-link {
  79. display: flex;
  80. height: 100%;
  81. width: 100%;
  82. justify-content: center;
  83. flex-direction: column;
  84. text-align: center;
  85. border-radius: 100%;
  86. color: var(--redesign-toolbar-home-link-color);
  87. .toolbar-ol-home-button {
  88. display: none;
  89. font-size: $home-icon-font-size;
  90. }
  91. .toolbar-ol-logo {
  92. margin: 0 auto;
  93. display: block;
  94. width: $ol-icon-height;
  95. height: $ol-icon-height;
  96. background-image: var(--redesign-toolbar-logo-url);
  97. background-position: center;
  98. background-repeat: no-repeat;
  99. background-size: contain;
  100. }
  101. &:hover {
  102. background-color: var(--redesign-toolbar-home-button-hover-background);
  103. .toolbar-ol-home-button {
  104. display: block;
  105. }
  106. .toolbar-ol-logo {
  107. display: none;
  108. }
  109. }
  110. }
  111. .ide-redesign-toolbar-dropdown-toggle-subdued {
  112. $height: 28px;
  113. border: none;
  114. border-radius: var(--border-radius-base);
  115. padding: var(--spacing-02);
  116. height: $height;
  117. font-size: var(--font-size-02);
  118. line-height: var(--line-height-02);
  119. font-weight: 400;
  120. box-sizing: border-box;
  121. margin: math.div($toolbar-height - $height, 2) 0;
  122. &.dropdown-toggle::after {
  123. display: none;
  124. }
  125. .material-symbols {
  126. vertical-align: middle;
  127. }
  128. }
  129. .ide-redesign-toolbar-logos {
  130. display: flex;
  131. }
  132. .ide-redesign-toolbar-cobranding-separator {
  133. $separator-height: 16px;
  134. border-radius: var(--border-radius-base);
  135. width: 1px;
  136. height: $separator-height;
  137. margin-top: math.div($toolbar-height - $separator-height, 2);
  138. // To account for the 1px border of the rail so that they're aligned.
  139. margin-left: calc(var(--spacing-02) - 1px);
  140. margin-right: var(--spacing-01);
  141. background: var(--redesign-toolbar-border-divider);
  142. }
  143. .ide-redesign-toolbar-cobranding-link {
  144. display: inline-flex;
  145. flex-direction: column;
  146. justify-content: center;
  147. padding: 0 var(--spacing-02);
  148. }
  149. .ide-redesign-toolbar-cobranding-logo {
  150. max-height: calc($toolbar-height - var(--spacing-04) * 2);
  151. max-width: 150px;
  152. }
  153. }
  154. .ide-redesign-toolbar-menu-bar {
  155. display: flex;
  156. justify-content: flex-start;
  157. height: 100%;
  158. gap: var(--spacing-05);
  159. }
  160. .ide-redesign-toolbar-actions {
  161. display: flex;
  162. gap: var(--spacing-04);
  163. padding-left: var(--spacing-05);
  164. }
  165. .ide-redesign-toolbar-button-container {
  166. display: flex;
  167. flex-direction: column;
  168. justify-content: center;
  169. }
  170. .ide-redesign-online-users {
  171. display: flex;
  172. }
  173. .ide-redesign-toolbar-editable-project-name {
  174. text-align: center;
  175. width: 100%;
  176. max-width: 400px;
  177. margin: var(--spacing-02) 0;
  178. }
  179. .ide-redesign-toolbar-labs-feedback-link {
  180. &,
  181. &:hover,
  182. &:visited {
  183. color: var(--redesign-toolbar-feedback-link-color);
  184. }
  185. }
  186. .ide-redesign-toolbar-project-dropdown {
  187. flex: 0 1 auto;
  188. min-width: 0;
  189. }
  190. .ide-redesign-toolbar-project-dropdown-toggle {
  191. display: flex;
  192. max-width: 100%;
  193. }
  194. .ide-redesign-toolbar-project-name {
  195. overflow: hidden;
  196. text-overflow: ellipsis;
  197. white-space: nowrap;
  198. }
  199. .ide-redesign-beta-button.btn.btn-secondary {
  200. @include editor-switcher-button;
  201. }