Skip to content

Commit 1c12bf9

Browse files
committed
fix: hide the clear button differently depending on if JS rendered vs HTML-rendered; minor styling updates to account for the new nested <bolt-autosuggest> sub-component
1 parent 18b2d07 commit 1c12bf9

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

packages/components/bolt-typeahead/typeahead.scoped.scss

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ bolt-typeahead {
1919
display: flex;
2020
align-self: stretch;
2121
text-align: start;
22+
position: relative;
23+
}
24+
25+
:host {
26+
position: relative;
27+
}
28+
29+
bolt-autosuggest {
30+
width: 100%;
2231
}
2332

2433
.c-bolt-typeahead {
@@ -238,7 +247,7 @@ bolt-typeahead {
238247
font-size: 1rem; // needed for icon SSR rendering
239248
}
240249

241-
.c-bolt-typeahead__input:valid ~ .c-bolt-typeahead__button--clear,
250+
.c-bolt-typeahead__input[required]:valid ~ .c-bolt-typeahead__button--clear,
242251
.c-bolt-typeahead__button--clear.is-visible {
243252
visibility: visible;
244253
opacity: 1;

0 commit comments

Comments
 (0)