Skip to content

Commit 6bdc017

Browse files
authored
Merge pull request #248 from wpaccessibility/remove-search-autocomplete
Remove search autocomplete
2 parents 08c0fa3 + 40910c8 commit 6bdc017

File tree

3 files changed

+2
-503
lines changed

3 files changed

+2
-503
lines changed

_layouts/default.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,5 @@
4343
</div>
4444
</div>
4545
</div>
46-
<div id="screen-reader-feedback" role="region" aria-live="polite" aria-atomic="true"></div>
4746
</body>
4847
</html>

_sass/components/_search.scss

Lines changed: 0 additions & 210 deletions
Original file line numberDiff line numberDiff line change
@@ -119,36 +119,6 @@
119119
}
120120
}
121121

122-
// ------------------------------------------------------------
123-
// Search results dropdown
124-
// ------------------------------------------------------------
125-
.search-results {
126-
position: absolute;
127-
left: 0;
128-
display: none;
129-
width: 100%;
130-
max-height: calc(100% - #{$sp-10});
131-
overflow-y: auto;
132-
padding: $sp-1 $sp-2;
133-
border-bottom-right-radius: $border-radius;
134-
border-bottom-left-radius: $border-radius;
135-
136-
@include mq(md) {
137-
top: 100%;
138-
max-height: calc(100vh - 200%) !important;
139-
padding-left: 3rem;
140-
}
141-
}
142-
143-
.search-results-list {
144-
padding-left: 0;
145-
margin-bottom: $sp-1;
146-
list-style: none;
147-
background-color: $body-background-color;
148-
outline: 1px solid $border-color;
149-
outline-offset: -1px;
150-
}
151-
152122
// ------------------------------------------------------------
153123
// Full search results page
154124
// ------------------------------------------------------------
@@ -176,107 +146,10 @@
176146
}
177147
}
178148

179-
// ------------------------------------------------------------
180-
// Individual search result listing
181-
// ------------------------------------------------------------
182-
.search-results-list-item {
183-
padding: 0;
184-
margin: 0;
185-
font-size: var(--text-font-size-sm);
186-
}
187-
188-
.search-result {
189-
display: block;
190-
padding: $sp-1 $sp-3;
191-
192-
&:hover,
193-
&.active {
194-
background-color: $feedback-color;
195-
}
196-
}
197-
198-
.search-result-title {
199-
display: block;
200-
padding: $sp-2 0;
201-
202-
@include mq(sm) {
203-
display: inline-block;
204-
padding-right: $sp-2;
205-
vertical-align: top;
206-
}
207-
}
208-
209-
// ------------------------------------------------------------
210-
// Document name + icon
211-
// ------------------------------------------------------------
212-
.search-result-doc {
213-
display: flex;
214-
align-items: center;
215-
word-wrap: break-word;
216-
217-
.search-result-icon {
218-
width: $sp-4;
219-
height: $sp-4;
220-
margin-right: $sp-2;
221-
color: $link-color;
222-
flex-shrink: 0;
223-
}
224-
225-
.search-result-doc-title {
226-
overflow: auto;
227-
font-weight: 700;
228-
}
229-
}
230-
231-
// ------------------------------------------------------------
232-
// Section title
233-
// ------------------------------------------------------------
234-
.search-result-section {
235-
margin-left: #{$sp-4 + $sp-2};
236-
word-wrap: break-word;
237-
}
238-
239-
.search-result-rel-url {
240-
display: block;
241-
margin-left: #{$sp-4 + $sp-2};
242-
overflow: hidden;
243-
color: $search-result-preview-color;
244-
text-overflow: ellipsis;
245-
white-space: nowrap;
246-
}
247-
248-
// ------------------------------------------------------------
249-
// Search previews (disabled for now)
250-
// ------------------------------------------------------------
251-
.search-result-previews {
252-
display: none;
253-
padding: $sp-2 0 $sp-2 $sp-4;
254-
margin-left: $sp-2;
255-
color: $search-result-preview-color;
256-
word-wrap: break-word;
257-
border-left: $border;
258-
border-left-color: $border-color;
259-
260-
@include mq(sm) {
261-
width: 60%;
262-
padding-left: $sp-2;
263-
margin-left: 0;
264-
vertical-align: top;
265-
}
266-
}
267-
268-
.search-result-preview + .search-result-preview {
269-
margin-top: $sp-1;
270-
}
271-
272149
.search-result-highlight {
273150
font-weight: normal;
274151
}
275152

276-
.search-no-result {
277-
padding: $sp-2 $sp-3;
278-
}
279-
280153
// ------------------------------------------------------------
281154
// Floating search button
282155
// ------------------------------------------------------------
@@ -293,86 +166,3 @@
293166
align-items: center;
294167
justify-content: center;
295168
}
296-
297-
// ------------------------------------------------------------
298-
// Search overlay
299-
// ------------------------------------------------------------
300-
.search-overlay {
301-
position: fixed;
302-
top: 0;
303-
left: 0;
304-
z-index: 1;
305-
width: 0;
306-
height: 0;
307-
background-color: rgba(0, 0, 0, 0.3);
308-
opacity: 0;
309-
transition:
310-
opacity ease $transition-duration,
311-
width 0s $transition-duration,
312-
height 0s $transition-duration;
313-
}
314-
315-
// ------------------------------------------------------------
316-
// Search-active state
317-
// ------------------------------------------------------------
318-
.search-active {
319-
.search {
320-
position: fixed;
321-
top: 0;
322-
left: 0;
323-
width: 100%;
324-
height: 100%;
325-
background-color: var(--color-neutral-inverse-bg-document);
326-
327-
@include mq(md) {
328-
background-color: var(--color-neutral-bg-document);
329-
}
330-
}
331-
332-
.search-input-wrap {
333-
height: $sp-10;
334-
border-radius: 0;
335-
336-
@include mq(md) {
337-
width: $search-results-width;
338-
}
339-
}
340-
341-
.search-input {
342-
background-color: var(--color-neutral-bg-document);
343-
}
344-
345-
.search-results {
346-
display: block;
347-
}
348-
349-
.search-no-result {
350-
background-color: var(--color-neutral-bg-document);
351-
}
352-
353-
.search-overlay {
354-
width: 100%;
355-
height: 100%;
356-
opacity: 1;
357-
transition:
358-
opacity ease $transition-duration,
359-
width 0s,
360-
height 0s;
361-
}
362-
363-
@include mq(md) {
364-
.main {
365-
position: fixed;
366-
right: 0;
367-
left: 0;
368-
}
369-
}
370-
371-
.main-header {
372-
padding-top: $sp-10;
373-
374-
@include mq(md) {
375-
padding-top: 0;
376-
}
377-
}
378-
}

0 commit comments

Comments
 (0)