1
0

apps.scss 32 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496
  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. @use 'sass:math';
  8. @use 'functions';
  9. @media screen and (max-width: variables.$breakpoint-mobile) {
  10. // Make the body full width on mobile
  11. :root {
  12. --body-container-margin: 0px !important;
  13. --body-container-radius: 0px !important;
  14. }
  15. }
  16. html {
  17. width: 100%;
  18. height: 100%;
  19. position: absolute;
  20. // color-background-plain should always be defined.
  21. background-color: var(--color-background-plain, var(--color-main-background));
  22. }
  23. body {
  24. // color-background-plain should always be defined.
  25. background-color: var(--color-background-plain, var(--color-main-background));
  26. // user background, or plain color
  27. background-image: var(--image-background);
  28. background-size: cover;
  29. background-position: center;
  30. position: fixed;
  31. width: 100%;
  32. height: calc(100vh - env(safe-area-inset-bottom));
  33. }
  34. /* BASE STYLING ------------------------------------------------------------ */
  35. // no h1 allowed since h1 = logo
  36. h2,
  37. h3,
  38. h4,
  39. h5,
  40. h6 {
  41. font-weight: 600;
  42. line-height: 1.5;
  43. margin-top: 24px;
  44. margin-bottom: 12px;
  45. color: var(--color-main-text);
  46. }
  47. h2 {
  48. font-size: 1.8em;
  49. }
  50. h3 {
  51. font-size: 1.6em;
  52. }
  53. h4 {
  54. font-size: 1.4em;
  55. }
  56. h5 {
  57. font-size: 1.25em;
  58. }
  59. h6 {
  60. font-size: 1.1em;
  61. }
  62. /* do not use italic typeface style, instead lighter color */
  63. em {
  64. font-style: normal;
  65. color: var(--color-text-maxcontrast);
  66. }
  67. dl {
  68. padding: 12px 0;
  69. }
  70. dt,
  71. dd {
  72. display: inline-block;
  73. padding: 12px;
  74. padding-inline-start: 0;
  75. }
  76. dt {
  77. width: 130px;
  78. white-space: nowrap;
  79. text-align: end;
  80. }
  81. kbd {
  82. padding: 4px 10px;
  83. border: 1px solid #ccc;
  84. box-shadow: 0 1px 0 rgba(0, 0, 0, .2);
  85. border-radius: var(--border-radius);
  86. display: inline-block;
  87. white-space: nowrap;
  88. }
  89. /* APP STYLING ------------------------------------------------------------ */
  90. #content[class*='app-'] * {
  91. box-sizing: border-box;
  92. }
  93. /* APP-NAVIGATION ------------------------------------------------------------ */
  94. /* Navigation: folder like structure */
  95. #app-navigation:not(.vue) {
  96. // Ensure the maxcontrast color is set for the background
  97. --color-text-maxcontrast: var(--color-text-maxcontrast-background-blur, var(--color-main-text));
  98. width: variables.$navigation-width;
  99. z-index: 500;
  100. overflow-y: auto;
  101. overflow-x: hidden;
  102. background-color: var(--color-main-background-blur);
  103. backdrop-filter: var(--filter-background-blur);
  104. -webkit-backdrop-filter: var(--filter-background-blur); -webkit-user-select: none;
  105. position: sticky;
  106. height: 100%;
  107. -moz-user-select: none;
  108. -ms-user-select: none;
  109. user-select: none;
  110. display: flex;
  111. flex-direction: column;
  112. flex-grow: 0;
  113. flex-shrink: 0;
  114. .app-navigation-caption {
  115. font-weight: bold;
  116. line-height: var(--default-clickable-area);
  117. padding: 10px var(--default-clickable-area) 0 var(--default-clickable-area);
  118. white-space: nowrap;
  119. text-overflow: ellipsis;
  120. box-shadow: none !important;
  121. user-select: none;
  122. pointer-events:none;
  123. margin-inline-start: 10px;
  124. }
  125. }
  126. .app-navigation-personal,
  127. .app-navigation-administration {
  128. /* 'New' button */
  129. .app-navigation-new {
  130. display: block;
  131. padding: calc(var(--default-grid-baseline) * 2);
  132. button {
  133. display: inline-block;
  134. width: 100%;
  135. padding: 10px;
  136. padding-inline-start: 34px;
  137. text-align: start;
  138. margin: 0;
  139. }
  140. }
  141. li {
  142. position: relative;
  143. }
  144. > ul {
  145. position: relative;
  146. height: 100%;
  147. width: 100%;
  148. overflow-x: hidden;
  149. overflow-y: auto;
  150. box-sizing: border-box;
  151. display: flex;
  152. flex-direction: column;
  153. padding: calc(var(--default-grid-baseline) * 2);
  154. padding-bottom: 0;
  155. &:last-child {
  156. padding-bottom: calc(var(--default-grid-baseline) * 2);
  157. }
  158. > li {
  159. display: inline-flex;
  160. flex-wrap: wrap;
  161. order: 1;
  162. flex-shrink: 0;
  163. margin: 0;
  164. margin-bottom: 3px;
  165. width: 100%;
  166. border-radius: var(--border-radius-element);
  167. /* Pinned-to-bottom entries */
  168. &.pinned {
  169. order: 2;
  170. &.first-pinned {
  171. margin-top: auto !important;
  172. }
  173. }
  174. > .app-navigation-entry-deleted {
  175. /* Ugly hack for overriding the main entry link */
  176. padding-inline-start: var(--default-clickable-area) !important;
  177. }
  178. > .app-navigation-entry-edit {
  179. /* Ugly hack for overriding the main entry link */
  180. /* align the input correctly with the link text
  181. 44px-6px padding for the input */
  182. padding-inline-start: calc(var(--default-clickable-area) - 6px) !important;
  183. }
  184. a:hover,
  185. a:focus {
  186. &,
  187. > a {
  188. background-color: var(--color-background-hover);
  189. }
  190. }
  191. a:focus-visible {
  192. box-shadow: 0 0 0 4px var(--color-main-background);
  193. outline: 2px solid var(--color-main-text);
  194. }
  195. &.active,
  196. a:active,
  197. a.selected ,
  198. a.active {
  199. &,
  200. > a {
  201. background-color: var(--color-primary-element);
  202. color: var(--color-primary-element-text);
  203. &:first-child > img {
  204. filter: var(--primary-invert-if-dark);
  205. }
  206. }
  207. }
  208. /* align loader */
  209. &.icon-loading-small:after {
  210. inset-inline-start: 22px;
  211. top: 22px;
  212. }
  213. /* hide deletion/collapse of subitems */
  214. &.deleted,
  215. &.collapsible:not(.open) {
  216. > ul {
  217. // NO ANIMATE because if not really hidden, we can still tab through it
  218. display: none;
  219. }
  220. }
  221. /* Second level nesting for lists */
  222. > ul {
  223. flex: 0 1 auto;
  224. width: 100%;
  225. position: relative;
  226. > li {
  227. display: inline-flex;
  228. flex-wrap: wrap;
  229. padding-inline-start: var(--default-clickable-area);
  230. width: 100%;
  231. margin-bottom: 3px;
  232. &:hover,
  233. &:focus {
  234. &,
  235. > a {
  236. border-radius: var(--border-radius-element);
  237. background-color: var(--color-background-hover);
  238. }
  239. }
  240. &.active,
  241. a.selected {
  242. &,
  243. > a {
  244. border-radius: var(--border-radius-element);
  245. background-color: var(--color-primary-element-light);
  246. &:first-child > img {
  247. filter: var(--primary-invert-if-dark);
  248. }
  249. }
  250. }
  251. /* align loader */
  252. &.icon-loading-small:after {
  253. inset-inline-start: calc(var(--default-clickable-area) / 2);
  254. }
  255. > .app-navigation-entry-deleted {
  256. /* margin to keep active indicator visible */
  257. margin-inline-start: 4px;
  258. padding-inline-start: 84px;
  259. }
  260. > .app-navigation-entry-edit {
  261. /* margin to keep active indicator visible */
  262. margin-inline-start: 4px;
  263. /* align the input correctly with the link text
  264. 44px+44px-4px-6px padding for the input */
  265. padding-inline-start: calc(2 * var(--default-clickable-area) - 10px) !important;
  266. }
  267. }
  268. }
  269. }
  270. /* Menu and submenu */
  271. > li,
  272. > li > ul > li {
  273. position: relative;
  274. box-sizing: border-box;
  275. /* hide icons if loading */
  276. &.icon-loading-small {
  277. > a,
  278. > .app-navigation-entry-bullet {
  279. /* hide icon or bullet if loading state*/
  280. background: transparent !important;
  281. }
  282. }
  283. /* Main entry link */
  284. > a {
  285. background-size: 16px 16px;
  286. background-repeat: no-repeat;
  287. display: block;
  288. justify-content: space-between;
  289. line-height: var(--default-clickable-area);
  290. min-height: var(--default-clickable-area);
  291. padding-block: 0;
  292. padding-inline: calc(2 * var(--default-grid-baseline));
  293. overflow: hidden;
  294. box-sizing: border-box;
  295. white-space: nowrap;
  296. text-overflow: ellipsis;
  297. border-radius: var(--border-radius-element);
  298. color: var(--color-main-text);
  299. flex: 1 1 0px;
  300. z-index: 100; /* above the bullet to allow click*/
  301. /* TODO: forbid using img as icon in menu? */
  302. &.svg {
  303. padding-block: 0;
  304. padding-inline: var(--default-clickable-area) 12px;
  305. :focus-visible {
  306. padding-block: 0;
  307. padding-inline: calc(var(--default-clickable-area) - 2px) 8px;
  308. }
  309. }
  310. &:first-child img {
  311. margin-inline-end: calc(2 * var(--default-grid-baseline)) !important;
  312. width: 16px;
  313. height: 16px;
  314. // Legacy invert if bright background
  315. filter: var(--background-invert-if-dark);
  316. }
  317. /* counter can also be inside the link */
  318. > .app-navigation-entry-utils {
  319. display: inline-block;
  320. /* Check Floating fix below */
  321. .app-navigation-entry-utils-counter {
  322. padding-inline-end: 0 !important;
  323. }
  324. }
  325. }
  326. /* Bullet icon */
  327. > .app-navigation-entry-bullet {
  328. position: absolute;
  329. display: block;
  330. margin: 16px;
  331. width: 12px;
  332. height: 12px;
  333. border: none;
  334. border-radius: 50%;
  335. cursor: pointer;
  336. transition: background 100ms ease-in-out;
  337. + a {
  338. /* hide icon if bullet, can't have both */
  339. background: transparent !important;
  340. }
  341. }
  342. /* popover fix the flex positionning of the li parent */
  343. > .app-navigation-entry-menu {
  344. top: var(--default-clickable-area);
  345. }
  346. /* show edit/undo field if editing/deleted */
  347. &.editing .app-navigation-entry-edit {
  348. opacity: 1;
  349. z-index: 250;
  350. }
  351. &.deleted .app-navigation-entry-deleted {
  352. transform: translateX(0);
  353. z-index: 250;
  354. }
  355. }
  356. }
  357. &.hidden {
  358. display: none;
  359. }
  360. /**
  361. * Button styling for menu, edit and undo
  362. */
  363. .app-navigation-entry-utils .app-navigation-entry-utils-menu-button > button,
  364. .app-navigation-entry-deleted .app-navigation-entry-deleted-button {
  365. border: 0;
  366. opacity: 0.5;
  367. background-color: transparent;
  368. background-repeat: no-repeat;
  369. background-position: center;
  370. &:hover,
  371. &:focus {
  372. background-color: transparent;
  373. opacity: 1;
  374. }
  375. }
  376. /**
  377. * Collapsible menus
  378. */
  379. .collapsible {
  380. /* Fallback for old collapse button.
  381. TODO: to be removed. Leaved here for retro compatibility */
  382. .collapse {
  383. opacity: 0;
  384. position: absolute;
  385. width: var(--default-clickable-area);
  386. height: var(--default-clickable-area);
  387. margin: 0;
  388. z-index: 110;
  389. /* Needed for IE11; otherwise the button appears to the right of the
  390. * link. */
  391. inset-inline-start: 0;
  392. &:focus-visible {
  393. opacity: 1;
  394. border-width: 0;
  395. box-shadow: inset 0 0 0 2px var(--color-primary-element);
  396. background: none;
  397. }
  398. }
  399. &:before {
  400. position: absolute;
  401. height: var(--default-clickable-area);
  402. width: var(--default-clickable-area);
  403. margin: 0;
  404. padding: 0;
  405. background: none;
  406. @include functions.icon-color('triangle-s', 'actions', variables.$color-black, 1, true);
  407. background-size: 16px;
  408. background-repeat: no-repeat;
  409. background-position: center;
  410. border: none;
  411. outline: none !important;
  412. box-shadow: none;
  413. content: ' ';
  414. opacity: 0;
  415. -webkit-transform: rotate(-90deg);
  416. -ms-transform: rotate(-90deg);
  417. transform: rotate(-90deg);
  418. z-index: 105; // above a, under button
  419. border-radius: 50%;
  420. transition: opacity variables.$animation-quick ease-in-out;
  421. }
  422. /* force padding on link no matter if 'a' has an icon class */
  423. > a:first-child {
  424. padding-inline-start: var(--default-clickable-area);
  425. }
  426. &:hover,
  427. &:focus {
  428. &:before {
  429. opacity: 1;
  430. }
  431. > a {
  432. background-image: none;
  433. }
  434. > .app-navigation-entry-bullet {
  435. background: transparent !important;
  436. }
  437. }
  438. &.open {
  439. &:before {
  440. -webkit-transform: rotate(0);
  441. -ms-transform: rotate(0);
  442. transform: rotate(0);
  443. }
  444. }
  445. }
  446. /**
  447. * App navigation utils, buttons and counters for drop down menu
  448. */
  449. .app-navigation-entry-utils {
  450. flex: 0 1 auto;
  451. ul {
  452. display: flex !important;
  453. align-items: center;
  454. justify-content: flex-end;
  455. }
  456. li {
  457. width: var(--default-clickable-area) !important;
  458. height: var(--default-clickable-area);
  459. }
  460. button {
  461. height: 100%;
  462. width: 100%;
  463. margin: 0;
  464. box-shadow: none;
  465. }
  466. .app-navigation-entry-utils-menu-button {
  467. /* Prevent bg img override if an icon class is set */
  468. button:not([class^='icon-']):not([class*=' icon-']) {
  469. @include functions.icon-color('more', 'actions', variables.$color-black, 1, true);
  470. }
  471. &:hover button,
  472. &:focus button {
  473. background-color: transparent;
  474. opacity: 1;
  475. }
  476. }
  477. .app-navigation-entry-utils-counter {
  478. overflow: hidden;
  479. text-align: end;
  480. font-size: 9pt;
  481. line-height: var(--default-clickable-area);
  482. padding: 0 12px; /* Same padding as all li > a in the app-navigation */
  483. &.highlighted {
  484. padding: 0;
  485. text-align: center;
  486. span {
  487. padding: 2px 5px;
  488. border-radius: 10px;
  489. background-color: var(--color-primary-element);
  490. color: var(--color-primary-element-text);
  491. }
  492. }
  493. }
  494. }
  495. /**
  496. * Editable entries
  497. */
  498. .app-navigation-entry-edit {
  499. padding-inline: 5px;
  500. display: block;
  501. width: calc(100% - 1px); /* Avoid border overlapping */
  502. transition: opacity 250ms ease-in-out;
  503. opacity: 0;
  504. position: absolute;
  505. background-color: var(--color-main-background);
  506. z-index: -1;
  507. form,
  508. div {
  509. display: inline-flex;
  510. width: 100%;
  511. }
  512. input {
  513. padding: 5px;
  514. margin-inline-end: 0;
  515. height: 38px;
  516. &:hover,
  517. &:focus {
  518. /* overlapp borders */
  519. z-index: 1;
  520. }
  521. }
  522. input[type='text'] {
  523. width: 100%;
  524. min-width: 0; /* firefox hack: override auto */
  525. border-end-end-radius: 0;
  526. border-start-end-radius: 0;
  527. }
  528. button,
  529. input:not([type='text']) {
  530. width: 36px;
  531. height: 38px;
  532. flex: 0 0 36px;
  533. &:not(:last-child) {
  534. border-radius: 0 !important;
  535. }
  536. &:not(:first-child) {
  537. margin-inline-start: -1px;
  538. }
  539. &:last-child {
  540. border-end-end-radius: var(--border-radius);
  541. border-start-end-radius: var(--border-radius);
  542. border-end-start-radius: 0;
  543. border-start-start-radius: 0;
  544. }
  545. }
  546. }
  547. /**
  548. * Deleted entries with undo button
  549. */
  550. .app-navigation-entry-deleted {
  551. display: inline-flex;
  552. padding-inline-start: var(--default-clickable-area);
  553. transform: translateX(#{variables.$navigation-width});
  554. .app-navigation-entry-deleted-description {
  555. position: relative;
  556. white-space: nowrap;
  557. text-overflow: ellipsis;
  558. overflow: hidden;
  559. flex: 1 1 0px;
  560. line-height: var(--default-clickable-area);
  561. }
  562. .app-navigation-entry-deleted-button {
  563. margin: 0;
  564. height: var(--default-clickable-area);
  565. width: var(--default-clickable-area);
  566. line-height: var(--default-clickable-area);
  567. &:hover,
  568. &:focus {
  569. opacity: 1;
  570. }
  571. }
  572. }
  573. /**
  574. * Common rules for animation of undo and edit entries
  575. */
  576. .app-navigation-entry-edit,
  577. .app-navigation-entry-deleted {
  578. width: calc(100% - 1px); /* Avoid border overlapping */
  579. transition: transform 250ms ease-in-out,
  580. opacity 250ms ease-in-out,
  581. z-index 250ms ease-in-out;
  582. position: absolute;
  583. inset-inline-start: 0;
  584. background-color: var(--color-main-background);
  585. box-sizing: border-box;
  586. }
  587. /**
  588. * drag and drop
  589. */
  590. .drag-and-drop {
  591. -webkit-transition: padding-bottom 500ms ease 0s;
  592. transition: padding-bottom 500ms ease 0s;
  593. padding-bottom: 40px;
  594. }
  595. .error {
  596. color: var(--color-error);
  597. }
  598. .app-navigation-entry-utils ul,
  599. .app-navigation-entry-menu ul {
  600. list-style-type: none;
  601. }
  602. }
  603. /* Floating and background-position fix */
  604. /* Cannot use inline-start and :dir to support Samsung Internet */
  605. body[dir='ltr'] {
  606. .app-navigation-personal,
  607. .app-navigation-administration {
  608. .app-navigation-new button {
  609. background-position: left 10px center;
  610. }
  611. > ul > li > ul > li > a {
  612. background-position: left 14px center;
  613. > .app-navigation-entry-utils {
  614. float: right;
  615. }
  616. }
  617. }
  618. }
  619. body[dir='rtl'] {
  620. .app-navigation-personal,
  621. .app-navigation-administration {
  622. .app-navigation-new button {
  623. background-position: right 10px center;
  624. }
  625. > ul > li > ul > li > a {
  626. background-position: right 14px center;
  627. > .app-navigation-entry-utils {
  628. float: left;
  629. }
  630. }
  631. }
  632. }
  633. /* CONTENT --------------------------------------------------------- */
  634. #content {
  635. box-sizing: border-box;
  636. position: static;
  637. margin: var(--body-container-margin);
  638. margin-top: 50px;
  639. padding: 0;
  640. display: flex;
  641. width: calc(100% - var(--body-container-margin) * 2);
  642. height: var(--body-height);
  643. border-radius: var(--body-container-radius);
  644. overflow: clip;
  645. &:not(.with-sidebar--full) {
  646. position: fixed;
  647. }
  648. }
  649. @media only screen and (max-width: variables.$breakpoint-mobile) {
  650. #content {
  651. border-start-start-radius: var(--border-radius-large);
  652. border-start-end-radius: var(--border-radius-large);
  653. }
  654. #app-navigation {
  655. border-start-start-radius: var(--border-radius-large);
  656. }
  657. #app-sidebar {
  658. border-start-end-radius: var(--border-radius-large);
  659. }
  660. }
  661. /* APP-CONTENT AND WRAPPER ------------------------------------------ */
  662. /* Part where the content will be loaded into */
  663. /**
  664. * !Important. We are defining the minimum requirement we want for flex
  665. * Just before the mobile breakpoint we have variables.$breakpoint-mobile (1024px) - variables.$navigation-width
  666. * -> 468px. In that case we want 200px for the list and 268px for the content
  667. */
  668. $min-content-width: variables.$breakpoint-mobile - variables.$navigation-width - variables.$list-min-width;
  669. #app-content {
  670. z-index: 1000;
  671. background-color: var(--color-main-background);
  672. flex-basis: 100vw;
  673. overflow: auto;
  674. position: initial;
  675. height: 100%;
  676. /* margin if navigation element is here */
  677. /* no top border for first settings item */
  678. > .section:first-child {
  679. border-top: none;
  680. }
  681. /* if app-content-list is present */
  682. #app-content-wrapper {
  683. display: flex;
  684. position: relative;
  685. align-items: stretch;
  686. /* make sure we have at least full height for loaders or such
  687. no need for list/details since we have a flex stretch */
  688. min-height: 100%;
  689. /* CONTENT DETAILS AFTER LIST*/
  690. .app-content-details {
  691. /* grow full width */
  692. flex: 1 1 $min-content-width;
  693. #app-navigation-toggle-back {
  694. display: none;
  695. }
  696. }
  697. }
  698. &::-webkit-scrollbar-button {
  699. height: var(--body-container-radius);
  700. }
  701. }
  702. /* APP-SIDEBAR ------------------------------------------------------------ */
  703. /*
  704. Sidebar: a sidebar to be used within #content
  705. #app-content will be shrinked properly
  706. */
  707. #app-sidebar {
  708. width: 27vw;
  709. min-width: variables.$sidebar-min-width;
  710. max-width: variables.$sidebar-max-width;
  711. display: block;
  712. position: -webkit-sticky;
  713. position: sticky;
  714. top: variables.$header-height;
  715. inset-inline-end:0;
  716. overflow-y: auto;
  717. overflow-x: hidden;
  718. z-index: 1500;
  719. opacity: 0.7px;
  720. height: calc(100vh - #{variables.$header-height});
  721. background: var(--color-main-background);
  722. border-inline-start: 1px solid var(--color-border);
  723. flex-shrink: 0;
  724. // no animations possible, use OC.Apps.showAppSidebar
  725. &.disappear {
  726. display: none;
  727. }
  728. }
  729. /* APP-SETTINGS ------------------------------------------------------------ */
  730. /* settings area */
  731. #app-settings {
  732. // To the bottom w/ flex
  733. margin-top: auto;
  734. &.open,
  735. &.opened {
  736. #app-settings-content {
  737. display: block;
  738. }
  739. }
  740. }
  741. #app-settings-content {
  742. display: none;
  743. padding: calc(var(--default-grid-baseline) * 2);
  744. padding-top: 0;
  745. padding-inline-start: calc(var(--default-grid-baseline) * 4);
  746. /* restrict height of settings and make scrollable */
  747. max-height: 300px;
  748. overflow-y: auto;
  749. box-sizing: border-box;
  750. /* display input fields at full width */
  751. input[type='text'] {
  752. width: 93%;
  753. }
  754. .info-text {
  755. padding-block: 5px 7px;
  756. padding-inline: 22px 0;
  757. color: var(--color-text-lighter);
  758. }
  759. input {
  760. &[type='checkbox'],
  761. &[type='radio'] {
  762. &.radio,
  763. &.checkbox {
  764. + label {
  765. display: inline-block;
  766. width: 100%;
  767. padding: 5px 0;
  768. }
  769. }
  770. }
  771. }
  772. }
  773. #app-settings-header {
  774. box-sizing: border-box;
  775. background-color: transparent;
  776. overflow: hidden;
  777. border-radius: calc(var(--default-clickable-area) / 2);
  778. padding: calc(var(--default-grid-baseline) * 2);
  779. padding-top: 0;
  780. .settings-button {
  781. display: flex;
  782. align-items: center;
  783. height: var(--default-clickable-area);
  784. width: 100%;
  785. padding: 0;
  786. margin: 0;
  787. background-color: transparent;
  788. box-shadow: none;
  789. border: 0;
  790. border-radius: calc(var(--default-clickable-area) / 2);
  791. text-align: start;
  792. font-weight: normal;
  793. font-size: 100%;
  794. opacity: 0.8;
  795. /* like app-navigation a */
  796. color: var(--color-main-text);
  797. &.opened {
  798. border-top: solid 1px var(--color-border);
  799. background-color: var(--color-main-background);
  800. margin-top: 8px;
  801. }
  802. &:hover,
  803. &:focus {
  804. background-color: var(--color-background-hover);
  805. }
  806. &::before {
  807. background-image: var(--icon-settings-dark);
  808. background-repeat: no-repeat;
  809. content: '';
  810. width: var(--default-clickable-area);
  811. height: var(--default-clickable-area);
  812. top: 0;
  813. inset-inline-start: 0;
  814. display: block;
  815. }
  816. &:focus-visible {
  817. box-shadow: 0 0 0 2px inset var(--color-primary-element) !important;
  818. }
  819. }
  820. }
  821. /* Background-position fix */
  822. body[dir='ltr'] #app-settings-header .settings-button {
  823. &::before {
  824. background-position: left 14px center;
  825. }
  826. &:focus-visible {
  827. background-position: left 12px center;
  828. }
  829. }
  830. body[dir='rtl'] #app-settings-header .settings-button {
  831. &::before {
  832. background-position: right 14px center;
  833. }
  834. &:focus-visible {
  835. background-position: right 12px center;
  836. }
  837. }
  838. /* GENERAL SECTION ------------------------------------------------------------ */
  839. .section {
  840. display: block;
  841. padding: 30px;
  842. margin-bottom: 24px;
  843. &.hidden {
  844. display: none !important;
  845. }
  846. /* slight position correction of checkboxes and radio buttons */
  847. input {
  848. &[type='checkbox'],
  849. &[type='radio'] {
  850. vertical-align: -2px;
  851. margin-inline-end: 4px;
  852. }
  853. }
  854. }
  855. .sub-section {
  856. position: relative;
  857. margin-top: 10px;
  858. margin-inline-start: 27px;
  859. margin-bottom: 10px;
  860. }
  861. .appear {
  862. opacity: 1;
  863. -webkit-transition: opacity 500ms ease 0s;
  864. -moz-transition: opacity 500ms ease 0s;
  865. -ms-transition: opacity 500ms ease 0s;
  866. -o-transition: opacity 500ms ease 0s;
  867. transition: opacity 500ms ease 0s;
  868. &.transparent {
  869. opacity: 0;
  870. }
  871. }
  872. /* TABS ------------------------------------------------------------ */
  873. .tabHeaders {
  874. display: flex;
  875. margin-bottom: 16px;
  876. .tabHeader {
  877. display: flex;
  878. flex-direction: column;
  879. flex-grow: 1;
  880. text-align: center;
  881. white-space: nowrap;
  882. overflow: hidden;
  883. text-overflow: ellipsis;
  884. cursor: pointer;
  885. color: var(--color-text-lighter);
  886. margin-bottom: 1px;
  887. padding: 5px;
  888. &.hidden {
  889. display: none;
  890. }
  891. /* Use same amount as sidebar padding */
  892. &:first-child {
  893. padding-inline-start: 15px;
  894. }
  895. &:last-child {
  896. padding-inline-end: 15px;
  897. }
  898. .icon {
  899. display: inline-block;
  900. width: 100%;
  901. height: 16px;
  902. background-size: 16px;
  903. vertical-align: middle;
  904. margin-top: -2px;
  905. margin-inline-end: 3px;
  906. opacity: .7;
  907. cursor: pointer;
  908. }
  909. a {
  910. color: var(--color-text-lighter);
  911. margin-bottom: 1px;
  912. overflow: hidden;
  913. text-overflow: ellipsis;
  914. }
  915. &.selected {
  916. font-weight: bold;
  917. }
  918. &.selected,
  919. &:hover,
  920. &:focus {
  921. margin-bottom: 0px;
  922. color: var(--color-main-text);
  923. border-bottom: 1px solid var(--color-text-lighter);
  924. }
  925. }
  926. }
  927. .tabsContainer {
  928. .tab {
  929. padding: 0 15px 15px;
  930. }
  931. }
  932. /* Cannot use inline-start to support Samsung Internet*/
  933. body[dir='ltr'] .tabsContainer {
  934. clear: left;
  935. }
  936. body[dir='rtl'] .tabsContainer {
  937. clear: right;
  938. }
  939. /* POPOVER MENU ------------------------------------------------------------ */
  940. $popoveritem-height: 34px;
  941. $popovericon-size: 16px;
  942. $outter-margin: math.div($popoveritem-height - $popovericon-size, 2);
  943. .v-popper__inner div.open > ul {
  944. > li > a > span.action-link__icon,
  945. > li > a > span.action-router__icon,
  946. > li > a > img {
  947. filter: var(--background-invert-if-dark);
  948. // We do not want to invert the color of the user_status emoji:
  949. // https://github.com/nextcloud/nextcloud-vue/blob/8899087f8f8d45e0ed744bde9faa00b625a21905/src/components/NcAvatar/NcAvatar.vue#L495
  950. &[src^="data"] {
  951. filter: none;
  952. }
  953. }
  954. }
  955. .bubble,
  956. .app-navigation-entry-menu,
  957. .popovermenu {
  958. position: absolute;
  959. background-color: var(--color-main-background);
  960. color: var(--color-main-text);
  961. border-radius: var(--border-radius-large);
  962. padding: 3px;
  963. z-index: 110;
  964. margin: 5px;
  965. margin-top: -5px;
  966. inset-inline-end: 0;
  967. filter: drop-shadow(0 1px 3px var(--color-box-shadow));
  968. display: none;
  969. will-change: filter;
  970. &:after {
  971. bottom: 100%;
  972. // Required right-distance is half menu icon size + right padding
  973. // = 16px/2 + 14px = 22px
  974. // popover right margin is 5px, arrow width is 9px to center and border is 1px
  975. // 22px - 9px - 5px - 1px = 7px
  976. inset-inline-end: 7px;
  977. /* change this to adjust the arrow position */
  978. border: solid transparent;
  979. content: ' ';
  980. height: 0;
  981. width: 0;
  982. position: absolute;
  983. pointer-events: none;
  984. border-bottom-color: var(--color-main-background);
  985. border-width: 9px;
  986. }
  987. /* Center the popover */
  988. &.menu-center {
  989. transform: translateX(50%);
  990. inset-inline-end: 50%;
  991. margin-inline-end: 0;
  992. &:after {
  993. inset-inline-end: 50%;
  994. transform: translateX(50%);
  995. }
  996. }
  997. /* Align the popover to the left */
  998. &.menu-left {
  999. inset-inline: 0 auto;
  1000. margin-inline-end: 0;
  1001. &:after {
  1002. inset-inline: 6px auto;
  1003. }
  1004. }
  1005. &.open {
  1006. display: block;
  1007. }
  1008. &.contactsmenu-popover {
  1009. margin: 0;
  1010. }
  1011. ul {
  1012. /* Overwrite #app-navigation > ul ul */
  1013. display: flex !important;
  1014. flex-direction: column;
  1015. }
  1016. li {
  1017. display: flex;
  1018. flex: 0 0 auto;
  1019. &.hidden {
  1020. display: none;
  1021. }
  1022. > button,
  1023. > a,
  1024. > .menuitem {
  1025. cursor: pointer;
  1026. line-height: $popoveritem-height;
  1027. border: 0;
  1028. border-radius: var(--border-radius-large);
  1029. background-color: transparent;
  1030. display: flex;
  1031. align-items: flex-start;
  1032. height: auto;
  1033. margin: 0;
  1034. font-weight: normal;
  1035. box-shadow: none;
  1036. width: 100%;
  1037. color: var(--color-main-text);
  1038. white-space: nowrap;
  1039. span[class^='icon-'],
  1040. span[class*=' icon-'],
  1041. &[class^='icon-'],
  1042. &[class*=' icon-'] {
  1043. min-width: 0; /* Overwrite icons*/
  1044. min-height: 0;
  1045. background-position: #{math.div($popoveritem-height - $popovericon-size, 2)} center;
  1046. background-size: $popovericon-size;
  1047. }
  1048. span[class^='icon-'],
  1049. span[class*=' icon-'] {
  1050. /* Keep padding to define the width to
  1051. assure correct position of a possible text */
  1052. padding: #{math.div($popoveritem-height, 2)} 0 #{math.div($popoveritem-height, 2)} $popoveritem-height;
  1053. }
  1054. // If no icons set, force left margin to align
  1055. &:not([class^='icon-']):not([class*='icon-']) {
  1056. > span,
  1057. > input,
  1058. > form {
  1059. &:not([class^='icon-']):not([class*='icon-']):first-child {
  1060. margin-inline-start: $popoveritem-height;
  1061. }
  1062. }
  1063. }
  1064. &[class^='icon-'],
  1065. &[class*=' icon-'] {
  1066. padding: 0 #{math.div($popoveritem-height - $popovericon-size, 2)} 0 $popoveritem-height !important;
  1067. }
  1068. &:hover,
  1069. &:focus {
  1070. background-color: var(--color-background-hover);
  1071. }
  1072. &:focus,
  1073. &:focus-visible {
  1074. box-shadow: 0 0 0 2px var(--color-primary-element);
  1075. }
  1076. &.active {
  1077. border-radius: var(--border-radius-element);
  1078. background-color: var(--color-primary-element-light);
  1079. }
  1080. /* prevent .action class to break the design */
  1081. &.action {
  1082. padding: inherit !important;
  1083. }
  1084. > span {
  1085. cursor: pointer;
  1086. white-space: nowrap;
  1087. }
  1088. > p {
  1089. width: 150px;
  1090. line-height: 1.6em;
  1091. padding: 8px 0;
  1092. white-space: normal;
  1093. }
  1094. > select {
  1095. margin: 0;
  1096. margin-inline-start: 6px;
  1097. }
  1098. /* Add padding if contains icon+text */
  1099. &:not(:empty) {
  1100. padding-inline-end: $outter-margin !important;
  1101. }
  1102. /* DEPRECATED! old img in popover fallback
  1103. * TODO: to remove */
  1104. > img {
  1105. width: $popovericon-size;
  1106. padding: #{math.div($popoveritem-height - $popovericon-size, 2)};
  1107. }
  1108. /* checkbox/radio fixes */
  1109. > input.radio + label,
  1110. > input.checkbox + label {
  1111. padding: 0 !important;
  1112. width: 100%;
  1113. }
  1114. > input.checkbox + label::before {
  1115. margin: -2px 13px 0;
  1116. }
  1117. > input.radio + label::before {
  1118. margin: -2px 12px 0;
  1119. }
  1120. > input:not([type=radio]):not([type=checkbox]):not([type=image]) {
  1121. width: 150px;
  1122. }
  1123. form {
  1124. display: flex;
  1125. flex: 1 1 auto;
  1126. /* put a small space between text and form
  1127. if there is an element before */
  1128. align-items: center;
  1129. &:not(:first-child) {
  1130. margin-inline-start: 5px;
  1131. }
  1132. }
  1133. /* no margin if hidden span before */
  1134. > span.hidden + form,
  1135. > span[style*='display:none'] + form {
  1136. margin-inline-start: 0;
  1137. }
  1138. /* Inputs inside popover supports text, submit & reset */
  1139. input {
  1140. min-width: $popoveritem-height;
  1141. max-height: #{$popoveritem-height - 4px}; /* twice the element margin-y */
  1142. margin: 2px 0;
  1143. flex: 1 1 auto;
  1144. // space between inline inputs
  1145. &:not(:first-child) {
  1146. margin-inline-start: 5px;
  1147. }
  1148. }
  1149. }
  1150. /* css hack, only first not hidden */
  1151. &:not(.hidden):not([style*='display:none']) {
  1152. &:first-of-type {
  1153. > button, > a, > .menuitem {
  1154. > form, > input {
  1155. margin-top: $outter-margin - 2px; // minus the input margin
  1156. }
  1157. }
  1158. }
  1159. &:last-of-type {
  1160. > button, > a, > .menuitem {
  1161. > form, > input {
  1162. margin-bottom: 0px;
  1163. }
  1164. }
  1165. }
  1166. }
  1167. > button {
  1168. padding: 0;
  1169. span {
  1170. opacity: 1;
  1171. }
  1172. }
  1173. }
  1174. }
  1175. .popovermenu {
  1176. li {
  1177. > button,
  1178. > a,
  1179. > .menuitem {
  1180. /* DEPRECATED! old img in popover fallback
  1181. * TODO: to remove */
  1182. > img {
  1183. width: $popoveritem-height;
  1184. height: $popoveritem-height;
  1185. }
  1186. }
  1187. }
  1188. }
  1189. #contactsmenu .contact .popovermenu {
  1190. li {
  1191. > a {
  1192. > img {
  1193. width: 16px;
  1194. height: 16px;
  1195. }
  1196. }
  1197. }
  1198. }
  1199. /* CONTENT LIST ------------------------------------------------------------ */
  1200. .app-content-list {
  1201. position: -webkit-sticky;
  1202. position: relative;
  1203. top: 0;
  1204. border-inline-end: 1px solid var(--color-border);
  1205. display: flex;
  1206. flex-direction: column;
  1207. transition: transform 250ms ease-in-out;
  1208. min-height: 100%;
  1209. max-height: 100%;
  1210. overflow-y: auto;
  1211. overflow-x: hidden;
  1212. flex: 1 1 variables.$list-min-width;
  1213. min-width: variables.$list-min-width;
  1214. max-width: variables.$list-max-width;
  1215. /* Default item */
  1216. .app-content-list-item {
  1217. position: relative;
  1218. height: 68px;
  1219. cursor: pointer;
  1220. padding: 10px 7px;
  1221. display: flex;
  1222. flex-wrap: wrap;
  1223. align-items: center;
  1224. flex: 0 0 auto;
  1225. /* Icon fixes */
  1226. &,
  1227. > .app-content-list-item-menu {
  1228. > [class^='icon-'],
  1229. > [class*=' icon-'] {
  1230. order: 4;
  1231. width: 24px;
  1232. height: 24px;
  1233. margin: -7px; // right padding of item
  1234. padding: 22px;
  1235. opacity: .3;
  1236. cursor: pointer;
  1237. &:hover,
  1238. &:focus {
  1239. opacity: .7;
  1240. }
  1241. &[class^='icon-star'],
  1242. &[class*=' icon-star'] {
  1243. opacity: .7;
  1244. &:hover,
  1245. &:focus {
  1246. opacity: 1 ;
  1247. }
  1248. }
  1249. &.icon-starred {
  1250. opacity: 1 ;
  1251. }
  1252. }
  1253. }
  1254. &:hover,
  1255. &:focus,
  1256. &.active {
  1257. background-color: var(--color-background-dark);
  1258. // display checkbox on hover/focus/active
  1259. .app-content-list-item-checkbox.checkbox + label {
  1260. display: flex;
  1261. }
  1262. }
  1263. .app-content-list-item-checkbox.checkbox + label,
  1264. .app-content-list-item-star {
  1265. position: absolute;
  1266. height: 40px;
  1267. width: 40px;
  1268. z-index: 50;
  1269. }
  1270. .app-content-list-item-checkbox.checkbox {
  1271. &:checked,
  1272. &:hover,
  1273. &:focus,
  1274. &.active {
  1275. + label {
  1276. // display checkbox if checked
  1277. display: flex;
  1278. // if checked, lower the opacity of the avatar
  1279. + .app-content-list-item-icon {
  1280. opacity: .7;
  1281. }
  1282. }
  1283. }
  1284. + label {
  1285. top: 14px;
  1286. inset-inline-start: 7px;
  1287. // hidden by default, only chown on hover-focus or if checked
  1288. display: none;
  1289. &::before {
  1290. margin: 0;
  1291. }
  1292. /* Hide the star, priority to the checkbox */
  1293. ~ .app-content-list-item-star {
  1294. display: none;
  1295. }
  1296. }
  1297. }
  1298. .app-content-list-item-star {
  1299. display: flex;
  1300. top: 10px;
  1301. inset-inline-start: 32px;
  1302. background-size: 16px;
  1303. height: 20px;
  1304. width: 20px;
  1305. margin: 0;
  1306. padding: 0;
  1307. }
  1308. .app-content-list-item-icon {
  1309. position: absolute;
  1310. display: inline-block;
  1311. height: 40px;
  1312. width: 40px;
  1313. line-height: 40px;
  1314. border-radius: 50%;
  1315. vertical-align: middle;
  1316. margin-inline-end: 10px;
  1317. color: #fff;
  1318. text-align: center;
  1319. font-size: 1.5em;
  1320. text-transform: capitalize;
  1321. object-fit: cover;
  1322. user-select: none;
  1323. cursor: pointer;
  1324. top: 50%;
  1325. margin-top: -20px;
  1326. }
  1327. .app-content-list-item-line-one,
  1328. .app-content-list-item-line-two {
  1329. display: block;
  1330. padding-inline: 50px 10px;
  1331. white-space: nowrap;
  1332. overflow: hidden;
  1333. text-overflow: ellipsis;
  1334. order: 1;
  1335. flex: 1 1 0px;
  1336. cursor: pointer;
  1337. }
  1338. .app-content-list-item-line-two {
  1339. opacity: .5;
  1340. order: 3;
  1341. flex: 1 0;
  1342. flex-basis: calc(100% - var(--default-clickable-area));
  1343. }
  1344. .app-content-list-item-details {
  1345. order: 2;
  1346. white-space: nowrap;
  1347. overflow: hidden;
  1348. text-overflow: ellipsis;
  1349. max-width: 100px;
  1350. opacity: .5;
  1351. font-size: 80%;
  1352. user-select: none;
  1353. }
  1354. .app-content-list-item-menu {
  1355. order: 4;
  1356. position: relative;
  1357. .popovermenu {
  1358. margin: 0;
  1359. // action icon have -7px margin
  1360. // default popover is normally 5px
  1361. inset-inline-end: -2px;
  1362. }
  1363. }
  1364. }
  1365. &.selection .app-content-list-item-checkbox.checkbox + label {
  1366. display: flex;
  1367. }
  1368. }
  1369. .button.primary.skip-navigation:focus-visible {
  1370. box-shadow: 0 0 0 4px var(--color-main-background) !important;
  1371. outline: 2px solid var(--color-main-text) !important;
  1372. }