apps.scss 31 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: 1.8em;
  49. }
  50. h3 {
  51. font-size: 1.6em;
  52. }
  53. h4 {
  54. font-size: 1.4em;
  55. }
  56. h5 {
  57. font-size: 1.25em;
  58. }
  59. h6 {
  60. font-size: 1.1em;
  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. // Ensure the maxcontrast color is set for the background
  97. --color-text-maxcontrast: var(--color-text-maxcontrast-background-blur, var(--color-main-text));
  98. width: variables.$navigation-width;
  99. z-index: 500;
  100. overflow-y: auto;
  101. overflow-x: hidden;
  102. background-color: var(--color-main-background-blur);
  103. backdrop-filter: var(--filter-background-blur);
  104. -webkit-backdrop-filter: var(--filter-background-blur); -webkit-user-select: none;
  105. position: sticky;
  106. height: 100%;
  107. -moz-user-select: none;
  108. -ms-user-select: none;
  109. user-select: none;
  110. display: flex;
  111. flex-direction: column;
  112. flex-grow: 0;
  113. flex-shrink: 0;
  114. .app-navigation-caption {
  115. font-weight: bold;
  116. line-height: var(--default-clickable-area);
  117. padding: 10px var(--default-clickable-area) 0 var(--default-clickable-area);
  118. white-space: nowrap;
  119. text-overflow: ellipsis;
  120. box-shadow: none !important;
  121. user-select: none;
  122. pointer-events:none;
  123. margin-left: 10px;
  124. }
  125. }
  126. .app-navigation-personal,
  127. .app-navigation-administration {
  128. /* 'New' button */
  129. .app-navigation-new {
  130. display: block;
  131. padding: calc(var(--default-grid-baseline) * 2);
  132. button {
  133. display: inline-block;
  134. width: 100%;
  135. padding: 10px;
  136. padding-left: 34px;
  137. background-position: 10px center;
  138. text-align: left;
  139. margin: 0;
  140. }
  141. }
  142. li {
  143. position: relative;
  144. }
  145. > ul {
  146. position: relative;
  147. height: 100%;
  148. width: 100%;
  149. overflow-x: hidden;
  150. overflow-y: auto;
  151. box-sizing: border-box;
  152. display: flex;
  153. flex-direction: column;
  154. padding: calc(var(--default-grid-baseline) * 2);
  155. padding-bottom: 0;
  156. &:last-child {
  157. padding-bottom: calc(var(--default-grid-baseline) * 2);
  158. }
  159. > li {
  160. display: inline-flex;
  161. flex-wrap: wrap;
  162. order: 1;
  163. flex-shrink: 0;
  164. margin: 0;
  165. margin-bottom: 3px;
  166. width: 100%;
  167. border-radius: var(--border-radius-element);
  168. /* Pinned-to-bottom entries */
  169. &.pinned {
  170. order: 2;
  171. &.first-pinned {
  172. margin-top: auto !important;
  173. }
  174. }
  175. > .app-navigation-entry-deleted {
  176. /* Ugly hack for overriding the main entry link */
  177. padding-left: var(--default-clickable-area) !important;
  178. }
  179. > .app-navigation-entry-edit {
  180. /* Ugly hack for overriding the main entry link */
  181. /* align the input correctly with the link text
  182. 44px-6px padding for the input */
  183. padding-left: calc(var(--default-clickable-area) - 6px) !important;
  184. }
  185. a:hover,
  186. a:focus {
  187. &,
  188. > a {
  189. background-color: var(--color-background-hover);
  190. }
  191. }
  192. a:focus-visible {
  193. box-shadow: 0 0 0 4px var(--color-main-background);
  194. outline: 2px solid var(--color-main-text);
  195. }
  196. &.active,
  197. a:active,
  198. a.selected ,
  199. a.active {
  200. &,
  201. > a {
  202. background-color: var(--color-primary-element);
  203. color: var(--color-primary-element-text);
  204. &:first-child > img {
  205. filter: var(--primary-invert-if-dark);
  206. }
  207. }
  208. }
  209. /* align loader */
  210. &.icon-loading-small:after {
  211. left: 22px;
  212. top: 22px;
  213. }
  214. /* hide deletion/collapse of subitems */
  215. &.deleted,
  216. &.collapsible:not(.open) {
  217. > ul {
  218. // NO ANIMATE because if not really hidden, we can still tab through it
  219. display: none;
  220. }
  221. }
  222. /* Second level nesting for lists */
  223. > ul {
  224. flex: 0 1 auto;
  225. width: 100%;
  226. position: relative;
  227. > li {
  228. display: inline-flex;
  229. flex-wrap: wrap;
  230. padding-left: var(--default-clickable-area);
  231. width: 100%;
  232. margin-bottom: 3px;
  233. &:hover,
  234. &:focus {
  235. &,
  236. > a {
  237. border-radius: var(--border-radius-element);
  238. background-color: var(--color-background-hover);
  239. }
  240. }
  241. &.active,
  242. a.selected {
  243. &,
  244. > a {
  245. border-radius: var(--border-radius-element);
  246. background-color: var(--color-primary-element-light);
  247. &:first-child > img {
  248. filter: var(--primary-invert-if-dark);
  249. }
  250. }
  251. }
  252. /* align loader */
  253. &.icon-loading-small:after {
  254. left: calc(var(--default-clickable-area) / 2);
  255. }
  256. > .app-navigation-entry-deleted {
  257. /* margin to keep active indicator visible */
  258. margin-left: 4px;
  259. padding-left: 84px;
  260. }
  261. > .app-navigation-entry-edit {
  262. /* margin to keep active indicator visible */
  263. margin-left: 4px;
  264. /* align the input correctly with the link text
  265. 44px+44px-4px-6px padding for the input */
  266. padding-left: calc(2 * var(--default-clickable-area) - 10px) !important;
  267. }
  268. }
  269. }
  270. }
  271. /* Menu and submenu */
  272. > li,
  273. > li > ul > li {
  274. position: relative;
  275. box-sizing: border-box;
  276. /* hide icons if loading */
  277. &.icon-loading-small {
  278. > a,
  279. > .app-navigation-entry-bullet {
  280. /* hide icon or bullet if loading state*/
  281. background: transparent !important;
  282. }
  283. }
  284. /* Main entry link */
  285. > a {
  286. background-size: 16px 16px;
  287. background-position: 14px center;
  288. background-repeat: no-repeat;
  289. display: block;
  290. justify-content: space-between;
  291. line-height: var(--default-clickable-area);
  292. min-height: var(--default-clickable-area);
  293. padding-block: 0;
  294. padding-inline: calc(2 * var(--default-grid-baseline));
  295. overflow: hidden;
  296. box-sizing: border-box;
  297. white-space: nowrap;
  298. text-overflow: ellipsis;
  299. border-radius: var(--border-radius-element);
  300. color: var(--color-main-text);
  301. flex: 1 1 0px;
  302. z-index: 100; /* above the bullet to allow click*/
  303. /* TODO: forbid using img as icon in menu? */
  304. &.svg {
  305. padding: 0 12px 0 var(--default-clickable-area);
  306. :focus-visible {
  307. padding: 0 8px 0 calc(var(--default-clickable-area) - 2px);
  308. }
  309. }
  310. &:first-child img {
  311. margin-right: calc(2 * var(--default-grid-baseline)) !important;
  312. width: 16px;
  313. height: 16px;
  314. // Legacy invert if bright background
  315. filter: var(--background-invert-if-dark);
  316. }
  317. /* counter can also be inside the link */
  318. > .app-navigation-entry-utils {
  319. display: inline-block;
  320. float: right;
  321. .app-navigation-entry-utils-counter {
  322. padding-right: 0 !important;
  323. }
  324. }
  325. }
  326. /* Bullet icon */
  327. > .app-navigation-entry-bullet {
  328. position: absolute;
  329. display: block;
  330. margin: 16px;
  331. width: 12px;
  332. height: 12px;
  333. border: none;
  334. border-radius: 50%;
  335. cursor: pointer;
  336. transition: background 100ms ease-in-out;
  337. + a {
  338. /* hide icon if bullet, can't have both */
  339. background: transparent !important;
  340. }
  341. }
  342. /* popover fix the flex positionning of the li parent */
  343. > .app-navigation-entry-menu {
  344. top: var(--default-clickable-area);
  345. }
  346. /* show edit/undo field if editing/deleted */
  347. &.editing .app-navigation-entry-edit {
  348. opacity: 1;
  349. z-index: 250;
  350. }
  351. &.deleted .app-navigation-entry-deleted {
  352. transform: translateX(0);
  353. z-index: 250;
  354. }
  355. }
  356. }
  357. &.hidden {
  358. display: none;
  359. }
  360. /**
  361. * Button styling for menu, edit and undo
  362. */
  363. .app-navigation-entry-utils .app-navigation-entry-utils-menu-button > button,
  364. .app-navigation-entry-deleted .app-navigation-entry-deleted-button {
  365. border: 0;
  366. opacity: 0.5;
  367. background-color: transparent;
  368. background-repeat: no-repeat;
  369. background-position: center;
  370. &:hover,
  371. &:focus {
  372. background-color: transparent;
  373. opacity: 1;
  374. }
  375. }
  376. /**
  377. * Collapsible menus
  378. */
  379. .collapsible {
  380. /* Fallback for old collapse button.
  381. TODO: to be removed. Leaved here for retro compatibility */
  382. .collapse {
  383. opacity: 0;
  384. position: absolute;
  385. width: var(--default-clickable-area);
  386. height: var(--default-clickable-area);
  387. margin: 0;
  388. z-index: 110;
  389. /* Needed for IE11; otherwise the button appears to the right of the
  390. * link. */
  391. left: 0;
  392. &:focus-visible {
  393. opacity: 1;
  394. border-width: 0;
  395. box-shadow: inset 0 0 0 2px var(--color-primary-element);
  396. background: none;
  397. }
  398. }
  399. &:before {
  400. position: absolute;
  401. height: var(--default-clickable-area);
  402. width: var(--default-clickable-area);
  403. margin: 0;
  404. padding: 0;
  405. background: none;
  406. @include icon-color('triangle-s', 'actions', variables.$color-black, 1, true);
  407. background-size: 16px;
  408. background-repeat: no-repeat;
  409. background-position: center;
  410. border: none;
  411. border-radius: 0;
  412. outline: none !important;
  413. box-shadow: none;
  414. content: ' ';
  415. opacity: 0;
  416. -webkit-transform: rotate(-90deg);
  417. -ms-transform: rotate(-90deg);
  418. transform: rotate(-90deg);
  419. z-index: 105; // above a, under button
  420. border-radius: 50%;
  421. transition: opacity variables.$animation-quick ease-in-out;
  422. }
  423. /* force padding on link no matter if 'a' has an icon class */
  424. > a:first-child {
  425. padding-left: var(--default-clickable-area);
  426. }
  427. &:hover,
  428. &:focus {
  429. &:before {
  430. opacity: 1;
  431. }
  432. > a {
  433. background-image: none;
  434. }
  435. > .app-navigation-entry-bullet {
  436. background: transparent !important;
  437. }
  438. }
  439. &.open {
  440. &:before {
  441. -webkit-transform: rotate(0);
  442. -ms-transform: rotate(0);
  443. transform: rotate(0);
  444. }
  445. }
  446. }
  447. /**
  448. * App navigation utils, buttons and counters for drop down menu
  449. */
  450. .app-navigation-entry-utils {
  451. flex: 0 1 auto;
  452. ul {
  453. display: flex !important;
  454. align-items: center;
  455. justify-content: flex-end;
  456. }
  457. li {
  458. width: var(--default-clickable-area) !important;
  459. height: var(--default-clickable-area);
  460. }
  461. button {
  462. height: 100%;
  463. width: 100%;
  464. margin: 0;
  465. box-shadow: none;
  466. }
  467. .app-navigation-entry-utils-menu-button {
  468. /* Prevent bg img override if an icon class is set */
  469. button:not([class^='icon-']):not([class*=' icon-']) {
  470. @include icon-color('more', 'actions', variables.$color-black, 1, true);
  471. }
  472. &:hover button,
  473. &:focus button {
  474. background-color: transparent;
  475. opacity: 1;
  476. }
  477. }
  478. .app-navigation-entry-utils-counter {
  479. overflow: hidden;
  480. text-align: right;
  481. font-size: 9pt;
  482. line-height: var(--default-clickable-area);
  483. padding: 0 12px; /* Same padding as all li > a in the app-navigation */
  484. &.highlighted {
  485. padding: 0;
  486. text-align: center;
  487. span {
  488. padding: 2px 5px;
  489. border-radius: 10px;
  490. background-color: var(--color-primary-element);
  491. color: var(--color-primary-element-text);
  492. }
  493. }
  494. }
  495. }
  496. /**
  497. * Editable entries
  498. */
  499. .app-navigation-entry-edit {
  500. padding-left: 5px;
  501. padding-right: 5px;
  502. display: block;
  503. width: calc(100% - 1px); /* Avoid border overlapping */
  504. transition: opacity 250ms ease-in-out;
  505. opacity: 0;
  506. position: absolute;
  507. background-color: var(--color-main-background);
  508. z-index: -1;
  509. form,
  510. div {
  511. display: inline-flex;
  512. width: 100%;
  513. }
  514. input {
  515. padding: 5px;
  516. margin-right: 0;
  517. height: 38px;
  518. &:hover,
  519. &:focus {
  520. /* overlapp borders */
  521. z-index: 1;
  522. }
  523. }
  524. input[type='text'] {
  525. width: 100%;
  526. min-width: 0; /* firefox hack: override auto */
  527. border-bottom-right-radius: 0;
  528. border-top-right-radius: 0;
  529. }
  530. button,
  531. input:not([type='text']) {
  532. width: 36px;
  533. height: 38px;
  534. flex: 0 0 36px;
  535. &:not(:last-child) {
  536. border-radius: 0 !important;
  537. }
  538. &:not(:first-child) {
  539. margin-left: -1px;
  540. }
  541. &:last-child {
  542. border-bottom-right-radius: var(--border-radius);
  543. border-top-right-radius: var(--border-radius);
  544. border-bottom-left-radius: 0;
  545. border-top-left-radius: 0;
  546. }
  547. }
  548. }
  549. /**
  550. * Deleted entries with undo button
  551. */
  552. .app-navigation-entry-deleted {
  553. display: inline-flex;
  554. padding-left: var(--default-clickable-area);
  555. transform: translateX(#{variables.$navigation-width});
  556. .app-navigation-entry-deleted-description {
  557. position: relative;
  558. white-space: nowrap;
  559. text-overflow: ellipsis;
  560. overflow: hidden;
  561. flex: 1 1 0px;
  562. line-height: var(--default-clickable-area);
  563. }
  564. .app-navigation-entry-deleted-button {
  565. margin: 0;
  566. height: var(--default-clickable-area);
  567. width: var(--default-clickable-area);
  568. line-height: var(--default-clickable-area);
  569. &:hover,
  570. &:focus {
  571. opacity: 1;
  572. }
  573. }
  574. }
  575. /**
  576. * Common rules for animation of undo and edit entries
  577. */
  578. .app-navigation-entry-edit,
  579. .app-navigation-entry-deleted {
  580. width: calc(100% - 1px); /* Avoid border overlapping */
  581. transition: transform 250ms ease-in-out,
  582. opacity 250ms ease-in-out,
  583. z-index 250ms ease-in-out;
  584. position: absolute;
  585. left: 0;
  586. background-color: var(--color-main-background);
  587. box-sizing: border-box;
  588. }
  589. /**
  590. * drag and drop
  591. */
  592. .drag-and-drop {
  593. -webkit-transition: padding-bottom 500ms ease 0s;
  594. transition: padding-bottom 500ms ease 0s;
  595. padding-bottom: 40px;
  596. }
  597. .error {
  598. color: var(--color-error);
  599. }
  600. .app-navigation-entry-utils ul,
  601. .app-navigation-entry-menu ul {
  602. list-style-type: none;
  603. }
  604. }
  605. /* CONTENT --------------------------------------------------------- */
  606. #content {
  607. box-sizing: border-box;
  608. position: static;
  609. margin: var(--body-container-margin);
  610. margin-top: 50px;
  611. padding: 0;
  612. display: flex;
  613. width: calc(100% - var(--body-container-margin) * 2);
  614. height: var(--body-height);
  615. border-radius: var(--body-container-radius);
  616. overflow: clip;
  617. &:not(.with-sidebar--full) {
  618. position: fixed;
  619. }
  620. }
  621. @media only screen and (max-width: variables.$breakpoint-mobile) {
  622. #content {
  623. border-top-left-radius: var(--border-radius-large);
  624. border-top-right-radius: var(--border-radius-large);
  625. }
  626. #app-navigation {
  627. border-top-left-radius: var(--border-radius-large);
  628. }
  629. #app-sidebar {
  630. border-top-right-radius: var(--border-radius-large);
  631. }
  632. }
  633. /* APP-CONTENT AND WRAPPER ------------------------------------------ */
  634. /* Part where the content will be loaded into */
  635. /**
  636. * !Important. We are defining the minimum requirement we want for flex
  637. * Just before the mobile breakpoint we have variables.$breakpoint-mobile (1024px) - variables.$navigation-width
  638. * -> 468px. In that case we want 200px for the list and 268px for the content
  639. */
  640. $min-content-width: variables.$breakpoint-mobile - variables.$navigation-width - variables.$list-min-width;
  641. #app-content {
  642. z-index: 1000;
  643. background-color: var(--color-main-background);
  644. flex-basis: 100vw;
  645. overflow: auto;
  646. position: initial;
  647. height: 100%;
  648. /* margin if navigation element is here */
  649. /* no top border for first settings item */
  650. > .section:first-child {
  651. border-top: none;
  652. }
  653. /* if app-content-list is present */
  654. #app-content-wrapper {
  655. display: flex;
  656. position: relative;
  657. align-items: stretch;
  658. /* make sure we have at least full height for loaders or such
  659. no need for list/details since we have a flex stretch */
  660. min-height: 100%;
  661. /* CONTENT DETAILS AFTER LIST*/
  662. .app-content-details {
  663. /* grow full width */
  664. flex: 1 1 $min-content-width;
  665. #app-navigation-toggle-back {
  666. display: none;
  667. }
  668. }
  669. }
  670. &::-webkit-scrollbar-button {
  671. height: var(--body-container-radius);
  672. }
  673. }
  674. /* APP-SIDEBAR ------------------------------------------------------------ */
  675. /*
  676. Sidebar: a sidebar to be used within #content
  677. #app-content will be shrinked properly
  678. */
  679. #app-sidebar {
  680. width: 27vw;
  681. min-width: variables.$sidebar-min-width;
  682. max-width: variables.$sidebar-max-width;
  683. display: block;
  684. position: -webkit-sticky;
  685. position: sticky;
  686. top: variables.$header-height;
  687. right:0;
  688. overflow-y: auto;
  689. overflow-x: hidden;
  690. z-index: 1500;
  691. opacity: 0.7px;
  692. height: calc(100vh - #{variables.$header-height});
  693. background: var(--color-main-background);
  694. border-left: 1px solid var(--color-border);
  695. flex-shrink: 0;
  696. // no animations possible, use OC.Apps.showAppSidebar
  697. &.disappear {
  698. display: none;
  699. }
  700. }
  701. /* APP-SETTINGS ------------------------------------------------------------ */
  702. /* settings area */
  703. #app-settings {
  704. // To the bottom w/ flex
  705. margin-top: auto;
  706. &.open,
  707. &.opened {
  708. #app-settings-content {
  709. display: block;
  710. }
  711. }
  712. }
  713. #app-settings-content {
  714. display: none;
  715. padding: calc(var(--default-grid-baseline) * 2);
  716. padding-top: 0;
  717. padding-left: calc(var(--default-grid-baseline) * 4);
  718. /* restrict height of settings and make scrollable */
  719. max-height: 300px;
  720. overflow-y: auto;
  721. box-sizing: border-box;
  722. /* display input fields at full width */
  723. input[type='text'] {
  724. width: 93%;
  725. }
  726. .info-text {
  727. padding: 5px 0 7px 22px;
  728. color: var(--color-text-lighter);
  729. }
  730. input {
  731. &[type='checkbox'],
  732. &[type='radio'] {
  733. &.radio,
  734. &.checkbox {
  735. + label {
  736. display: inline-block;
  737. width: 100%;
  738. padding: 5px 0;
  739. }
  740. }
  741. }
  742. }
  743. }
  744. #app-settings-header {
  745. box-sizing: border-box;
  746. background-color: transparent;
  747. overflow: hidden;
  748. border-radius: calc(var(--default-clickable-area) / 2);
  749. padding: calc(var(--default-grid-baseline) * 2);
  750. padding-top: 0;
  751. .settings-button {
  752. display: flex;
  753. align-items: center;
  754. height: var(--default-clickable-area);
  755. width: 100%;
  756. padding: 0;
  757. margin: 0;
  758. background-color: transparent;
  759. box-shadow: none;
  760. border: 0;
  761. border-radius: calc(var(--default-clickable-area) / 2);
  762. text-align: left;
  763. font-weight: normal;
  764. font-size: 100%;
  765. opacity: 0.8;
  766. /* like app-navigation a */
  767. color: var(--color-main-text);
  768. &.opened {
  769. border-top: solid 1px var(--color-border);
  770. background-color: var(--color-main-background);
  771. margin-top: 8px;
  772. }
  773. &:hover,
  774. &:focus {
  775. background-color: var(--color-background-hover);
  776. }
  777. &::before {
  778. background-image: var(--icon-settings-dark);
  779. background-position: 14px center;
  780. background-repeat: no-repeat;
  781. content: '';
  782. width: var(--default-clickable-area);
  783. height: var(--default-clickable-area);
  784. top: 0;
  785. left: 0;
  786. display: block;
  787. }
  788. &:focus-visible {
  789. box-shadow: 0 0 0 2px inset var(--color-primary-element) !important;
  790. background-position: 12px center;
  791. }
  792. }
  793. }
  794. /* GENERAL SECTION ------------------------------------------------------------ */
  795. .section {
  796. display: block;
  797. padding: 30px;
  798. margin-bottom: 24px;
  799. &.hidden {
  800. display: none !important;
  801. }
  802. /* slight position correction of checkboxes and radio buttons */
  803. input {
  804. &[type='checkbox'],
  805. &[type='radio'] {
  806. vertical-align: -2px;
  807. margin-right: 4px;
  808. }
  809. }
  810. }
  811. .sub-section {
  812. position: relative;
  813. margin-top: 10px;
  814. margin-left: 27px;
  815. margin-bottom: 10px;
  816. }
  817. .appear {
  818. opacity: 1;
  819. -webkit-transition: opacity 500ms ease 0s;
  820. -moz-transition: opacity 500ms ease 0s;
  821. -ms-transition: opacity 500ms ease 0s;
  822. -o-transition: opacity 500ms ease 0s;
  823. transition: opacity 500ms ease 0s;
  824. &.transparent {
  825. opacity: 0;
  826. }
  827. }
  828. /* TABS ------------------------------------------------------------ */
  829. .tabHeaders {
  830. display: flex;
  831. margin-bottom: 16px;
  832. .tabHeader {
  833. display: flex;
  834. flex-direction: column;
  835. flex-grow: 1;
  836. text-align: center;
  837. white-space: nowrap;
  838. overflow: hidden;
  839. text-overflow: ellipsis;
  840. cursor: pointer;
  841. color: var(--color-text-lighter);
  842. margin-bottom: 1px;
  843. padding: 5px;
  844. &.hidden {
  845. display: none;
  846. }
  847. /* Use same amount as sidebar padding */
  848. &:first-child {
  849. padding-left: 15px;
  850. }
  851. &:last-child {
  852. padding-right: 15px;
  853. }
  854. .icon {
  855. display: inline-block;
  856. width: 100%;
  857. height: 16px;
  858. background-size: 16px;
  859. vertical-align: middle;
  860. margin-top: -2px;
  861. margin-right: 3px;
  862. opacity: .7;
  863. cursor: pointer;
  864. }
  865. a {
  866. color: var(--color-text-lighter);
  867. margin-bottom: 1px;
  868. overflow: hidden;
  869. text-overflow: ellipsis;
  870. }
  871. &.selected {
  872. font-weight: bold;
  873. }
  874. &.selected,
  875. &:hover,
  876. &:focus {
  877. margin-bottom: 0px;
  878. color: var(--color-main-text);
  879. border-bottom: 1px solid var(--color-text-lighter);
  880. }
  881. }
  882. }
  883. .tabsContainer {
  884. clear: left;
  885. .tab {
  886. padding: 0 15px 15px;
  887. }
  888. }
  889. /* POPOVER MENU ------------------------------------------------------------ */
  890. $popoveritem-height: 34px;
  891. $popovericon-size: 16px;
  892. $outter-margin: math.div($popoveritem-height - $popovericon-size, 2);
  893. .v-popper__inner div.open > ul {
  894. > li > a > span.action-link__icon,
  895. > li > a > span.action-router__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-element);
  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% - var(--default-clickable-area));
  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. }