_awesomplete.scss 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. #conversejs {
  2. [hidden] { display: none; }
  3. .visually-hidden {
  4. position: absolute;
  5. clip: rect(0, 0, 0, 0);
  6. }
  7. .form-group {
  8. .suggestion-box,
  9. .awesomplete {
  10. width: 100%;
  11. }
  12. }
  13. .suggestion-box,
  14. .awesomplete {
  15. position: relative;
  16. mark {
  17. background: $lightest-red;
  18. }
  19. > input {
  20. display: block;
  21. }
  22. .suggestion-box__results,
  23. > ul {
  24. &:before {
  25. content: "";
  26. position: absolute;
  27. top: -.43em;
  28. left: 1em;
  29. width: 0; height: 0;
  30. padding: .4em;
  31. background: white;
  32. border: inherit;
  33. border-right: 0;
  34. border-bottom: 0;
  35. -webkit-transform: rotate(45deg);
  36. transform: rotate(45deg);
  37. z-index: 1;
  38. }
  39. position: absolute;
  40. left: 0;
  41. right: 0;
  42. z-index: 2;
  43. min-width: 100%;
  44. box-sizing: border-box;
  45. list-style: none;
  46. padding: 0;
  47. border-radius: .3em;
  48. margin: .2em 0 0;
  49. background: hsla(0,0%,100%,.9);
  50. background: linear-gradient(to bottom right, white, hsla(0,0%,100%,.9));
  51. border: 1px solid rgba(0,0,0,.3);
  52. box-shadow: .05em .2em .6em rgba(0,0,0,.1);
  53. text-shadow: none;
  54. > li {
  55. text-overflow: ellipsis;
  56. overflow-x: hidden;
  57. position: relative;
  58. cursor: pointer;
  59. padding: 1em;
  60. }
  61. }
  62. .suggestion-box__results--above {
  63. bottom: 4.5em;
  64. &:before {
  65. display: none;
  66. }
  67. &:after {
  68. z-index: 1;
  69. content: "";
  70. position: absolute;
  71. bottom: -.43em;
  72. left: 1em;
  73. width: 0; height: 0;
  74. padding: .4em;
  75. background: white;
  76. border: inherit;
  77. border-left: 0;
  78. border-top: 0;
  79. -webkit-transform: rotate(45deg);
  80. transform: rotate(45deg);
  81. }
  82. }
  83. }
  84. .suggestion-box > ul[hidden],
  85. .suggestion-box > ul:empty,
  86. div.awesomplete > ul[hidden],
  87. div.awesomplete > ul:empty {
  88. display: none;
  89. }
  90. @supports (transform: scale(0)) {
  91. .suggestion-box > ul,
  92. div.awesomplete > ul {
  93. transition: .3s cubic-bezier(.4,.2,.5,1.4);
  94. transform-origin: 1.43em -.43em;
  95. }
  96. .suggestion-box > ul[hidden],
  97. .suggestion-box > ul:empty,
  98. div.awesomplete > ul[hidden],
  99. div.awesomplete > ul:empty {
  100. opacity: 0;
  101. transform: scale(0);
  102. display: block;
  103. transition-timing-function: ease;
  104. }
  105. }
  106. .suggestion-box > ul > li[aria-selected="true"],
  107. div.awesomplete > ul > li[aria-selected="true"] {
  108. background: $dark-red;
  109. color: $inverse-link-color;
  110. }
  111. .suggestion-box li:hover mark,
  112. div.awesomplete li:hover mark {
  113. background: $lightest-red;
  114. color: $inverse-link-color;
  115. }
  116. .suggestion-box li[aria-selected="true"] mark,
  117. div.awesomplete li[aria-selected="true"] mark {
  118. background: $red;
  119. color: inherit;
  120. }
  121. }
  122. #conversejs.converse-fullscreen {
  123. .suggestion-box__results--above {
  124. bottom: 4.5em;
  125. }
  126. }
  127. #conversejs.converse-overlayed {
  128. .suggestion-box__results--above {
  129. bottom: 5.5em;
  130. }
  131. }