Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Commit

Permalink
Merge pull request #4 from nhsuk/feature/placeholder-mobile
Browse files Browse the repository at this point in the history
Update placeholder grey to the one used in the frontend library
  • Loading branch information
pflynny authored Mar 18, 2022
2 parents 5956eae + 861bece commit aa8d9b6
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 20 deletions.
10 changes: 9 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nhsuk-header-search",
"version": "0.1.0",
"version": "0.2.0",
"description": "Accessibile autocomplete implementation for NHS.UK search",
"main": "dist/header-search.js",
"style": "dist/header-search.scss",
Expand Down
40 changes: 22 additions & 18 deletions src/scss/header-search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,35 @@
}
}

/* duplicate of .nhsuk-search__input in _header.scss, for non javascript version */
.autocomplete__input {
-webkit-appearance: listbox; // sass-lint:disable-line prefixes /* [2] */
border-bottom-left-radius: $nhsuk-border-radius;
border-bottom-right-radius: 0;
border-right: 0;
border-top-left-radius: $nhsuk-border-radius;
border-top-right-radius: 0;

&:focus {
box-shadow: 0 0 0 $nhsuk-focus-width $nhsuk-focus-color;
outline: $nhsuk-focus-width solid transparent;
outline-offset: $nhsuk-focus-width;
}

&::placeholder {
color: $color_nhsuk-grey-1;
font-size: $nhsuk-base-font-size;
}

}

@include mq($until: tablet) {
/* duplicate of .nhsuk-search__input in _header.scss, for non javascript version */
.autocomplete__input {
-ms-flex-positive: 2; /* [1] */
-webkit-appearance: listbox; // sass-lint:disable-line prefixes /* [2] */
border-bottom: 1px solid $color_nhsuk-grey-3;
border-bottom-left-radius: $nhsuk-border-radius;
border-bottom-right-radius: 0;
border-left: 1px solid $color_nhsuk-grey-3;
border-right: 0;
border-top: 1px solid $color_nhsuk-grey-3;
border-top-left-radius: $nhsuk-border-radius;
border-top-right-radius: 0;
flex-grow: 2;
font-size: inherit;
height: 52px; /* [3] */
Expand All @@ -48,9 +64,6 @@

&:focus {
border: $nhsuk-focus-width solid $nhsuk-focus-text-color;
box-shadow: 0 0 0 $nhsuk-focus-width $nhsuk-focus-color;
outline: $nhsuk-focus-width solid transparent;
outline-offset: $nhsuk-focus-width;
padding: 0 13px; /* [10] */
}
}
Expand All @@ -59,23 +72,14 @@
@include mq($from: tablet) {
/* duplicate of .nhsuk-search__input in _header.scss, for non javascript version */
.autocomplete__input {
-webkit-appearance: listbox; // sass-lint:disable-line prefixes /* [2] */
border: 1px solid $color_nhsuk-white;
border-bottom-left-radius: $nhsuk-border-radius;
border-bottom-right-radius: 0;
border-right: 0;
border-top-left-radius: $nhsuk-border-radius;
border-top-right-radius: 0;
font-size: $nhsuk-base-font-size;
height: 40px; /* [3] */
padding: 0 12px; /* [9] */
width: 200px; /* [3] */

&:focus {
border: 2px solid $nhsuk-focus-text-color;
box-shadow: 0 0 0 $nhsuk-focus-width $nhsuk-focus-color;
outline: $nhsuk-focus-width solid transparent;
outline-offset: $nhsuk-focus-width;
padding: 0 11px; /* [10] */
}

Expand Down

0 comments on commit aa8d9b6

Please sign in to comment.