From 6af0d6bc701cb1bcd7be48142aec8f804ed676db Mon Sep 17 00:00:00 2001 From: Tim Cowlishaw Date: Mon, 30 Jan 2023 13:43:40 +0100 Subject: [PATCH] Tweak mobile layout to ensure placeholder text is visible Thanks to Terry for the inspiration - at the smallest breakpoint we swap the label and placeholder text, to ensure the full instructions are visible! --- .../sass/includes/_search.scss | 24 ++++++++++++++++++- .../templates/includes/basic_search_form.html | 6 +++-- locale/en_GB/LC_MESSAGES/django.po | 2 +- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/ds_judgements_public_ui/sass/includes/_search.scss b/ds_judgements_public_ui/sass/includes/_search.scss index b41b9409d..975badb71 100644 --- a/ds_judgements_public_ui/sass/includes/_search.scss +++ b/ds_judgements_public_ui/sass/includes/_search.scss @@ -54,8 +54,18 @@ padding-right: calc($spacer__unit * 3); } - &__search-term-label { + &__search-term-label.desktop { + @media (max-width: $grid__breakpoint-medium) { + display: none; + } @include sr-only; + + } + + &__search-term-label.mobile { + @media (min-width: $grid__breakpoint-medium) { + display: none; + } } &__search-term-input { @@ -75,6 +85,18 @@ @media (min-width: $grid__breakpoint-extra-large) { width: 35rem; } + + &.mobile { + @media (min-width: $grid__breakpoint-medium) { + display: none; + } + } + + &.desktop { + @media (max-width: $grid__breakpoint-medium) { + display: none; + } + } } input[type=checkbox] { diff --git a/ds_judgements_public_ui/templates/includes/basic_search_form.html b/ds_judgements_public_ui/templates/includes/basic_search_form.html index f26ca2f9b..d19e95722 100644 --- a/ds_judgements_public_ui/templates/includes/basic_search_form.html +++ b/ds_judgements_public_ui/templates/includes/basic_search_form.html @@ -4,8 +4,10 @@

{% translate "basicsearchform.title" %}