inputs.scss 20 KB

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