You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

inputs.scss 22KB

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