apps.scss 27 KB

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