1
0

inputs.scss 20 KB

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