Skip to content

Commit

Permalink
Merge pull request #879 from City-of-Helsinki/UHF-9107
Browse files Browse the repository at this point in the history
UHF-9107: Unified button placement on filter searches
  • Loading branch information
teroelonen authored Jan 23, 2024
2 parents 3647ca6 + 05d2cae commit 9e2324b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
7 changes: 3 additions & 4 deletions dist/css/styles.min.css

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/scss/06_components/paragraphs/_react-search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
margin-bottom: $spacing-and-half;
}

.hdbt-search--react__form-container {
max-width: $content-width-max;
}

.hdbt-search--react__text-field {
margin-bottom: $spacing-double;
}
Expand Down
28 changes: 13 additions & 15 deletions src/scss/06_components/paragraphs/_unit-search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,39 @@
.views--unit-search {
margin-top: $spacing-double;

.form-actions {
width: 100%;
}

.form-actions [data-hds-component='button']:not([class*='hds-button']):where(
:not([data-hds-variant]), // When variant is not defined, we fallback to primary styles
[data-hds-variant='primary'],
),
.form-actions .hds-button--primary {
margin-top: $spacing;
max-width: 280px; // Max-width for button from hds/designs.
min-width: 44px; // Min-width for button from hds/designs.
width: 100%;

@include breakpoint($breakpoint-m) {
margin-left: $spacing-and-half;
}
}

.views-exposed-form {
@include breakpoint($breakpoint-m) {
align-items: flex-end;
display: flex;
flex-wrap: wrap;
max-width: $content-width-max;
}

.form-item {
@include breakpoint($breakpoint-m) {
margin-bottom: 0;
width: 70%;
width: 100%;
}
}

.description {
white-space: normal;
}

.hds-text-input__input-wrapper {
&::after {
@include pseudo-icon('search', 20px, $color-black, block);
Expand All @@ -62,17 +69,8 @@
}
}

// Move language checkbox to a new row and set proper margin
[data-drupal-selector='edit-provided-languages-value'] {
margin-top: $spacing-and-half;
order: 1;
}

.form-actions {
@include breakpoint($breakpoint-m) {
display: flex;
width: 30%;
}
}
}

Expand Down

0 comments on commit 9e2324b

Please sign in to comment.