Skip to content

Commit

Permalink
Adjust search and filter component height to align with standard inpu…
Browse files Browse the repository at this point in the history
…ts (#5399)

* Adjust search and filter component height to better align with standard inputs

* Adjust chips margins for better baseline alignment
  • Loading branch information
bartaz authored Oct 25, 2024
1 parent e78910e commit ce8551b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scss/_patterns_search-and-filter.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@

// When the search and filter is not expanded, but is overflowing with chips, we need to
// specify a height that matches that of a standard input element. This height is a combination
// of an input's line-height, its vertical padding, and a nudge.
$input-height: calc(map-get($line-heights, default-text) + $input-vertical-padding + $spv-nudge - $input-border-thickness);
// of an input's line-height, its vertical padding, and the (top transparent) border.
$input-height: calc(map-get($line-heights, default-text) + $input-vertical-padding + $input-vertical-padding + $input-border-thickness);

.p-search-and-filter {
border-bottom: $input-border-thickness solid $colors--theme--border-high-contrast;
position: relative;

.p-search-and-filter__search-container {
align-items: center;
align-items: flex-start;
background-color: $colors--theme--background-inputs;
display: flex;
flex-wrap: wrap;
Expand All @@ -47,7 +47,7 @@
}

.p-chip {
margin-bottom: $spv--x-small;
margin-bottom: 0;
margin-top: $spv--x-small;
}

Expand Down Expand Up @@ -140,7 +140,7 @@
}

.p-search-and-filter__input {
border: 0;
border-bottom: 0; // only remove bottom border (replaced by component border), as the top transparent border is still needed for correct alignment
box-shadow: none;
flex-grow: 1;
margin-bottom: 0;
Expand Down

0 comments on commit ce8551b

Please sign in to comment.