Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

search.scss 2.7 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
  1. /* Search
  2. ------------------------------------------------------------------------------*/
  3. /* Global styles
  4. Gets applied to both the search input on homepage and in the header nav
  5. Form and inputs using .ais- prefix gets added by search.js */
  6. .ais-SearchBox {
  7. position: relative;
  8. }
  9. .ais-SearchBox-submit {
  10. display: none;
  11. }
  12. .ais-SearchBox-form {
  13. width: 100%;
  14. display: flex;
  15. }
  16. .ais-SearchBox-input {
  17. width: 100%;
  18. padding: 10px $spacer-2 10px $spacer-5;
  19. font-size: 16px;
  20. @extend .form-control;
  21. background: var(--color-bg-primary) url("/assets/images/octicons/search.svg")
  22. no-repeat 6px;
  23. }
  24. .ais-Hits-item {
  25. list-style: none;
  26. overflow: hidden;
  27. &:hover {
  28. background: var(--color-auto-blue-0);
  29. }
  30. }
  31. /* activated by search-with-your-keyboard arrow navigation */
  32. .ais-Hits-item.active {
  33. background: var(--color-auto-blue-0);
  34. }
  35. .search-result-intro {
  36. white-space: nowrap;
  37. overflow: hidden;
  38. text-overflow: ellipsis;
  39. }
  40. mark,
  41. .ais-Highlight-highlighted {
  42. background: none;
  43. color: inherit;
  44. .search-result-title & {
  45. color: var(--color-auto-blue-5);
  46. }
  47. .search-result-intro & {
  48. border-bottom: 1px solid var(--color-auto-blue-5);
  49. }
  50. .search-result-content & {
  51. text-decoration: none;
  52. border-bottom: 1px dotted var(--color-auto-gray-5);
  53. }
  54. }
  55. .search-result-content {
  56. max-height: 4rem;
  57. overflow: hidden;
  58. }
  59. .search-result-title em {
  60. font-style: normal;
  61. text-decoration: underline;
  62. }
  63. .search-result-intro em {
  64. font-style: normal;
  65. text-decoration: underline;
  66. }
  67. // Search in header
  68. header {
  69. .ais-SearchBox-form {
  70. margin-bottom: 0;
  71. }
  72. @include breakpoint(lg) {
  73. #search-results-container {
  74. display: none;
  75. position: absolute;
  76. top: 0;
  77. right: 0;
  78. width: 0;
  79. border-radius: 3px;
  80. background: var(--color-bg-primary);
  81. box-shadow: 0 1px 15px rgba(0, 0, 0, 0.15);
  82. transition: width 0.3s ease-in-out;
  83. &.js-open {
  84. display: block;
  85. width: 60vw;
  86. max-width: 760px;
  87. padding: $spacer-7 $spacer-4 $spacer-4 $spacer-4;
  88. }
  89. .ais-Hits {
  90. margin-top: $spacer-4;
  91. }
  92. }
  93. // Overlay is only shown on desktop search modal
  94. .search-overlay-desktop.js-open {
  95. position: fixed;
  96. top: 0;
  97. right: 0;
  98. bottom: 0;
  99. left: 0;
  100. z-index: -1;
  101. display: block;
  102. content: " ";
  103. background: rgba(0, 0, 0, 0.15);
  104. }
  105. .ais-SearchBox-input {
  106. min-width: $spacer-12 * 2;
  107. }
  108. .ais-SearchBox-input.js-open {
  109. width: 55vw;
  110. max-width: 710px;
  111. position: absolute;
  112. right: 0;
  113. top: -26px;
  114. z-index: 1;
  115. transition: width 0.3s ease-in-out;
  116. }
  117. }
  118. }
  119. #__next .ais-SearchBox-input.js-open {
  120. top: 0;
  121. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...