apps.scss 30 KB

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