1
0

apps.scss 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492
  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. @import '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 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. border-radius: 0;
  412. outline: none !important;
  413. box-shadow: none;
  414. content: ' ';
  415. opacity: 0;
  416. -webkit-transform: rotate(-90deg);
  417. -ms-transform: rotate(-90deg);
  418. transform: rotate(-90deg);
  419. z-index: 105; // above a, under button
  420. border-radius: 50%;
  421. transition: opacity variables.$animation-quick ease-in-out;
  422. }
  423. /* force padding on link no matter if 'a' has an icon class */
  424. > a:first-child {
  425. padding-inline-start: var(--default-clickable-area);
  426. }
  427. &:hover,
  428. &:focus {
  429. &:before {
  430. opacity: 1;
  431. }
  432. > a {
  433. background-image: none;
  434. }
  435. > .app-navigation-entry-bullet {
  436. background: transparent !important;
  437. }
  438. }
  439. &.open {
  440. &:before {
  441. -webkit-transform: rotate(0);
  442. -ms-transform: rotate(0);
  443. transform: rotate(0);
  444. }
  445. }
  446. }
  447. /**
  448. * App navigation utils, buttons and counters for drop down menu
  449. */
  450. .app-navigation-entry-utils {
  451. flex: 0 1 auto;
  452. ul {
  453. display: flex !important;
  454. align-items: center;
  455. justify-content: flex-end;
  456. }
  457. li {
  458. width: var(--default-clickable-area) !important;
  459. height: var(--default-clickable-area);
  460. }
  461. button {
  462. height: 100%;
  463. width: 100%;
  464. margin: 0;
  465. box-shadow: none;
  466. }
  467. .app-navigation-entry-utils-menu-button {
  468. /* Prevent bg img override if an icon class is set */
  469. button:not([class^='icon-']):not([class*=' icon-']) {
  470. @include icon-color('more', 'actions', variables.$color-black, 1, true);
  471. }
  472. &:hover button,
  473. &:focus button {
  474. background-color: transparent;
  475. opacity: 1;
  476. }
  477. }
  478. .app-navigation-entry-utils-counter {
  479. overflow: hidden;
  480. text-align: end;
  481. font-size: 9pt;
  482. line-height: var(--default-clickable-area);
  483. padding: 0 12px; /* Same padding as all li > a in the app-navigation */
  484. &.highlighted {
  485. padding: 0;
  486. text-align: center;
  487. span {
  488. padding: 2px 5px;
  489. border-radius: 10px;
  490. background-color: var(--color-primary-element);
  491. color: var(--color-primary-element-text);
  492. }
  493. }
  494. }
  495. }
  496. /**
  497. * Editable entries
  498. */
  499. .app-navigation-entry-edit {
  500. padding-inline: 5px;
  501. display: block;
  502. width: calc(100% - 1px); /* Avoid border overlapping */
  503. transition: opacity 250ms ease-in-out;
  504. opacity: 0;
  505. position: absolute;
  506. background-color: var(--color-main-background);
  507. z-index: -1;
  508. form,
  509. div {
  510. display: inline-flex;
  511. width: 100%;
  512. }
  513. input {
  514. padding: 5px;
  515. margin-inline-end: 0;
  516. height: 38px;
  517. &:hover,
  518. &:focus {
  519. /* overlapp borders */
  520. z-index: 1;
  521. }
  522. }
  523. input[type='text'] {
  524. width: 100%;
  525. min-width: 0; /* firefox hack: override auto */
  526. border-end-end-radius: 0;
  527. border-start-end-radius: 0;
  528. }
  529. button,
  530. input:not([type='text']) {
  531. width: 36px;
  532. height: 38px;
  533. flex: 0 0 36px;
  534. &:not(:last-child) {
  535. border-radius: 0 !important;
  536. }
  537. &:not(:first-child) {
  538. margin-inline-start: -1px;
  539. }
  540. &:last-child {
  541. border-end-end-radius: var(--border-radius);
  542. border-start-end-radius: var(--border-radius);
  543. border-end-start-radius: 0;
  544. border-start-start-radius: 0;
  545. }
  546. }
  547. }
  548. /**
  549. * Deleted entries with undo button
  550. */
  551. .app-navigation-entry-deleted {
  552. display: inline-flex;
  553. padding-inline-start: var(--default-clickable-area);
  554. transform: translateX(#{variables.$navigation-width});
  555. .app-navigation-entry-deleted-description {
  556. position: relative;
  557. white-space: nowrap;
  558. text-overflow: ellipsis;
  559. overflow: hidden;
  560. flex: 1 1 0px;
  561. line-height: var(--default-clickable-area);
  562. }
  563. .app-navigation-entry-deleted-button {
  564. margin: 0;
  565. height: var(--default-clickable-area);
  566. width: var(--default-clickable-area);
  567. line-height: var(--default-clickable-area);
  568. &:hover,
  569. &:focus {
  570. opacity: 1;
  571. }
  572. }
  573. }
  574. /**
  575. * Common rules for animation of undo and edit entries
  576. */
  577. .app-navigation-entry-edit,
  578. .app-navigation-entry-deleted {
  579. width: calc(100% - 1px); /* Avoid border overlapping */
  580. transition: transform 250ms ease-in-out,
  581. opacity 250ms ease-in-out,
  582. z-index 250ms ease-in-out;
  583. position: absolute;
  584. inset-inline-start: 0;
  585. background-color: var(--color-main-background);
  586. box-sizing: border-box;
  587. }
  588. /**
  589. * drag and drop
  590. */
  591. .drag-and-drop {
  592. -webkit-transition: padding-bottom 500ms ease 0s;
  593. transition: padding-bottom 500ms ease 0s;
  594. padding-bottom: 40px;
  595. }
  596. .error {
  597. color: var(--color-error);
  598. }
  599. .app-navigation-entry-utils ul,
  600. .app-navigation-entry-menu ul {
  601. list-style-type: none;
  602. }
  603. }
  604. /* Floating and background-position fix */
  605. /* Cannot use inline-start and :dir to support Samsung Internet */
  606. body[dir='ltr'] {
  607. .app-navigation-personal,
  608. .app-navigation-administration {
  609. .app-navigation-new button {
  610. background-position: left 10px center;
  611. }
  612. > ul > li > ul > li > a {
  613. background-position: left 14px center;
  614. > .app-navigation-entry-utils {
  615. float: right;
  616. }
  617. }
  618. }
  619. }
  620. body[dir='rtl'] {
  621. .app-navigation-personal,
  622. .app-navigation-administration {
  623. .app-navigation-new button {
  624. background-position: right 10px center;
  625. }
  626. > ul > li > ul > li > a {
  627. background-position: right 14px center;
  628. > .app-navigation-entry-utils {
  629. float: left;
  630. }
  631. }
  632. }
  633. }
  634. /* CONTENT --------------------------------------------------------- */
  635. #content {
  636. box-sizing: border-box;
  637. position: static;
  638. margin: var(--body-container-margin);
  639. margin-top: 50px;
  640. padding: 0;
  641. display: flex;
  642. width: calc(100% - var(--body-container-margin) * 2);
  643. height: var(--body-height);
  644. border-radius: var(--body-container-radius);
  645. overflow: clip;
  646. &:not(.with-sidebar--full) {
  647. position: fixed;
  648. }
  649. }
  650. @media only screen and (max-width: variables.$breakpoint-mobile) {
  651. #content {
  652. border-start-start-radius: var(--border-radius-large);
  653. border-start-end-radius: var(--border-radius-large);
  654. }
  655. #app-navigation {
  656. border-start-start-radius: var(--border-radius-large);
  657. }
  658. #app-sidebar {
  659. border-start-end-radius: var(--border-radius-large);
  660. }
  661. }
  662. /* APP-CONTENT AND WRAPPER ------------------------------------------ */
  663. /* Part where the content will be loaded into */
  664. /**
  665. * !Important. We are defining the minimum requirement we want for flex
  666. * Just before the mobile breakpoint we have variables.$breakpoint-mobile (1024px) - variables.$navigation-width
  667. * -> 468px. In that case we want 200px for the list and 268px for the content
  668. */
  669. $min-content-width: variables.$breakpoint-mobile - variables.$navigation-width - variables.$list-min-width;
  670. #app-content {
  671. z-index: 1000;
  672. background-color: var(--color-main-background);
  673. flex-basis: 100vw;
  674. overflow: auto;
  675. position: initial;
  676. height: 100%;
  677. /* margin if navigation element is here */
  678. /* no top border for first settings item */
  679. > .section:first-child {
  680. border-top: none;
  681. }
  682. /* if app-content-list is present */
  683. #app-content-wrapper {
  684. display: flex;
  685. position: relative;
  686. align-items: stretch;
  687. /* make sure we have at least full height for loaders or such
  688. no need for list/details since we have a flex stretch */
  689. min-height: 100%;
  690. /* CONTENT DETAILS AFTER LIST*/
  691. .app-content-details {
  692. /* grow full width */
  693. flex: 1 1 $min-content-width;
  694. #app-navigation-toggle-back {
  695. display: none;
  696. }
  697. }
  698. }
  699. &::-webkit-scrollbar-button {
  700. height: var(--body-container-radius);
  701. }
  702. }
  703. /* APP-SIDEBAR ------------------------------------------------------------ */
  704. /*
  705. Sidebar: a sidebar to be used within #content
  706. #app-content will be shrinked properly
  707. */
  708. #app-sidebar {
  709. width: 27vw;
  710. min-width: variables.$sidebar-min-width;
  711. max-width: variables.$sidebar-max-width;
  712. display: block;
  713. position: -webkit-sticky;
  714. position: sticky;
  715. top: variables.$header-height;
  716. inset-inline-end:0;
  717. overflow-y: auto;
  718. overflow-x: hidden;
  719. z-index: 1500;
  720. opacity: 0.7px;
  721. height: calc(100vh - #{variables.$header-height});
  722. background: var(--color-main-background);
  723. border-inline-start: 1px solid var(--color-border);
  724. flex-shrink: 0;
  725. // no animations possible, use OC.Apps.showAppSidebar
  726. &.disappear {
  727. display: none;
  728. }
  729. }
  730. /* APP-SETTINGS ------------------------------------------------------------ */
  731. /* settings area */
  732. #app-settings {
  733. // To the bottom w/ flex
  734. margin-top: auto;
  735. &.open,
  736. &.opened {
  737. #app-settings-content {
  738. display: block;
  739. }
  740. }
  741. }
  742. #app-settings-content {
  743. display: none;
  744. padding: calc(var(--default-grid-baseline) * 2);
  745. padding-top: 0;
  746. padding-inline-start: calc(var(--default-grid-baseline) * 4);
  747. /* restrict height of settings and make scrollable */
  748. max-height: 300px;
  749. overflow-y: auto;
  750. box-sizing: border-box;
  751. /* display input fields at full width */
  752. input[type='text'] {
  753. width: 93%;
  754. }
  755. .info-text {
  756. padding-block: 5px 7px;
  757. padding-inline: 22px 0;
  758. color: var(--color-text-lighter);
  759. }
  760. input {
  761. &[type='checkbox'],
  762. &[type='radio'] {
  763. &.radio,
  764. &.checkbox {
  765. + label {
  766. display: inline-block;
  767. width: 100%;
  768. padding: 5px 0;
  769. }
  770. }
  771. }
  772. }
  773. }
  774. #app-settings-header {
  775. box-sizing: border-box;
  776. background-color: transparent;
  777. overflow: hidden;
  778. border-radius: calc(var(--default-clickable-area) / 2);
  779. padding: calc(var(--default-grid-baseline) * 2);
  780. padding-top: 0;
  781. .settings-button {
  782. display: flex;
  783. align-items: center;
  784. height: var(--default-clickable-area);
  785. width: 100%;
  786. padding: 0;
  787. margin: 0;
  788. background-color: transparent;
  789. box-shadow: none;
  790. border: 0;
  791. border-radius: calc(var(--default-clickable-area) / 2);
  792. text-align: start;
  793. font-weight: normal;
  794. font-size: 100%;
  795. opacity: 0.8;
  796. /* like app-navigation a */
  797. color: var(--color-main-text);
  798. &.opened {
  799. border-top: solid 1px var(--color-border);
  800. background-color: var(--color-main-background);
  801. margin-top: 8px;
  802. }
  803. &:hover,
  804. &:focus {
  805. background-color: var(--color-background-hover);
  806. }
  807. &::before {
  808. background-image: var(--icon-settings-dark);
  809. background-repeat: no-repeat;
  810. content: '';
  811. width: var(--default-clickable-area);
  812. height: var(--default-clickable-area);
  813. top: 0;
  814. inset-inline-start: 0;
  815. display: block;
  816. }
  817. &:focus-visible {
  818. box-shadow: 0 0 0 2px inset var(--color-primary-element) !important;
  819. }
  820. }
  821. }
  822. /* Background-position fix */
  823. body[dir='ltr'] #app-settings-header .settings-button {
  824. &::before {
  825. background-position: left 14px center;
  826. }
  827. &:focus-visible {
  828. background-position: left 12px center;
  829. }
  830. }
  831. body[dir='rtl'] #app-settings-header .settings-button {
  832. &::before {
  833. background-position: right 14px center;
  834. }
  835. &:focus-visible {
  836. background-position: right 12px center;
  837. }
  838. }
  839. /* GENERAL SECTION ------------------------------------------------------------ */
  840. .section {
  841. display: block;
  842. padding: 30px;
  843. margin-bottom: 24px;
  844. &.hidden {
  845. display: none !important;
  846. }
  847. /* slight position correction of checkboxes and radio buttons */
  848. input {
  849. &[type='checkbox'],
  850. &[type='radio'] {
  851. vertical-align: -2px;
  852. margin-inline-end: 4px;
  853. }
  854. }
  855. }
  856. .sub-section {
  857. position: relative;
  858. margin-top: 10px;
  859. margin-inline-start: 27px;
  860. margin-bottom: 10px;
  861. }
  862. .appear {
  863. opacity: 1;
  864. -webkit-transition: opacity 500ms ease 0s;
  865. -moz-transition: opacity 500ms ease 0s;
  866. -ms-transition: opacity 500ms ease 0s;
  867. -o-transition: opacity 500ms ease 0s;
  868. transition: opacity 500ms ease 0s;
  869. &.transparent {
  870. opacity: 0;
  871. }
  872. }
  873. /* TABS ------------------------------------------------------------ */
  874. .tabHeaders {
  875. display: flex;
  876. margin-bottom: 16px;
  877. .tabHeader {
  878. display: flex;
  879. flex-direction: column;
  880. flex-grow: 1;
  881. text-align: center;
  882. white-space: nowrap;
  883. overflow: hidden;
  884. text-overflow: ellipsis;
  885. cursor: pointer;
  886. color: var(--color-text-lighter);
  887. margin-bottom: 1px;
  888. padding: 5px;
  889. &.hidden {
  890. display: none;
  891. }
  892. /* Use same amount as sidebar padding */
  893. &:first-child {
  894. padding-inline-start: 15px;
  895. }
  896. &:last-child {
  897. padding-inline-end: 15px;
  898. }
  899. .icon {
  900. display: inline-block;
  901. width: 100%;
  902. height: 16px;
  903. background-size: 16px;
  904. vertical-align: middle;
  905. margin-top: -2px;
  906. margin-inline-end: 3px;
  907. opacity: .7;
  908. cursor: pointer;
  909. }
  910. a {
  911. color: var(--color-text-lighter);
  912. margin-bottom: 1px;
  913. overflow: hidden;
  914. text-overflow: ellipsis;
  915. }
  916. &.selected {
  917. font-weight: bold;
  918. }
  919. &.selected,
  920. &:hover,
  921. &:focus {
  922. margin-bottom: 0px;
  923. color: var(--color-main-text);
  924. border-bottom: 1px solid var(--color-text-lighter);
  925. }
  926. }
  927. }
  928. .tabsContainer {
  929. .tab {
  930. padding: 0 15px 15px;
  931. }
  932. }
  933. /* Cannot use inline-start to support Samsung Internet*/
  934. body[dir='ltr'] .tabsContainer {
  935. clear: left;
  936. }
  937. body[dir='rtl'] .tabsContainer {
  938. clear: right;
  939. }
  940. /* POPOVER MENU ------------------------------------------------------------ */
  941. $popoveritem-height: 34px;
  942. $popovericon-size: 16px;
  943. $outter-margin: math.div($popoveritem-height - $popovericon-size, 2);
  944. .v-popper__inner div.open > ul {
  945. > li > a > span.action-link__icon,
  946. > li > a > span.action-router__icon,
  947. > li > a > img {
  948. filter: var(--background-invert-if-dark);
  949. // We do not want to invert the color of the user_status emoji:
  950. // https://github.com/nextcloud/nextcloud-vue/blob/8899087f8f8d45e0ed744bde9faa00b625a21905/src/components/NcAvatar/NcAvatar.vue#L495
  951. &[src^="data"] {
  952. filter: none;
  953. }
  954. }
  955. }
  956. .bubble,
  957. .app-navigation-entry-menu,
  958. .popovermenu {
  959. position: absolute;
  960. background-color: var(--color-main-background);
  961. color: var(--color-main-text);
  962. border-radius: var(--border-radius-large);
  963. padding: 3px;
  964. z-index: 110;
  965. margin: 5px;
  966. margin-top: -5px;
  967. inset-inline-end: 0;
  968. filter: drop-shadow(0 1px 3px var(--color-box-shadow));
  969. display: none;
  970. will-change: filter;
  971. &:after {
  972. bottom: 100%;
  973. // Required right-distance is half menu icon size + right padding
  974. // = 16px/2 + 14px = 22px
  975. // popover right margin is 5px, arrow width is 9px to center and border is 1px
  976. // 22px - 9px - 5px - 1px = 7px
  977. inset-inline-end: 7px;
  978. /* change this to adjust the arrow position */
  979. border: solid transparent;
  980. content: ' ';
  981. height: 0;
  982. width: 0;
  983. position: absolute;
  984. pointer-events: none;
  985. border-bottom-color: var(--color-main-background);
  986. border-width: 9px;
  987. }
  988. /* Center the popover */
  989. &.menu-center {
  990. transform: translateX(50%);
  991. inset-inline-end: 50%;
  992. margin-inline-end: 0;
  993. &:after {
  994. inset-inline-end: 50%;
  995. transform: translateX(50%);
  996. }
  997. }
  998. /* Align the popover to the left */
  999. &.menu-left {
  1000. inset-inline: 0 auto;
  1001. margin-inline-end: 0;
  1002. &:after {
  1003. inset-inline: 6px auto;
  1004. }
  1005. }
  1006. &.open {
  1007. display: block;
  1008. }
  1009. &.contactsmenu-popover {
  1010. margin: 0;
  1011. }
  1012. ul {
  1013. /* Overwrite #app-navigation > ul ul */
  1014. display: flex !important;
  1015. flex-direction: column;
  1016. }
  1017. li {
  1018. display: flex;
  1019. flex: 0 0 auto;
  1020. &.hidden {
  1021. display: none;
  1022. }
  1023. > button,
  1024. > a,
  1025. > .menuitem {
  1026. cursor: pointer;
  1027. line-height: $popoveritem-height;
  1028. border: 0;
  1029. border-radius: var(--border-radius-large);
  1030. background-color: transparent;
  1031. display: flex;
  1032. align-items: flex-start;
  1033. height: auto;
  1034. margin: 0;
  1035. font-weight: normal;
  1036. box-shadow: none;
  1037. width: 100%;
  1038. color: var(--color-main-text);
  1039. white-space: nowrap;
  1040. span[class^='icon-'],
  1041. span[class*=' icon-'],
  1042. &[class^='icon-'],
  1043. &[class*=' icon-'] {
  1044. min-width: 0; /* Overwrite icons*/
  1045. min-height: 0;
  1046. background-position: #{math.div($popoveritem-height - $popovericon-size, 2)} center;
  1047. background-size: $popovericon-size;
  1048. }
  1049. span[class^='icon-'],
  1050. span[class*=' icon-'] {
  1051. /* Keep padding to define the width to
  1052. assure correct position of a possible text */
  1053. padding: #{math.div($popoveritem-height, 2)} 0 #{math.div($popoveritem-height, 2)} $popoveritem-height;
  1054. }
  1055. // If no icons set, force left margin to align
  1056. &:not([class^='icon-']):not([class*='icon-']) {
  1057. > span,
  1058. > input,
  1059. > form {
  1060. &:not([class^='icon-']):not([class*='icon-']):first-child {
  1061. margin-inline-start: $popoveritem-height;
  1062. }
  1063. }
  1064. }
  1065. &[class^='icon-'],
  1066. &[class*=' icon-'] {
  1067. padding: 0 #{math.div($popoveritem-height - $popovericon-size, 2)} 0 $popoveritem-height !important;
  1068. }
  1069. &:hover,
  1070. &:focus {
  1071. background-color: var(--color-background-hover);
  1072. }
  1073. &:focus,
  1074. &:focus-visible {
  1075. box-shadow: 0 0 0 2px var(--color-primary-element);
  1076. }
  1077. &.active {
  1078. border-radius: var(--border-radius-element);
  1079. background-color: var(--color-primary-element-light);
  1080. }
  1081. /* prevent .action class to break the design */
  1082. &.action {
  1083. padding: inherit !important;
  1084. }
  1085. > span {
  1086. cursor: pointer;
  1087. white-space: nowrap;
  1088. }
  1089. > p {
  1090. width: 150px;
  1091. line-height: 1.6em;
  1092. padding: 8px 0;
  1093. white-space: normal;
  1094. }
  1095. > select {
  1096. margin: 0;
  1097. margin-inline-start: 6px;
  1098. }
  1099. /* Add padding if contains icon+text */
  1100. &:not(:empty) {
  1101. padding-inline-end: $outter-margin !important;
  1102. }
  1103. /* DEPRECATED! old img in popover fallback
  1104. * TODO: to remove */
  1105. > img {
  1106. width: $popovericon-size;
  1107. padding: #{math.div($popoveritem-height - $popovericon-size, 2)};
  1108. }
  1109. /* checkbox/radio fixes */
  1110. > input.radio + label,
  1111. > input.checkbox + label {
  1112. padding: 0 !important;
  1113. width: 100%;
  1114. }
  1115. > input.checkbox + label::before {
  1116. margin: -2px 13px 0;
  1117. }
  1118. > input.radio + label::before {
  1119. margin: -2px 12px 0;
  1120. }
  1121. > input:not([type=radio]):not([type=checkbox]):not([type=image]) {
  1122. width: 150px;
  1123. }
  1124. form {
  1125. display: flex;
  1126. flex: 1 1 auto;
  1127. /* put a small space between text and form
  1128. if there is an element before */
  1129. align-items: center;
  1130. &:not(:first-child) {
  1131. margin-inline-start: 5px;
  1132. }
  1133. }
  1134. /* no margin if hidden span before */
  1135. > span.hidden + form,
  1136. > span[style*='display:none'] + form {
  1137. margin-inline-start: 0;
  1138. }
  1139. /* Inputs inside popover supports text, submit & reset */
  1140. input {
  1141. min-width: $popoveritem-height;
  1142. max-height: #{$popoveritem-height - 4px}; /* twice the element margin-y */
  1143. margin: 2px 0;
  1144. flex: 1 1 auto;
  1145. // space between inline inputs
  1146. &:not(:first-child) {
  1147. margin-inline-start: 5px;
  1148. }
  1149. }
  1150. }
  1151. /* css hack, only first not hidden */
  1152. &:not(.hidden):not([style*='display:none']) {
  1153. &:first-of-type {
  1154. > button, > a, > .menuitem {
  1155. > form, > input {
  1156. margin-top: $outter-margin - 2px; // minus the input margin
  1157. }
  1158. }
  1159. }
  1160. &:last-of-type {
  1161. > button, > a, > .menuitem {
  1162. > form, > input {
  1163. margin-bottom: 0px;
  1164. }
  1165. }
  1166. }
  1167. }
  1168. > button {
  1169. padding: 0;
  1170. span {
  1171. opacity: 1;
  1172. }
  1173. }
  1174. }
  1175. }
  1176. .popovermenu {
  1177. li {
  1178. > button,
  1179. > a,
  1180. > .menuitem {
  1181. /* DEPRECATED! old img in popover fallback
  1182. * TODO: to remove */
  1183. > img {
  1184. width: $popoveritem-height;
  1185. height: $popoveritem-height;
  1186. }
  1187. }
  1188. }
  1189. }
  1190. #contactsmenu .contact .popovermenu {
  1191. li {
  1192. > a {
  1193. > img {
  1194. width: 16px;
  1195. height: 16px;
  1196. }
  1197. }
  1198. }
  1199. }
  1200. /* CONTENT LIST ------------------------------------------------------------ */
  1201. .app-content-list {
  1202. position: -webkit-sticky;
  1203. position: relative;
  1204. top: 0;
  1205. border-inline-end: 1px solid var(--color-border);
  1206. display: flex;
  1207. flex-direction: column;
  1208. transition: transform 250ms ease-in-out;
  1209. min-height: 100%;
  1210. max-height: 100%;
  1211. overflow-y: auto;
  1212. overflow-x: hidden;
  1213. flex: 1 1 variables.$list-min-width;
  1214. min-width: variables.$list-min-width;
  1215. max-width: variables.$list-max-width;
  1216. /* Default item */
  1217. .app-content-list-item {
  1218. position: relative;
  1219. height: 68px;
  1220. cursor: pointer;
  1221. padding: 10px 7px;
  1222. display: flex;
  1223. flex-wrap: wrap;
  1224. align-items: center;
  1225. flex: 0 0 auto;
  1226. /* Icon fixes */
  1227. &,
  1228. > .app-content-list-item-menu {
  1229. > [class^='icon-'],
  1230. > [class*=' icon-'] {
  1231. order: 4;
  1232. width: 24px;
  1233. height: 24px;
  1234. margin: -7px; // right padding of item
  1235. padding: 22px;
  1236. opacity: .3;
  1237. cursor: pointer;
  1238. &:hover,
  1239. &:focus {
  1240. opacity: .7;
  1241. }
  1242. &[class^='icon-star'],
  1243. &[class*=' icon-star'] {
  1244. opacity: .7;
  1245. &:hover,
  1246. &:focus {
  1247. opacity: 1 ;
  1248. }
  1249. }
  1250. &.icon-starred {
  1251. opacity: 1 ;
  1252. }
  1253. }
  1254. }
  1255. &:hover,
  1256. &:focus,
  1257. &.active {
  1258. background-color: var(--color-background-dark);
  1259. // display checkbox on hover/focus/active
  1260. .app-content-list-item-checkbox.checkbox + label {
  1261. display: flex;
  1262. }
  1263. }
  1264. .app-content-list-item-checkbox.checkbox + label,
  1265. .app-content-list-item-star {
  1266. position: absolute;
  1267. height: 40px;
  1268. width: 40px;
  1269. z-index: 50;
  1270. }
  1271. .app-content-list-item-checkbox.checkbox {
  1272. &:checked,
  1273. &:hover,
  1274. &:focus,
  1275. &.active {
  1276. + label {
  1277. // display checkbox if checked
  1278. display: flex;
  1279. // if checked, lower the opacity of the avatar
  1280. + .app-content-list-item-icon {
  1281. opacity: .7;
  1282. }
  1283. }
  1284. }
  1285. + label {
  1286. top: 14px;
  1287. inset-inline-start: 7px;
  1288. // hidden by default, only chown on hover-focus or if checked
  1289. display: none;
  1290. &::before {
  1291. margin: 0;
  1292. }
  1293. /* Hide the star, priority to the checkbox */
  1294. ~ .app-content-list-item-star {
  1295. display: none;
  1296. }
  1297. }
  1298. }
  1299. .app-content-list-item-star {
  1300. display: flex;
  1301. top: 10px;
  1302. inset-inline-start: 32px;
  1303. background-size: 16px;
  1304. height: 20px;
  1305. width: 20px;
  1306. margin: 0;
  1307. padding: 0;
  1308. }
  1309. .app-content-list-item-icon {
  1310. position: absolute;
  1311. display: inline-block;
  1312. height: 40px;
  1313. width: 40px;
  1314. line-height: 40px;
  1315. border-radius: 50%;
  1316. vertical-align: middle;
  1317. margin-inline-end: 10px;
  1318. color: #fff;
  1319. text-align: center;
  1320. font-size: 1.5em;
  1321. text-transform: capitalize;
  1322. object-fit: cover;
  1323. user-select: none;
  1324. cursor: pointer;
  1325. top: 50%;
  1326. margin-top: -20px;
  1327. }
  1328. .app-content-list-item-line-one,
  1329. .app-content-list-item-line-two {
  1330. display: block;
  1331. padding-inline: 50px 10px;
  1332. white-space: nowrap;
  1333. overflow: hidden;
  1334. text-overflow: ellipsis;
  1335. order: 1;
  1336. flex: 1 1 0px;
  1337. cursor: pointer;
  1338. }
  1339. .app-content-list-item-line-two {
  1340. opacity: .5;
  1341. order: 3;
  1342. flex: 1 0;
  1343. flex-basis: calc(100% - var(--default-clickable-area));
  1344. }
  1345. .app-content-list-item-details {
  1346. order: 2;
  1347. white-space: nowrap;
  1348. overflow: hidden;
  1349. text-overflow: ellipsis;
  1350. max-width: 100px;
  1351. opacity: .5;
  1352. font-size: 80%;
  1353. user-select: none;
  1354. }
  1355. .app-content-list-item-menu {
  1356. order: 4;
  1357. position: relative;
  1358. .popovermenu {
  1359. margin: 0;
  1360. // action icon have -7px margin
  1361. // default popover is normally 5px
  1362. inset-inline-end: -2px;
  1363. }
  1364. }
  1365. }
  1366. &.selection .app-content-list-item-checkbox.checkbox + label {
  1367. display: flex;
  1368. }
  1369. }
  1370. .button.primary.skip-navigation:focus-visible {
  1371. box-shadow: 0 0 0 4px var(--color-main-background) !important;
  1372. outline: 2px solid var(--color-main-text) !important;
  1373. }