You are here

autocomplete-loading.module.css in Drupal 10

Visual styles for animated throbber.

See also

autocomplete.js

File

core/themes/claro/css/components/autocomplete-loading.module.css
View source
  1. /*
  2. * DO NOT EDIT THIS FILE.
  3. * See the following change record for more information,
  4. * https://www.drupal.org/node/3084859
  5. * @preserve
  6. */
  7. /**
  8. * @file
  9. * Visual styles for animated throbber.
  10. *
  11. * @see autocomplete.js
  12. */
  13. /**
  14. * Since the autocomplete library is attached conditionally and not globally,
  15. * we can be 99% sure that the default icon will be used.
  16. * With inline SVGs we can prevent a HTTP request and repaint addressing the
  17. * autocomplete input's background — until are sure that it will be pushed by
  18. * the server with HTTP/2.
  19. *
  20. * The autocompleting (active) state's background-image is inlined because
  21. * non-used CSS selectors are usually ignored; popular browsers don't download
  22. * their 'url' references.
  23. * If these selectors become active, the browser needs some time for painting
  24. * previously ignored remote asset: it should get it from server, parse it and
  25. * repaint the background of autocomplete field. With the inlined background we
  26. * can prevent an additional timeout caused by a new request/response pair.
  27. * Besides this, the autocompleting event itself may easily finish before the
  28. * missing asset gets downloaded/parsed/painted, and the missing instant visual
  29. * feedback would be a usability/accessibility issue as well.
  30. */
  31. .js .form-autocomplete {
  32. background-image: url("data:image/svg+xml,%3csvg width='40' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8 1C3.46.827-.188 5.787 1.313 10.068c1.176 4.384 6.993 6.417 10.637 3.7.326-.39.565.276.846.442l3.74 3.739 1.413-1.414-4.35-4.35c2.811-3.468 1.15-9.247-3.062-10.71A7.003 7.003 0 008 1zm0 2c3.242-.123 5.849 3.42 4.777 6.477-.842 3.132-4.994 4.58-7.6 2.65-2.745-1.73-2.9-6.125-.285-8.044A5.006 5.006 0 018 3z' fill='%23868686'/%3e%3c/svg%3e");
  33. background-repeat: no-repeat;
  34. background-position: 100% 50%;
  35. }
  36. .js .form-autocomplete::-ms-clear {
  37. display: none;
  38. }
  39. .js[dir="rtl"] .form-autocomplete {
  40. background-image: url("data:image/svg+xml,%3csvg width='40' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 1c4.54-.173 8.188 4.787 6.687 9.068-1.176 4.384-6.993 6.417-10.637 3.7-.326-.39-.565.276-.846.442l-3.74 3.739-1.413-1.414 4.35-4.35C3.59 8.717 5.25 2.938 9.462 1.475A7.003 7.003 0 0112 1zm0 2c-3.242-.123-5.849 3.42-4.777 6.477.842 3.132 4.994 4.58 7.6 2.65 2.745-1.73 2.9-6.125.285-8.044A5.006 5.006 0 0012 3z' fill='%23868686'/%3e%3c/svg%3e");
  41. background-position: 0 50%;
  42. }
  43. .js .form-autocomplete.is-autocompleting {
  44. background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' height='20' width='40'%3e%3cstyle%3e%40keyframes s%7b0%25%7btransform:rotate(0deg) translate(-50%25,-50%25)%7d50%25%7btransform:rotate(430deg) translate(-50%25,-50%25);stroke-dashoffset:20%7dto%7btransform:rotate(720deg) translate(-50%25,-50%25)%7d%7d%3c/style%3e%3ccircle fill='none' cy='5' cx='5' stroke='%23003ecc' stroke-dashoffset='6.125' stroke-dasharray='25' style='animation:s 1s linear infinite' r='4'/%3e%3c/svg%3e");
  45. }
  46. .js[dir="rtl"] .form-autocomplete.is-autocompleting {
  47. background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' height='20' width='40'%3e%3cstyle%3e%40keyframes s%7b0%25%7btransform:rotate(0deg) translate(-50%25,-50%25)%7d50%25%7btransform:rotate(-430deg) translate(-50%25,-50%25);stroke-dashoffset:20%7dto%7btransform:rotate(-720deg) translate(-50%25,-50%25)%7d%7d%3c/style%3e%3ccircle fill='none' cy='5' cx='5' stroke='%23003ecc' stroke-dashoffset='6.125' stroke-dasharray='25' style='animation:s 1s linear infinite' r='4'/%3e%3c/svg%3e");
  48. }
  49. /* IE11 does not animate inline SVG. */
  50. /* stylelint-disable-next-line selector-type-no-unknown */
  51. _:-ms-fullscreen,
  52. .js .form-autocomplete.is-autocompleting {
  53. background-image: url("../../images/spinner-ltr.gif");
  54. background-size: 2.5rem 1.25rem;
  55. }
  56. /* stylelint-disable-next-line selector-type-no-unknown */
  57. _:-ms-fullscreen,
  58. .js[dir="rtl"] .form-autocomplete.is-autocompleting {
  59. background-image: url("../../images/spinner-rtl.gif");
  60. }
  61. /**
  62. * Autocomplete wrapper for autocompleting message.
  63. */
  64. .claro-autocomplete {
  65. position: relative;
  66. display: inline-block;
  67. max-width: 100%;
  68. }
  69. .claro-autocomplete__message {
  70. position: absolute;
  71. right: 0;
  72. bottom: 100%;
  73. max-width: 100%;
  74. margin-bottom: 0.15rem;
  75. color: var(--color-link);
  76. font-size: var(--font-size-xxs); /* ~11px */
  77. font-weight: bold;
  78. line-height: calc(18rem / 16); /* 18px */
  79. }
  80. [dir="rtl"] .claro-autocomplete__message {
  81. right: auto;
  82. left: 0;
  83. }