diff --git a/app/assets/builds/blacklight.css b/app/assets/builds/blacklight.css index d1d4cf145..847430ffa 100644 --- a/app/assets/builds/blacklight.css +++ b/app/assets/builds/blacklight.css @@ -149,6 +149,11 @@ main { display: flex; } +.search-field, +.search-q { + scroll-margin: 5rem; +} + .documents-list { --bl-results-document-margin-top: 1rem; --bl-results-document-padding-top: 1rem; diff --git a/app/assets/stylesheets/blacklight/_search_form.scss b/app/assets/stylesheets/blacklight/_search_form.scss index 20cbe65bf..13c4c5cd9 100644 --- a/app/assets/stylesheets/blacklight/_search_form.scss +++ b/app/assets/stylesheets/blacklight/_search_form.scss @@ -26,3 +26,10 @@ border-bottom-left-radius: 0; display: flex; } + +// ensure that the search bar appears at the top of the page when focused using +// anchor links, e.g. from the skip links navigation +.search-field, +.search-q { + scroll-margin: 5rem; +}