apps.scss 31 KB

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