inputs.scss 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919
  1. /**
  2. * @copyright Copyright (c) 2016, John Molakvoæ <skjnldsv@protonmail.com>
  3. * @copyright Copyright (c) 2016, Morris Jobke <hey@morrisjobke.de>
  4. * @copyright Copyright (c) 2016, Joas Schilling <coding@schilljs.com>
  5. * @copyright Copyright (c) 2016, Julius Haertl <jus@bitgrid.net>
  6. * @copyright Copyright (c) 2016, jowi <sjw@gmx.ch>
  7. * @copyright Copyright (c) 2015, Joas Schilling <nickvergessen@owncloud.com>
  8. * @copyright Copyright (c) 2015, Hendrik Leppelsack <hendrik@leppelsack.de>
  9. * @copyright Copyright (c) 2014-2017, Jan-Christoph Borchardt <hey@jancborchardt.net>
  10. *
  11. * @license GNU AGPL version 3 or any later version
  12. *
  13. */
  14. /* Specifically override browser styles */
  15. input, textarea, select, button, div[contenteditable=true], div[contenteditable=false] {
  16. font-family: var(--font-face);
  17. }
  18. .select2-container-multi .select2-choices .select2-search-field input, .select2-search input, .ui-widget {
  19. font-family: var(--font-face) !important;
  20. }
  21. /* Simple selector to allow easy overriding */
  22. select,
  23. button,
  24. input,
  25. textarea,
  26. div[contenteditable=true],
  27. div[contenteditable=false] {
  28. width: 130px;
  29. min-height: 32px;
  30. box-sizing: border-box;
  31. }
  32. /**
  33. * color-text-lighter normal state
  34. * color-text-lighter active state
  35. * color-text-maxcontrast disabled state
  36. */
  37. /* Default global values */
  38. div.select2-drop .select2-search input, // TODO: REMOVE WHEN DROPPING SELECT2
  39. select,
  40. button, .button,
  41. input:not([type='range']),
  42. textarea,
  43. div[contenteditable=true],
  44. .pager li a {
  45. margin: 3px 3px 3px 0;
  46. padding: 7px 6px;
  47. font-size: 13px;
  48. background-color: var(--color-main-background);
  49. color: var(--color-text-lighter);
  50. border: 1px solid var(--color-border-dark);
  51. outline: none;
  52. border-radius: var(--border-radius);
  53. cursor: text;
  54. &:not(:disabled):not(.primary) {
  55. &:hover,
  56. &:focus,
  57. &.active {
  58. /* active class used for multiselect */
  59. border-color: var(--color-primary-element);
  60. outline: none;
  61. }
  62. &:active {
  63. outline: none;
  64. background-color: var(--color-main-background);
  65. color: var(--color-text-light);
  66. }
  67. }
  68. &:disabled {
  69. background-color: var(--color-background-dark);
  70. color: var(--color-text-maxcontrast);
  71. cursor: default;
  72. opacity: 0.5;
  73. }
  74. &:required {
  75. box-shadow: none;
  76. }
  77. &:invalid {
  78. box-shadow: none !important;
  79. border-color: var(--color-error);
  80. }
  81. /* Primary action button, use sparingly */
  82. &.primary {
  83. background-color: var(--color-primary-element);
  84. border-color: var(--color-primary-element);
  85. color: var(--color-primary-text);
  86. cursor: pointer;
  87. /* Apply border to primary button if on log in page (and not in a dark container) or if in header */
  88. #body-login :not(.body-login-container) &,
  89. #header & {
  90. border-color: var(--color-primary-text);
  91. }
  92. &:not(:disabled) {
  93. &:hover,
  94. &:focus,
  95. &:active {
  96. background-color: var(--color-primary-element-light);
  97. border-color: var(--color-primary-element-light);
  98. }
  99. &:active {
  100. color: var(--color-primary-text-dark);
  101. }
  102. }
  103. &:disabled {
  104. // opacity is already defined to .5 if disabled
  105. background-color: var(--color-primary-element);
  106. color: var(--color-primary-text-dark);
  107. cursor: default;
  108. }
  109. }
  110. }
  111. div[contenteditable=false] {
  112. margin: 3px 3px 3px 0;
  113. padding: 7px 6px;
  114. font-size: 13px;
  115. background-color: var(--color-main-background);
  116. color: var(--color-text-lighter);
  117. border: 1px solid var(--color-background-darker);
  118. outline: none;
  119. border-radius: var(--border-radius);
  120. cursor: text;
  121. background-color: var(--color-background-dark);
  122. color: var(--color-text-lighter);
  123. cursor: default;
  124. opacity: 0.5;
  125. }
  126. /* Specific override */
  127. input {
  128. &:not([type='radio']):not([type='checkbox']):not([type='range']):not([type='submit']):not([type='button']):not([type='reset']):not([type='color']):not([type='file']):not([type='image']) {
  129. -webkit-appearance: textfield;
  130. -moz-appearance: textfield;
  131. }
  132. &[type='radio'],
  133. &[type='checkbox'],
  134. &[type='file'],
  135. &[type='image'] {
  136. height: auto;
  137. width: auto;
  138. }
  139. /* Color input doesn't respect the initial height
  140. so we need to set a custom one */
  141. &[type='color'] {
  142. margin: 3px;
  143. padding: 0 2px;
  144. min-height: 30px;
  145. width: 40px;
  146. cursor: pointer;
  147. }
  148. &[type='hidden'] {
  149. height: 0;
  150. width: 0;
  151. }
  152. &[type='time'] {
  153. width: initial;
  154. }
  155. }
  156. /* 'Click' inputs */
  157. select,
  158. button, .button,
  159. input[type='button'],
  160. input[type='submit'],
  161. input[type='reset'] {
  162. padding: 6px 12px;
  163. width: auto;
  164. min-height: 34px;
  165. cursor: pointer;
  166. box-sizing: border-box;
  167. background-color: var(--color-background-dark);
  168. }
  169. /* Buttons */
  170. button, .button,
  171. input[type='button'],
  172. input[type='submit'],
  173. input[type='reset'] {
  174. font-weight: bold;
  175. border-radius: var(--border-radius-pill);
  176. /* Get rid of the inside dotted line in Firefox */
  177. &::-moz-focus-inner {
  178. border: 0;
  179. }
  180. }
  181. button, .button {
  182. > span {
  183. /* icon position inside buttons */
  184. &[class^='icon-'],
  185. &[class*=' icon-'] {
  186. display: inline-block;
  187. vertical-align: text-bottom;
  188. opacity: 0.5;
  189. }
  190. }
  191. }
  192. textarea, div[contenteditable=true] {
  193. color: var(--color-main-text);
  194. cursor: text;
  195. font-family: inherit;
  196. height: auto;
  197. &:not(:disabled) {
  198. &:active,
  199. &:hover,
  200. &:focus {
  201. border-color: var(--color-background-darker) !important;
  202. background-color: var(--color-main-background) !important;
  203. }
  204. }
  205. }
  206. div[contenteditable=false] {
  207. color: var(--color-text-lighter);
  208. cursor: text;
  209. font-family: inherit;
  210. height: auto;
  211. }
  212. /* Override the ugly select arrow */
  213. select {
  214. -webkit-appearance: none;
  215. -moz-appearance: none;
  216. appearance: none;
  217. background: var(--icon-triangle-s-000) no-repeat right 4px center;
  218. background-color: inherit;
  219. outline: 0;
  220. padding-right: 24px !important;
  221. }
  222. /* Confirm inputs */
  223. input {
  224. &[type='text'],
  225. &[type='password'],
  226. &[type='email'] {
  227. + .icon-confirm {
  228. margin-left: -8px !important;
  229. border-left-color: transparent !important;
  230. border-radius: 0 var(--border-radius) var(--border-radius) 0 !important;
  231. background-clip: padding-box;
  232. /* Avoid background under border */
  233. background-color: var(--color-main-background) !important;
  234. opacity: 1;
  235. width: 34px;
  236. padding: 7px 6px;
  237. cursor: pointer;
  238. margin-right: 0;
  239. &:disabled {
  240. cursor: default;
  241. @include icon-color('confirm-fade', 'actions', $color-black, 2, true);
  242. }
  243. }
  244. /* only show confirm borders if input is not focused */
  245. &:not(:active):not(:hover):not(:focus){
  246. &:invalid {
  247. + .icon-confirm {
  248. border-color: var(--color-error);
  249. }
  250. }
  251. + .icon-confirm {
  252. &:active,
  253. &:hover,
  254. &:focus {
  255. border-color: var(--color-primary-element) !important;
  256. border-radius: var(--border-radius) !important;
  257. &:disabled {
  258. border-color: var(--color-background-darker) !important;
  259. }
  260. }
  261. }
  262. }
  263. &:active,
  264. &:hover,
  265. &:focus {
  266. + .icon-confirm {
  267. border-color: var(--color-primary-element) !important;
  268. border-left-color: transparent !important;
  269. /* above previous input */
  270. z-index: 2;
  271. }
  272. }
  273. }
  274. }
  275. /* Various Fixes */
  276. button img,
  277. .button img {
  278. cursor: pointer;
  279. }
  280. select,
  281. .button.multiselect {
  282. font-weight: normal;
  283. }
  284. /* Radio & Checkboxes */
  285. $color-checkbox-radio-disabled: nc-darken($color-main-background, 27%);
  286. $color-checkbox-radio-border: nc-darken($color-main-background, 47%);
  287. input {
  288. &[type='checkbox'],
  289. &[type='radio'] {
  290. &.radio,
  291. &.checkbox {
  292. position: absolute;
  293. left: -10000px;
  294. top: auto;
  295. width: 1px;
  296. height: 1px;
  297. overflow: hidden;
  298. + label {
  299. user-select: none;
  300. }
  301. &:disabled + label,
  302. &:disabled + label:before {
  303. cursor: default;
  304. }
  305. + label:before {
  306. content: '';
  307. display: inline-block;
  308. height: 12px;
  309. width: 12px;
  310. vertical-align: middle;
  311. border-radius: 50%;
  312. margin: 3px;
  313. margin-top: 1px;
  314. border: 1px solid $color-checkbox-radio-border;
  315. }
  316. &:not(:disabled):not(:checked) + label:hover:before,
  317. &:focus + label:before {
  318. border-color: var(--color-primary-element);
  319. }
  320. &:checked + label:before,
  321. &.checkbox:indeterminate + label:before {
  322. /* ^ :indeterminate have a strange behavior on radio,
  323. so we respecified the checkbox class again to be safe */
  324. box-shadow: inset 0px 0px 0px 2px var(--color-main-background);
  325. background-color: var(--color-primary-element);
  326. border-color: var(--color-primary-element);
  327. }
  328. &:disabled + label:before {
  329. border: 1px solid $color-checkbox-radio-border;
  330. background-color: $color-checkbox-radio-disabled !important; /* override other status */
  331. }
  332. &:checked:disabled + label:before {
  333. background-color: $color-checkbox-radio-disabled;
  334. }
  335. // Detail description below label of checkbox or radio button
  336. & + label ~ em {
  337. display: inline-block;
  338. margin-left: 18px;
  339. }
  340. & + label ~ em:last-of-type {
  341. margin-bottom: 12px;
  342. }
  343. }
  344. &.checkbox {
  345. + label:before {
  346. border-radius: 1px;
  347. height: 10px;
  348. width: 10px;
  349. box-shadow: none !important;
  350. background-position: center;
  351. }
  352. &:checked + label:before {
  353. background-image: url('../img/actions/checkbox-mark.svg');
  354. }
  355. &:indeterminate + label:before {
  356. background-image: url('../img/actions/checkbox-mixed.svg');
  357. }
  358. }
  359. /* We do not use the nc-darken function as this is not supposed to be changed */
  360. $color-checkbox-radio-white: #fff;
  361. &.radio--white,
  362. &.checkbox--white {
  363. + label:before,
  364. &:focus + label:before {
  365. border-color: darken($color-checkbox-radio-white, 27%);
  366. }
  367. &:not(:disabled):not(:checked) + label:hover:before {
  368. border-color: $color-checkbox-radio-white;
  369. }
  370. &:checked + label:before {
  371. box-shadow: inset 0px 0px 0px 2px var(--color-main-background);
  372. background-color: darken($color-checkbox-radio-white, 14%);
  373. border-color: darken($color-checkbox-radio-white, 14%);
  374. }
  375. &:disabled + label:before {
  376. background-color: darken($color-checkbox-radio-white, 27%) !important; /* override other status */
  377. border-color: rgba($color-checkbox-radio-white, 0.4) !important; /* override other status */
  378. }
  379. &:checked:disabled + label:before {
  380. box-shadow: inset 0px 0px 0px 2px var(--color-main-background);
  381. border-color: rgba($color-checkbox-radio-white, 0.4) !important; /* override other status */
  382. background-color: darken($color-checkbox-radio-white, 27%);
  383. }
  384. }
  385. &.checkbox--white {
  386. &:checked + label:before,
  387. &:indeterminate + label:before {
  388. background-color: transparent !important; /* Override default checked */
  389. border-color: $color-checkbox-radio-white !important; /* Override default checked */
  390. background-image: url('../img/actions/checkbox-mark-white.svg');
  391. }
  392. &:indeterminate + label:before {
  393. background-image: url('../img/actions/checkbox-mixed-white.svg');
  394. }
  395. &:disabled + label:before {
  396. opacity: 0.7; /* No other choice for white background image */
  397. }
  398. }
  399. }
  400. }
  401. /* Select2 overriding. Merged to core with vendor stylesheet */
  402. div.select2-drop {
  403. margin-top: -2px;
  404. background-color: var(--color-main-background);
  405. &.select2-drop-active {
  406. border-color: var(--color-border-dark);
  407. }
  408. .avatar {
  409. display: inline-block;
  410. margin-right: 8px;
  411. vertical-align: middle;
  412. img {
  413. cursor: pointer;
  414. }
  415. }
  416. .select2-search input {
  417. min-height: auto;
  418. background: var(--icon-search-000) no-repeat right center !important;
  419. background-origin: content-box !important;
  420. }
  421. .select2-results {
  422. max-height: 250px;
  423. margin: 0;
  424. padding: 0;
  425. .select2-result-label {
  426. white-space: nowrap;
  427. overflow: hidden;
  428. text-overflow: ellipsis;
  429. span {
  430. cursor: pointer;
  431. }
  432. }
  433. .select2-result,
  434. .select2-no-results,
  435. .select2-searching {
  436. position: relative;
  437. display: list-item;
  438. padding: 12px;
  439. background-color: transparent;
  440. cursor: pointer;
  441. color: var(--color-text-lighter);
  442. }
  443. .select2-result {
  444. &.select2-selected {
  445. background-color: var(--color-background-dark);
  446. }
  447. }
  448. .select2-highlighted {
  449. background-color: var(--color-background-dark);
  450. color: var(--color-main-text);
  451. }
  452. }
  453. }
  454. .select2-chosen,
  455. #select2-drop {
  456. .avatar,
  457. .avatar img {
  458. cursor: pointer;
  459. }
  460. }
  461. div.select2-container-multi {
  462. .select2-choices,
  463. &.select2-container-active .select2-choices {
  464. box-shadow: none;
  465. white-space: nowrap;
  466. text-overflow: ellipsis;
  467. background: var(--color-main-background);
  468. color: var(--color-text-lighter) !important;
  469. box-sizing: content-box;
  470. border-radius: var(--border-radius);
  471. border: 1px solid var(--color-border-dark);
  472. margin: 0;
  473. padding: 2px 0;
  474. min-height: auto;
  475. .select2-search-choice {
  476. line-height: 20px;
  477. padding-left: 5px;
  478. &.select2-search-choice-focus,
  479. &:hover,
  480. &:active,
  481. & {
  482. background-image: none;
  483. background-color: var(--color-main-background);
  484. color: var(--color-text-lighter);
  485. border: 1px solid var(--color-border-dark);
  486. }
  487. .select2-search-choice-close {
  488. display: none;
  489. }
  490. }
  491. .select2-search-field input {
  492. line-height: 20px;
  493. &.select2-active {
  494. background: none !important;
  495. }
  496. }
  497. }
  498. }
  499. div.select2-container {
  500. margin: 3px 3px 3px 0;
  501. &.select2-container-multi .select2-choices {
  502. display: flex;
  503. flex-wrap: wrap;
  504. li {
  505. float: none;
  506. }
  507. }
  508. a.select2-choice {
  509. box-shadow: none;
  510. white-space: nowrap;
  511. text-overflow: ellipsis;
  512. background: var(--color-main-background);
  513. color: var(--color-text-lighter) !important;
  514. box-sizing: content-box;
  515. border-radius: var(--border-radius);
  516. border: 1px solid var(--color-border-dark);
  517. margin: 0;
  518. padding: 2px 0;
  519. padding-left: 6px;
  520. min-height: auto;
  521. .select2-search-choice {
  522. line-height: 20px;
  523. padding-left: 5px;
  524. background-image: none;
  525. background-color: var(--color-background-dark);
  526. border-color: var(--color-background-dark);
  527. .select2-search-choice-close {
  528. display: none;
  529. }
  530. &.select2-search-choice-focus,
  531. &:hover {
  532. background-color: var(--color-border);
  533. border-color: var(--color-border);
  534. }
  535. }
  536. .select2-arrow {
  537. background: none;
  538. border-radius: 0;
  539. border: none;
  540. b {
  541. background: var(--icon-triangle-s-000) no-repeat center !important;
  542. opacity: .5;
  543. }
  544. }
  545. &:hover .select2-arrow b,
  546. &:focus .select2-arrow b,
  547. &:active .select2-arrow b {
  548. opacity: .7;
  549. }
  550. .select2-search-field input {
  551. line-height: 20px;
  552. }
  553. }
  554. }
  555. /* Vue v-select */
  556. .v-select {
  557. margin: 3px 3px 3px 0;
  558. display: inline-block;
  559. .dropdown-toggle {
  560. display: flex !important;
  561. flex-wrap: wrap;
  562. .selected-tag {
  563. line-height: 20px;
  564. padding-left: 5px;
  565. background-image: none;
  566. background-color: var(--color-main-background);
  567. color: var(--color-text-lighter);
  568. border: 1px solid var(--color-border-dark);
  569. display: inline-flex;
  570. align-items: center;
  571. .close {
  572. margin-left: 3px;
  573. }
  574. }
  575. }
  576. .dropdown-menu {
  577. padding: 0;
  578. li {
  579. padding: 5px;
  580. position: relative;
  581. display: list-item;
  582. background-color: transparent;
  583. cursor: pointer;
  584. color: var(--color-text-lighter);
  585. a {
  586. white-space: nowrap;
  587. overflow: hidden;
  588. text-overflow: ellipsis;
  589. height: 25px;
  590. padding: 3px 7px 4px 2px;
  591. margin: 0;
  592. cursor: pointer;
  593. min-height: 1em;
  594. -webkit-touch-callout: none;
  595. -webkit-user-select: none;
  596. -moz-user-select: none;
  597. -ms-user-select: none;
  598. user-select: none;
  599. display: inline-flex;
  600. align-items: center;
  601. background-color: transparent !important;
  602. color: inherit !important;
  603. &::before {
  604. content: ' ';
  605. background-image: var(--icon-checkmark-000);
  606. background-repeat: no-repeat;
  607. background-position: center;
  608. min-width: 16px;
  609. min-height: 16px;
  610. display: block;
  611. opacity: 0.5;
  612. margin-right: 5px;
  613. visibility: hidden;
  614. }
  615. }
  616. &.highlight {
  617. color: var(--color-main-text);
  618. }
  619. &.active > a {
  620. background-color: var(--color-background-dark);
  621. color: var(--color-main-text);
  622. &::before {
  623. visibility: visible;
  624. }
  625. }
  626. }
  627. }
  628. }
  629. /* Vue multiselect */
  630. .multiselect.multiselect-vue {
  631. margin: 1px 2px;
  632. padding: 0 !important;
  633. display: inline-block;
  634. width: 160px;
  635. position: relative;
  636. background-color: var(--color-main-background);
  637. &.multiselect--active {
  638. /* Opened: force display the input */
  639. input.multiselect__input {
  640. opacity: 1 !important;
  641. cursor: text !important;
  642. }
  643. }
  644. &.multiselect--disabled,
  645. &.multiselect--disabled .multiselect__single {
  646. background-color: var(--color-background-dark) !important;
  647. }
  648. .multiselect__tags {
  649. /* space between tags and limit tag */
  650. $space-between: 5px;
  651. display: flex;
  652. flex-wrap: nowrap;
  653. overflow: hidden;
  654. border: 1px solid var(--color-border-dark);
  655. cursor: pointer;
  656. position: relative;
  657. border-radius: var(--border-radius);
  658. height: 34px;
  659. /* tag wrapper */
  660. .multiselect__tags-wrap {
  661. align-items: center;
  662. display: inline-flex;
  663. overflow: hidden;
  664. max-width: 100%;
  665. position: relative;
  666. padding: 3px $space-between;
  667. flex-grow: 1;
  668. /* no tags or simple select? Show input directly
  669. input is used to display single value */
  670. &:empty ~ input.multiselect__input {
  671. opacity: 1 !important;
  672. /* hide default empty text, show input instead */
  673. + span:not(.multiselect__single) {
  674. display: none;
  675. }
  676. }
  677. /* selected tag */
  678. .multiselect__tag {
  679. flex: 1 0 0;
  680. line-height: 20px;
  681. padding: 1px 5px;
  682. background-image: none;
  683. color: var(--color-text-lighter);
  684. border: 1px solid var(--color-border-dark);
  685. display: inline-flex;
  686. align-items: center;
  687. border-radius: var(--border-radius);
  688. /* require to override the default width
  689. and force the tag to shring properly */
  690. min-width: 0;
  691. max-width: 50%;
  692. max-width: fit-content;
  693. max-width: -moz-fit-content;
  694. /* css hack, detect if more than two tags
  695. if so, flex-basis is set to half */
  696. &:only-child {
  697. flex: 0 1 auto;
  698. }
  699. &:not(:last-child) {
  700. margin-right: $space-between;
  701. }
  702. /* ellipsis the groups to be sure
  703. we display at least two of them */
  704. > span {
  705. white-space: nowrap;
  706. text-overflow: ellipsis;
  707. overflow: hidden;
  708. }
  709. }
  710. }
  711. /* Single select default value */
  712. .multiselect__single {
  713. padding: 8px 10px;
  714. flex: 0 0 100%;
  715. z-index: 1; /* above input */
  716. background-color: var(--color-main-background);
  717. cursor: pointer;
  718. line-height: 17px;
  719. }
  720. /* displayed text if tag limit reached */
  721. .multiselect__strong,
  722. .multiselect__limit {
  723. flex: 0 0 auto;
  724. line-height: 20px;
  725. color: var(--color-text-lighter);
  726. display: inline-flex;
  727. align-items: center;
  728. opacity: .7;
  729. margin-right: $space-between;
  730. /* above the input */
  731. z-index: 5;
  732. }
  733. /* default multiselect input for search and placeholder */
  734. input.multiselect__input {
  735. width: 100% !important;
  736. position: absolute !important;
  737. margin: 0;
  738. opacity: 0;
  739. /* let's leave it on top of tags but hide it */
  740. height: 100%;
  741. border: none;
  742. /* override hide to force show the placeholder */
  743. display: block !important;
  744. /* only when not active */
  745. cursor: pointer;
  746. }
  747. }
  748. /* results wrapper */
  749. .multiselect__content-wrapper {
  750. position: absolute;
  751. width: 100%;
  752. margin-top: -1px;
  753. border: 1px solid var(--color-border-dark);
  754. background: var(--color-main-background);
  755. z-index: 50;
  756. max-height: 175px !important; // 5 items and a half
  757. overflow-y: auto;
  758. .multiselect__content {
  759. width: 100%;
  760. padding: 5px 0;
  761. }
  762. li {
  763. padding: 5px;
  764. position: relative;
  765. display: flex;
  766. align-items: center;
  767. background-color: transparent;
  768. &,
  769. span {
  770. cursor: pointer;
  771. }
  772. > span {
  773. white-space: nowrap;
  774. overflow: hidden;
  775. text-overflow: ellipsis;
  776. height: 20px;
  777. margin: 0;
  778. min-height: 1em;
  779. -webkit-touch-callout: none;
  780. -webkit-user-select: none;
  781. -moz-user-select: none;
  782. -ms-user-select: none;
  783. user-select: none;
  784. display: inline-flex;
  785. align-items: center;
  786. background-color: transparent !important;
  787. color: var(--color-text-lighter);
  788. width: 100%;
  789. /* selected checkmark icon */
  790. &::before {
  791. content: ' ';
  792. background-image: var(--icon-checkmark-000);
  793. background-repeat: no-repeat;
  794. background-position: center;
  795. min-width: 16px;
  796. min-height: 16px;
  797. display: block;
  798. opacity: .5;
  799. margin-right: 5px;
  800. visibility: hidden;
  801. }
  802. &.multiselect__option--disabled {
  803. background-color: var(--color-background-dark);
  804. opacity: .5;
  805. }
  806. /* add the prop tag-placeholder="create" to add the +
  807. * icon on top of an unknown-and-ready-to-be-created entry
  808. */
  809. &[data-select='create'] {
  810. &::before {
  811. background-image: var(--icon-add-000);
  812. visibility: visible;
  813. }
  814. }
  815. &.multiselect__option--highlight {
  816. color: var(--color-main-text);
  817. }
  818. &:not(.multiselect__option--disabled):hover::before {
  819. opacity: .3;
  820. }
  821. &.multiselect__option--selected,
  822. &:not(.multiselect__option--disabled):hover {
  823. &::before {
  824. visibility: visible;
  825. }
  826. }
  827. }
  828. }
  829. }
  830. }
  831. /* Progressbar */
  832. progress {
  833. display: block;
  834. width: 100%;
  835. padding: 0;
  836. border: 0 none;
  837. background-color: var(--color-background-dark);
  838. border-radius: var(--border-radius);
  839. flex-basis: 100%;
  840. height: 5px;
  841. overflow: hidden;
  842. &.warn {
  843. &::-moz-progress-bar {
  844. background: var(--color-error);
  845. }
  846. &::-webkit-progress-value {
  847. background: var(--color-error);
  848. }
  849. }
  850. &::-webkit-progress-bar {
  851. background: transparent;
  852. }
  853. &::-moz-progress-bar {
  854. border-radius: var(--border-radius);
  855. background: var(--color-primary);
  856. transition: 250ms all ease-in-out;
  857. }
  858. &::-webkit-progress-value {
  859. border-radius: var(--border-radius);
  860. background: var(--color-primary);
  861. transition: 250ms all ease-in-out;
  862. }
  863. }
  864. /* Animation */
  865. @keyframes shake {
  866. 10%,
  867. 90% {
  868. transform: translate(-1px);
  869. }
  870. 20%,
  871. 80% {
  872. transform: translate(2px);
  873. }
  874. 30%,
  875. 50%,
  876. 70% {
  877. transform: translate(-4px);
  878. }
  879. 40%,
  880. 60% {
  881. transform: translate(4px);
  882. }
  883. }
  884. .shake {
  885. animation-name: shake;
  886. animation-duration: .7s;
  887. animation-timing-function: ease-out;
  888. }