Skip to content

Commit 7db0e8c

Browse files
committed
fixed search widget's input alignment
1 parent cf5461d commit 7db0e8c

2 files changed

Lines changed: 26 additions & 3 deletions

File tree

app/assets/stylesheets/search.scss

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
@import 'variables';
22

3+
.search-widget {
4+
gap: 0.5em;
5+
6+
.search-widget-input {
7+
flex-grow: 1;
8+
margin: 0;
9+
}
10+
11+
@media screen and (max-width: $screen-md) {
12+
flex-direction: row;
13+
}
14+
15+
@media screen and (max-width: $screen-sm) {
16+
align-items: start;
17+
flex-direction: column;
18+
gap: 0.15em;
19+
20+
.search-widget-input {
21+
width: 100%;
22+
}
23+
}
24+
}
25+
326
.search-filters:not([open]) {
427
border-top: 1px solid $muted-graphic;
528
}

app/views/search/_widget.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
<div class="form-group-horizontal">
2-
<div class="form-group">
1+
<div class="form-group-horizontal search-widget">
2+
<div class="form-group search-widget-input">
33
<%= label_tag :search, 'Search term', class: "form-element" %>
44
<%= search_field_tag :search, params[:search], class: 'form-element' %>
55
</div>
6-
<div class="actions has-padding-bottom-1">
6+
<div class="actions">
77
<%= submit_tag 'Search', class: 'button is-medium is-outlined', name: nil %>
88
</div>
99
</div>

0 commit comments

Comments
 (0)