1
0

inputs.scss 20 KB

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