apps.scss 30 KB

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