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

apps.scss 30KB

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