You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

header.scss 5.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. /**
  2. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  3. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. @use 'variables';
  7. /* prevent ugly selection effect on accidental selection */
  8. #header,
  9. #expanddiv {
  10. -webkit-user-select: none;
  11. -moz-user-select: none;
  12. -ms-user-select: none;
  13. a:not(.button):focus-visible, button:not(.button-vue):focus-visible, div[role="button"]:focus-visible {
  14. outline: none;
  15. }
  16. a:not(.button):focus-visible::after, .button-vue:focus-visible::after, div[role=button]:focus-visible::after {
  17. content: " ";
  18. position: absolute;
  19. transform: translateX(-50%);
  20. width: 12px;
  21. height: 2px;
  22. border-radius: 3px;
  23. background-color: var(--color-primary-text);
  24. left: 50%;
  25. opacity: 1;
  26. }
  27. a:not(.button):focus-visible::after, .button-vue:focus-visible::after {
  28. bottom: 2px;
  29. }
  30. .header-right {
  31. a:not(.button):focus-visible::after, div[role=button]:focus-visible::after {
  32. bottom: 4px;
  33. }
  34. #expand.menutoggle:focus-visible::after {
  35. left: 40%;
  36. }
  37. }
  38. }
  39. /* HEADERS ------------------------------------------------------------------ */
  40. #body-user #header,
  41. #body-settings #header,
  42. #body-public #header {
  43. display: inline-flex;
  44. position: absolute;
  45. top: 0;
  46. width: 100%;
  47. z-index: 2000;
  48. height: variables.$header-height;
  49. box-sizing: border-box;
  50. justify-content: space-between;
  51. }
  52. /* LOGO and APP NAME -------------------------------------------------------- */
  53. #nextcloud {
  54. padding: 5px 0;
  55. padding-left: 86px; // logo width + 2* pa
  56. position: relative;
  57. height: calc(100% - 4px);
  58. box-sizing: border-box;
  59. opacity: 1;
  60. align-items: center;
  61. display: flex;
  62. flex-wrap: wrap;
  63. overflow: hidden;
  64. margin: 2px;
  65. &:hover, &:active {
  66. opacity: 1;
  67. }
  68. }
  69. @mixin header-menu-height() {
  70. min-height: calc(44px * 1.5); // show at least 1.5 entries
  71. max-height: calc(100vh - #{variables.$header-height} - 8px);
  72. }
  73. #header {
  74. /* Header menu */
  75. $header-menu-entry-height: 44px;
  76. .header-right > div > .menu {
  77. background-color: var(--color-main-background);
  78. filter: drop-shadow(0 1px 5px var(--color-box-shadow));
  79. border-radius: var(--border-radius-large);
  80. box-sizing: border-box;
  81. z-index: 2000;
  82. position: absolute;
  83. max-width: 350px;
  84. @include header-menu-height();
  85. right: 8px; // relative to parent
  86. top: variables.$header-height;
  87. margin: 0;
  88. overflow-y: auto;
  89. &:not(.popovermenu) {
  90. display: none;
  91. }
  92. /* Dropdown arrow */
  93. &:after {
  94. border: 10px solid transparent;
  95. border-bottom-color: var(--color-main-background);
  96. bottom: 100%;
  97. content: ' ';
  98. height: 0;
  99. width: 0;
  100. position: absolute;
  101. pointer-events: none;
  102. right: 10px;
  103. }
  104. & > div,
  105. & > ul {
  106. -webkit-overflow-scrolling: touch;
  107. @include header-menu-height();
  108. }
  109. }
  110. .logo {
  111. display: inline-flex;
  112. background-image: var(--image-logoheader, var(--image-logo, url('../img/logo/logo.svg')));
  113. background-repeat: no-repeat;
  114. background-size: contain;
  115. background-position: center;
  116. width: 62px;
  117. position: absolute;
  118. left: 12px;
  119. top: 1px;
  120. bottom: 1px;
  121. // Invert if not customized and background is bright
  122. filter: var(--image-logoheader-custom, var(--background-image-invert-if-bright));
  123. }
  124. .header-appname-container {
  125. display: none;
  126. padding-right: 10px;
  127. flex-shrink: 0;
  128. }
  129. #header-left, .header-left,
  130. #header-right, .header-right {
  131. display: inline-flex;
  132. align-items: center;
  133. }
  134. #header-left, .header-left {
  135. flex: 1 0;
  136. white-space: nowrap;
  137. min-width: 0;
  138. }
  139. #header-right, .header-right {
  140. justify-content: flex-end;
  141. flex-shrink: 1;
  142. }
  143. /* Right header standard */
  144. .header-right {
  145. > .header-menu:not(.user-menu):not(.unified-search-menu) {
  146. // For general
  147. > .header-menu__trigger {
  148. filter: var(--background-image-invert-if-bright);
  149. }
  150. // For assistant button
  151. > .trigger {
  152. filter: var(--background-image-invert-if-bright);
  153. }
  154. }
  155. > div,
  156. > form {
  157. height: 100%;
  158. position: relative;
  159. > .menutoggle {
  160. display: flex;
  161. justify-content: center;
  162. align-items: center;
  163. width: variables.$header-height;
  164. height: 44px;
  165. cursor: pointer;
  166. opacity: 0.85;
  167. padding: 0;
  168. margin: 2px 0;
  169. &:focus {
  170. opacity: 1;
  171. }
  172. &:focus-visible {
  173. outline: none;
  174. }
  175. }
  176. }
  177. }
  178. }
  179. /* hover effect for app switcher label */
  180. .header-appname-container .header-appname {
  181. opacity: .75;
  182. }
  183. /* TODO: move into minimal css file for public shared template */
  184. /* only used for public share pages now as we have the app icons when logged in */
  185. .header-appname {
  186. color: var(--color-primary-element-text);
  187. font-size: 16px;
  188. font-weight: bold;
  189. margin: 0;
  190. padding: 0;
  191. padding-right: 5px;
  192. overflow: hidden;
  193. text-overflow: ellipsis;
  194. // Take full width to push the header-shared-by bellow (if any)
  195. flex: 1 1 100%;
  196. }
  197. .header-info {
  198. display: flex;
  199. flex-direction: column;
  200. overflow: hidden;
  201. }
  202. .header-title {
  203. overflow: hidden;
  204. text-overflow: ellipsis;
  205. }
  206. .header-shared-by {
  207. color: var(--color-primary-element-text);
  208. position: relative;
  209. font-weight: 300;
  210. font-size: 11px;
  211. line-height: 11px;
  212. overflow: hidden;
  213. text-overflow: ellipsis;
  214. }
  215. /* Skip navigation links – show only on keyboard focus */
  216. #skip-actions {
  217. position: absolute;
  218. overflow: hidden;
  219. z-index: 9999;
  220. top: -999px;
  221. left: 3px;
  222. padding: 11px;
  223. display: flex;
  224. flex-wrap: wrap;
  225. gap: 11px;
  226. &:focus-within {
  227. top: variables.$header-height;
  228. }
  229. }
  230. /* Empty content messages in the header e.g. notifications, contacts menu, … */
  231. header #emptycontent,
  232. header .emptycontent {
  233. h2 {
  234. font-weight: normal;
  235. font-size: 16px;
  236. }
  237. [class^='icon-'],
  238. [class*='icon-'] {
  239. background-size: 48px;
  240. height: 48px;
  241. width: 48px;
  242. }
  243. }