_search.scss 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. .search-backdrop {
  2. position: fixed;
  3. right: 0;
  4. bottom: 0;
  5. left: 0;
  6. top: $navbarHeight;
  7. z-index: $zindex-modal-backdrop;
  8. background-color: $black;
  9. @include opacity(70);
  10. }
  11. .search-container {
  12. left: 0;
  13. top: 0;
  14. right: 0;
  15. z-index: ($zindex-modal-backdrop + 10);
  16. position: absolute;
  17. .label-tag {
  18. margin-left: 6px;
  19. font-size: 11px;
  20. padding: 2px 6px;
  21. }
  22. }
  23. // Search
  24. .search-field-wrapper {
  25. width: 100%;
  26. display: flex;
  27. background-color: $navbarButtonBackground;
  28. input {
  29. max-width: 653px;
  30. //padding: 0.5rem 1.5rem 0.5rem 0;
  31. padding: 1rem 1rem 0.75rem 1rem;
  32. height: 51px;
  33. line-height: 51px;
  34. box-sizing: border-box;
  35. outline: none;
  36. background: $side-menu-bg;
  37. background-color: $navbarButtonBackground;
  38. flex-grow: 10;
  39. }
  40. }
  41. .search-field-spacer {
  42. flex-grow: 1;
  43. }
  44. .search-switches {
  45. flex-grow: 1;
  46. padding: 1rem 1rem 0.75rem 1rem;
  47. white-space: nowrap;
  48. }
  49. .search-field-icon {
  50. font-size: $font-size-lg;
  51. padding: 1rem 1rem 0.75rem 1rem;
  52. }
  53. .search-dropdown {
  54. display: flex;
  55. flex-direction: column;
  56. max-width: 1100px;
  57. visibility: none;
  58. opacity: 0;
  59. &--fade-in {
  60. visibility: visible;
  61. opacity: 1;
  62. transition: opacity 0.3s;
  63. }
  64. }
  65. .search-results-container {
  66. height: 450px;
  67. overflow: auto;
  68. display: block;
  69. line-height: 28px;
  70. padding: $spacer;
  71. background: $panel-bg;
  72. flex-grow: 10;
  73. .selected {
  74. .search-result-tag {
  75. opacity: 0.70;
  76. color: white;
  77. }
  78. }
  79. .fa-star, .fa-star-o {
  80. padding-left: 13px;
  81. }
  82. .fa-star {
  83. color: $orange;
  84. }
  85. .search-result-link {
  86. color: $grafanaListMainLinkColor;
  87. .fa {
  88. padding-right: 10px;
  89. }
  90. }
  91. .search-item {
  92. word-wrap: break-word;
  93. display: block;
  94. padding: 3px 10px;
  95. white-space: nowrap;
  96. background-color: $tight-form-bg;
  97. margin-bottom: 4px;
  98. @include left-brand-border();
  99. .search-result-icon::before {
  100. content: "\f009";
  101. }
  102. &.search-item-dash-home .search-result-icon::before {
  103. content: "\f015";
  104. }
  105. &:hover {
  106. background-color: $tight-form-func-bg;
  107. @include left-brand-border-gradient();
  108. }
  109. &.selected {
  110. background-color: $grafanaListBackground;
  111. }
  112. }
  113. .search-result-tags {
  114. float: right;
  115. }
  116. .search-result-actions {
  117. float: right;
  118. padding-left: 20px;
  119. }
  120. }
  121. .search-button-row {
  122. padding: $spacer*2;
  123. display: flex;
  124. flex-direction: column;
  125. align-items: flex-start;
  126. button, a {
  127. margin-bottom: $spacer;
  128. }
  129. .search-button-row-explore-link {
  130. color: $gray-3;
  131. font-size: $font-size-sm;
  132. position: relative;
  133. top: 1.0rem;
  134. &:hover {
  135. color: $link-hover-color;
  136. }
  137. img {
  138. vertical-align: text-bottom;
  139. }
  140. }
  141. }
  142. @include media-breakpoint-up(md) {
  143. .search-dropdown {
  144. flex-direction: row;
  145. }
  146. .search-container {
  147. left: 78px;
  148. }
  149. }