apps.scss 28 KB

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