apps.scss 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424
  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. background-color: var(--color-background-plain, var(--color-main-background));
  38. background-image: var(--image-background);
  39. background-size: cover;
  40. background-position: center;
  41. }
  42. body {
  43. background-color: var(--color-background-plain, var(--color-main-background));
  44. background-image: var(--image-background-plain, var(--image-background));
  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: clip;
  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. .ie,
  888. .edge {
  889. .bubble, .bubble:after,
  890. .popovermenu, .popovermenu:after,
  891. #app-navigation .app-navigation-entry-menu,
  892. #app-navigation .app-navigation-entry-menu:after {
  893. border: 1px solid var(--color-border);
  894. }
  895. }
  896. .contact .popovermenu ul,
  897. .popover__menu {
  898. > li > a > img {
  899. filter: var(--background-invert-if-dark);
  900. // We do not want to invert the color of the user_status emoji:
  901. // https://github.com/nextcloud/nextcloud-vue/blob/8899087f8f8d45e0ed744bde9faa00b625a21905/src/components/NcAvatar/NcAvatar.vue#L495
  902. &[src^="data"] {
  903. filter: none;
  904. }
  905. }
  906. }
  907. .bubble,
  908. .app-navigation-entry-menu,
  909. .popovermenu {
  910. position: absolute;
  911. background-color: var(--color-main-background);
  912. color: var(--color-main-text);
  913. border-radius: var(--border-radius-large);
  914. padding: 3px;
  915. z-index: 110;
  916. margin: 5px;
  917. margin-top: -5px;
  918. right: 0;
  919. filter: drop-shadow(0 1px 3px var(--color-box-shadow));
  920. display: none;
  921. will-change: filter;
  922. &:after {
  923. bottom: 100%;
  924. // Required right-distance is half menu icon size + right padding
  925. // = 16px/2 + 14px = 22px
  926. // popover right margin is 5px, arrow width is 9px to center and border is 1px
  927. // 22px - 9px - 5px - 1px = 7px
  928. right: 7px;
  929. /* change this to adjust the arrow position */
  930. border: solid transparent;
  931. content: ' ';
  932. height: 0;
  933. width: 0;
  934. position: absolute;
  935. pointer-events: none;
  936. border-bottom-color: var(--color-main-background);
  937. border-width: 9px;
  938. }
  939. /* Center the popover */
  940. &.menu-center {
  941. transform: translateX(50%);
  942. right: 50%;
  943. margin-right: 0;
  944. &:after {
  945. right: 50%;
  946. transform: translateX(50%);
  947. }
  948. }
  949. /* Align the popover to the left */
  950. &.menu-left {
  951. right: auto;
  952. left: 0;
  953. margin-right: 0;
  954. &:after {
  955. left: 6px;
  956. right: auto;
  957. }
  958. }
  959. &.open {
  960. display: block;
  961. }
  962. &.contactsmenu-popover {
  963. margin: 0;
  964. }
  965. ul {
  966. /* Overwrite #app-navigation > ul ul */
  967. display: flex !important;
  968. flex-direction: column;
  969. }
  970. li {
  971. display: flex;
  972. flex: 0 0 auto;
  973. &.hidden {
  974. display: none;
  975. }
  976. > button,
  977. > a,
  978. > .menuitem {
  979. cursor: pointer;
  980. line-height: $popoveritem-height;
  981. border: 0;
  982. border-radius: var(--border-radius-large);
  983. background-color: transparent;
  984. display: flex;
  985. align-items: flex-start;
  986. height: auto;
  987. margin: 0;
  988. font-weight: normal;
  989. box-shadow: none;
  990. width: 100%;
  991. color: var(--color-main-text);
  992. white-space: nowrap;
  993. span[class^='icon-'],
  994. span[class*=' icon-'],
  995. &[class^='icon-'],
  996. &[class*=' icon-'] {
  997. min-width: 0; /* Overwrite icons*/
  998. min-height: 0;
  999. background-position: #{math.div($popoveritem-height - $popovericon-size, 2)} center;
  1000. background-size: $popovericon-size;
  1001. }
  1002. span[class^='icon-'],
  1003. span[class*=' icon-'] {
  1004. /* Keep padding to define the width to
  1005. assure correct position of a possible text */
  1006. padding: #{math.div($popoveritem-height, 2)} 0 #{math.div($popoveritem-height, 2)} $popoveritem-height;
  1007. }
  1008. // If no icons set, force left margin to align
  1009. &:not([class^='icon-']):not([class*='icon-']) {
  1010. > span,
  1011. > input,
  1012. > form {
  1013. &:not([class^='icon-']):not([class*='icon-']):first-child {
  1014. margin-left: $popoveritem-height;
  1015. }
  1016. }
  1017. }
  1018. &[class^='icon-'],
  1019. &[class*=' icon-'] {
  1020. padding: 0 #{math.div($popoveritem-height - $popovericon-size, 2)} 0 $popoveritem-height !important;
  1021. }
  1022. &:hover,
  1023. &:focus {
  1024. background-color: var(--color-background-hover);
  1025. }
  1026. &:focus,
  1027. &:focus-visible {
  1028. box-shadow: 0 0 0 2px var(--color-primary-element);
  1029. }
  1030. &.active {
  1031. border-radius: var(--border-radius-pill);
  1032. background-color: var(--color-primary-light);
  1033. }
  1034. /* prevent .action class to break the design */
  1035. &.action {
  1036. padding: inherit !important;
  1037. }
  1038. > span {
  1039. cursor: pointer;
  1040. white-space: nowrap;
  1041. }
  1042. > p {
  1043. width: 150px;
  1044. line-height: 1.6em;
  1045. padding: 8px 0;
  1046. white-space: normal;
  1047. }
  1048. > select {
  1049. margin: 0;
  1050. margin-left: 6px;
  1051. }
  1052. /* Add padding if contains icon+text */
  1053. &:not(:empty) {
  1054. padding-right: $outter-margin !important;
  1055. }
  1056. /* DEPRECATED! old img in popover fallback
  1057. * TODO: to remove */
  1058. > img {
  1059. width: $popovericon-size;
  1060. padding: #{math.div($popoveritem-height - $popovericon-size, 2)};
  1061. }
  1062. /* checkbox/radio fixes */
  1063. > input.radio + label,
  1064. > input.checkbox + label {
  1065. padding: 0 !important;
  1066. width: 100%;
  1067. }
  1068. > input.checkbox + label::before {
  1069. margin: -2px 13px 0;
  1070. }
  1071. > input.radio + label::before {
  1072. margin: -2px 12px 0;
  1073. }
  1074. > input:not([type=radio]):not([type=checkbox]):not([type=image]) {
  1075. width: 150px;
  1076. }
  1077. form {
  1078. display: flex;
  1079. flex: 1 1 auto;
  1080. /* put a small space between text and form
  1081. if there is an element before */
  1082. align-items: center;
  1083. &:not(:first-child) {
  1084. margin-left: 5px;
  1085. }
  1086. }
  1087. /* no margin if hidden span before */
  1088. > span.hidden + form,
  1089. > span[style*='display:none'] + form {
  1090. margin-left: 0;
  1091. }
  1092. /* Inputs inside popover supports text, submit & reset */
  1093. input {
  1094. min-width: $popoveritem-height;
  1095. max-height: #{$popoveritem-height - 4px}; /* twice the element margin-y */
  1096. margin: 2px 0;
  1097. flex: 1 1 auto;
  1098. // space between inline inputs
  1099. &:not(:first-child) {
  1100. margin-left: 5px;
  1101. }
  1102. }
  1103. }
  1104. /* css hack, only first not hidden */
  1105. &:not(.hidden):not([style*='display:none']) {
  1106. &:first-of-type {
  1107. > button, > a, > .menuitem {
  1108. > form, > input {
  1109. margin-top: $outter-margin - 2px; // minus the input margin
  1110. }
  1111. }
  1112. }
  1113. &:last-of-type {
  1114. > button, > a, > .menuitem {
  1115. > form, > input {
  1116. margin-bottom: 0px;
  1117. }
  1118. }
  1119. }
  1120. }
  1121. > button {
  1122. padding: 0;
  1123. span {
  1124. opacity: 1;
  1125. }
  1126. }
  1127. }
  1128. }
  1129. .popovermenu {
  1130. li {
  1131. > button,
  1132. > a,
  1133. > .menuitem {
  1134. /* DEPRECATED! old img in popover fallback
  1135. * TODO: to remove */
  1136. > img {
  1137. width: $popoveritem-height;
  1138. height: $popoveritem-height;
  1139. }
  1140. }
  1141. }
  1142. }
  1143. /* CONTENT LIST ------------------------------------------------------------ */
  1144. .app-content-list {
  1145. position: -webkit-sticky;
  1146. position: relative;
  1147. top: 0;
  1148. border-right: 1px solid var(--color-border);
  1149. display: flex;
  1150. flex-direction: column;
  1151. transition: transform 250ms ease-in-out;
  1152. min-height: 100%;
  1153. max-height: 100%;
  1154. overflow-y: auto;
  1155. overflow-x: hidden;
  1156. flex: 1 1 variables.$list-min-width;
  1157. min-width: variables.$list-min-width;
  1158. max-width: variables.$list-max-width;
  1159. /* Default item */
  1160. .app-content-list-item {
  1161. position: relative;
  1162. height: 68px;
  1163. cursor: pointer;
  1164. padding: 10px 7px;
  1165. display: flex;
  1166. flex-wrap: wrap;
  1167. align-items: center;
  1168. flex: 0 0 auto;
  1169. /* Icon fixes */
  1170. &,
  1171. > .app-content-list-item-menu {
  1172. > [class^='icon-'],
  1173. > [class*=' icon-'] {
  1174. order: 4;
  1175. width: 24px;
  1176. height: 24px;
  1177. margin: -7px; // right padding of item
  1178. padding: 22px;
  1179. opacity: .3;
  1180. cursor: pointer;
  1181. &:hover,
  1182. &:focus {
  1183. opacity: .7;
  1184. }
  1185. &[class^='icon-star'],
  1186. &[class*=' icon-star'] {
  1187. opacity: .7;
  1188. &:hover,
  1189. &:focus {
  1190. opacity: 1 ;
  1191. }
  1192. }
  1193. &.icon-starred {
  1194. opacity: 1 ;
  1195. }
  1196. }
  1197. }
  1198. &:hover,
  1199. &:focus,
  1200. &.active {
  1201. background-color: var(--color-background-dark);
  1202. // display checkbox on hover/focus/active
  1203. .app-content-list-item-checkbox.checkbox + label {
  1204. display: flex;
  1205. }
  1206. }
  1207. .app-content-list-item-checkbox.checkbox + label,
  1208. .app-content-list-item-star {
  1209. position: absolute;
  1210. height: 40px;
  1211. width: 40px;
  1212. z-index: 50;
  1213. }
  1214. .app-content-list-item-checkbox.checkbox {
  1215. &:checked,
  1216. &:hover,
  1217. &:focus,
  1218. &.active {
  1219. + label {
  1220. // display checkbox if checked
  1221. display: flex;
  1222. // if checked, lower the opacity of the avatar
  1223. + .app-content-list-item-icon {
  1224. opacity: .7;
  1225. }
  1226. }
  1227. }
  1228. + label {
  1229. top: 14px;
  1230. left: 7px;
  1231. // hidden by default, only chown on hover-focus or if checked
  1232. display: none;
  1233. &::before {
  1234. margin: 0;
  1235. }
  1236. /* Hide the star, priority to the checkbox */
  1237. ~ .app-content-list-item-star {
  1238. display: none;
  1239. }
  1240. }
  1241. }
  1242. .app-content-list-item-star {
  1243. display: flex;
  1244. top: 10px;
  1245. left: 32px;
  1246. background-size: 16px;
  1247. height: 20px;
  1248. width: 20px;
  1249. margin: 0;
  1250. padding: 0;
  1251. }
  1252. .app-content-list-item-icon {
  1253. position: absolute;
  1254. display: inline-block;
  1255. height: 40px;
  1256. width: 40px;
  1257. line-height: 40px;
  1258. border-radius: 50%;
  1259. vertical-align: middle;
  1260. margin-right: 10px;
  1261. color: #fff;
  1262. text-align: center;
  1263. font-size: 1.5em;
  1264. text-transform: capitalize;
  1265. object-fit: cover;
  1266. user-select: none;
  1267. cursor: pointer;
  1268. top: 50%;
  1269. margin-top: -20px;
  1270. }
  1271. .app-content-list-item-line-one,
  1272. .app-content-list-item-line-two {
  1273. display: block;
  1274. padding-left: 50px;
  1275. white-space: nowrap;
  1276. overflow: hidden;
  1277. text-overflow: ellipsis;
  1278. order: 1;
  1279. flex: 1 1 0px;
  1280. padding-right: 10px;
  1281. cursor: pointer;
  1282. }
  1283. .app-content-list-item-line-two {
  1284. opacity: .5;
  1285. order: 3;
  1286. flex: 1 0;
  1287. flex-basis: calc(100% - 44px);
  1288. }
  1289. .app-content-list-item-details {
  1290. order: 2;
  1291. white-space: nowrap;
  1292. overflow: hidden;
  1293. text-overflow: ellipsis;
  1294. max-width: 100px;
  1295. opacity: .5;
  1296. font-size: 80%;
  1297. user-select: none;
  1298. }
  1299. .app-content-list-item-menu {
  1300. order: 4;
  1301. position: relative;
  1302. .popovermenu {
  1303. margin: 0;
  1304. // action icon have -7px margin
  1305. // default popover is normally 5px
  1306. right: -2px;
  1307. }
  1308. }
  1309. }
  1310. &.selection .app-content-list-item-checkbox.checkbox + label {
  1311. display: flex;
  1312. }
  1313. }