You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SearchBox.css 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /*
  2. * SonarQube
  3. * Copyright (C) 2009-2022 SonarSource SA
  4. * mailto:info AT sonarsource DOT com
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 3 of the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public License
  17. * along with this program; if not, write to the Free Software Foundation,
  18. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. */
  20. .search-box {
  21. position: relative;
  22. display: inline-block;
  23. vertical-align: middle;
  24. font-size: 0;
  25. white-space: nowrap;
  26. }
  27. .search-box,
  28. .search-box-input {
  29. width: 100%;
  30. max-width: 300px;
  31. }
  32. .search-box-input {
  33. /* for magnifier icon */
  34. padding-left: var(--controlHeight) !important;
  35. /* for clear button */
  36. padding-right: var(--controlHeight) !important;
  37. font-size: var(--baseFontSize);
  38. }
  39. .search-box-input::-webkit-search-decoration,
  40. .search-box-input::-webkit-search-cancel-button,
  41. .search-box-input::-webkit-search-results-button,
  42. .search-box-input::-webkit-search-results-decoration {
  43. -webkit-appearance: none;
  44. display: none;
  45. }
  46. .search-box-input::-ms-clear,
  47. .search-box-input::-ms-reveal {
  48. display: none;
  49. width: 0;
  50. height: 0;
  51. }
  52. .search-box-note {
  53. position: absolute;
  54. top: 1px;
  55. left: 40px;
  56. right: var(--controlHeight);
  57. line-height: var(--controlHeight);
  58. color: var(--secondFontColor);
  59. font-size: var(--smallFontSize);
  60. text-align: right;
  61. text-overflow: ellipsis;
  62. overflow: hidden;
  63. white-space: nowrap;
  64. pointer-events: none;
  65. }
  66. .search-box-input:focus ~ .search-box-magnifier {
  67. color: var(--darkBlue);
  68. }
  69. .search-box-magnifier {
  70. position: absolute;
  71. top: 4px;
  72. left: 4px;
  73. color: var(--gray52);
  74. transition: color 0.3s ease;
  75. }
  76. .search-box > .deferred-spinner {
  77. position: absolute;
  78. top: 4px;
  79. left: 5px;
  80. }
  81. .search-box-clear {
  82. position: absolute;
  83. top: 4px;
  84. right: 4px;
  85. }
  86. .search-box-clear.button:focus {
  87. box-shadow: 0 0 0 1px white, 0 0 0 4px rgba(35, 106, 151, 0.5);
  88. }
  89. .search-box-input-note {
  90. position: absolute;
  91. top: 100%;
  92. left: 0;
  93. line-height: 1;
  94. color: var(--secondFontColor);
  95. font-size: var(--smallFontSize);
  96. white-space: nowrap;
  97. }