apps.scss 31 KB

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