diff options
author | Zarino Zappia <mail@zarino.co.uk> | 2019-06-03 14:50:26 +0100 |
---|---|---|
committer | Zarino Zappia <mail@zarino.co.uk> | 2019-06-14 15:10:42 +0100 |
commit | a72ca7354ffb78e7757a5c8ac3de92b0bb2f6643 (patch) | |
tree | 699dc47a8e17e646516dfd0000fb3c262d76c5c0 | |
parent | 2194169903d970c79bb5873ffcdf618a7f640377 (diff) |
Finger-friendly styling for multi-select dropdowns
On narrow screens, the dropdown menus created by the multiselect
plugin now display in the centre of the screen, with increased
font size and padding to make them much easier to use.
-rw-r--r-- | web/cobrands/sass/_multiselect.scss | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/web/cobrands/sass/_multiselect.scss b/web/cobrands/sass/_multiselect.scss index 9704d841d..3503c6bfd 100644 --- a/web/cobrands/sass/_multiselect.scss +++ b/web/cobrands/sass/_multiselect.scss @@ -35,6 +35,33 @@ } } +// Centred, modal display for sub-768px screens only. +@media (max-width: 47.94em) { + .multi-select-menu { + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 75% !important; // override inline "width: auto" + max-height: 50%; + min-width: 0; + overflow: auto; // allow scrolling + border: none; + border-radius: 0.3em; + box-shadow: 0 1em 3em rgba(0, 0, 0, 0.4); + } + + .multi-select-menuitem { + font-size: 1em; + padding: flip(1em 2.5em 1em 3.5em, 1em 3.5em 1em 2.5em); + + input { + margin-top: 0.15em; + margin-#{$left}: -2em; + } + } +} + .multi-select-presets { border-bottom: 1px solid #ddd; } |