inputs.scss 21 KB

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