diff options
Diffstat (limited to 'web/cobrands/sass/_autocomplete.scss')
-rw-r--r-- | web/cobrands/sass/_autocomplete.scss | 139 |
1 files changed, 139 insertions, 0 deletions
diff --git a/web/cobrands/sass/_autocomplete.scss b/web/cobrands/sass/_autocomplete.scss new file mode 100644 index 000000000..deebc1803 --- /dev/null +++ b/web/cobrands/sass/_autocomplete.scss @@ -0,0 +1,139 @@ +.autocomplete__wrapper { + position: relative; +} + +.autocomplete__hint, +.autocomplete__input { + -webkit-appearance: none; + border: 2px solid; + border-radius: 0; /* Safari 10 on iOS adds implicit border rounding. */ + box-sizing: border-box; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + margin-bottom: 0; /* BUG: Safari 10 on macOS seems to add an implicit margin. */ + width: 100%; +} + +.autocomplete__input { + background-color: transparent; + position: relative; +} + +.autocomplete__hint { + color: #BFC1C3; + position: absolute; +} + +.autocomplete__input--default{ + padding: 4px; +} + +.autocomplete__input--focused { + outline-offset: 0; + outline: 3px solid #ffbf47; +} + +.autocomplete__input--show-all-values { + padding: 4px 34px 4px 4px; + cursor: pointer; +} + +.autocomplete__dropdown-arrow-down{ + z-index: -1; + display: inline-block; + position: absolute; + right: 8px; + width: 24px; + height: 24px; + top: 10px; +} + +.autocomplete__menu { + background-color: #fff; + border: 2px solid #0B0C0C; + border-top: 0; + color: #34384B; + margin: 0; + max-height: 342px; + overflow-x: hidden; + padding: 0; + width: 100%; + width: calc(100% - 4px); +} + +.autocomplete__menu--visible { + display: block; +} + +.autocomplete__menu--hidden { + display: none; +} + +.autocomplete__menu--overlay { + box-shadow: rgba(0, 0, 0, 0.256863) 0px 2px 6px; + left: 0; + position: absolute; + top: 100%; + z-index: 100; +} + +.autocomplete__menu--inline { + position: relative; +} + +.autocomplete__option { + border-bottom: solid #BFC1C3; + border-width: 1px 0; + cursor: pointer; + display: block; + position: relative; +} + +.autocomplete__option > * { + pointer-events: none; +} + +.autocomplete__option:first-of-type { + border-top-width: 0; +} + +.autocomplete__option:last-of-type { + border-bottom-width: 0; +} + +.autocomplete__option--odd { + background-color: #FAFAFA; +} + +.autocomplete__option--focused, +.autocomplete__option:hover { + background-color: #005EA5; + border-color: #005EA5; + color: white; + outline: none; +} + +.autocomplete__option--no-results { + background-color: #FAFAFA; + color: #646b6f; + cursor: not-allowed; +} + +/* mySociety changes below */ + +.autocomplete__wrapper { + background-color: #fff; // Otherwise it has a yellow background +} + +.autocomplete__hint { + padding: 0.5em; // Match base input padding +} +.autocomplete__option { + padding: 4px; + margin-bottom: 0; // Override base li margin + line-height: 1.25; +} + +.js .js-autocomplete { + display: none; +} |