diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css index 5abe0ebb01..0d8f790eae 100644 --- a/docs/_static/css/custom.css +++ b/docs/_static/css/custom.css @@ -1,12 +1,22 @@ -/* Add additional spacing between sections using semantic section elements, until we update sphinx-wagtail-theme */ -section { - margin-top: 2.5rem; - margin-bottom: 2.5rem; +/* fix a few issues with static/scrolling sidebar and algolia search fields +- issue where overflow-x hidden was added but not required if hidden submit button wraps +- added search content causes width of sidebar to make content wrap +- search results not able to be shown inside scrollable container +- https://github.com/wagtail/sphinx_wagtail_theme/issues/201 +*/ + +.sidebar-container .collapse { + overflow-x: unset; } -/* Workaround for https://github.com/executablebooks/MyST-Parser/issues/533 */ -li > p { - margin-bottom: 0; +@media screen and (min-width: 992px) { + .sidebar-container { + width: 25%; + } +} + +body.body--autocomplete-open .sidebar-container .collapse { + overflow-y: unset; } /* Wagtail Space */ diff --git a/docs/_static/css/docsearch.overrides.css b/docs/_static/css/docsearch.overrides.css index 2f0c4ded78..d83451d9d5 100644 --- a/docs/_static/css/docsearch.overrides.css +++ b/docs/_static/css/docsearch.overrides.css @@ -12,6 +12,19 @@ a.algolia-docsearch-suggestion { border-bottom: 0; } + #search-results h2 { display: none; } + +/* override algolia search input colors (set on element via JS) for dark mode alignment and radius for left icon */ + +#search-form .algolia-autocomplete > .form-control { + background: #fff none repeat scroll 0% 0% padding-box !important; + border-bottom-left-radius: 0 !important; + border-top-left-radius: 0 !important; +} + +body.theme-dark #search-form .algolia-autocomplete > .form-control { + background: #2e1f5e none repeat scroll 0% 0% padding-box !important; +} diff --git a/docs/_templates/searchbox.html b/docs/_templates/searchbox.html index 9dd7fc4280..5523dd6014 100644 --- a/docs/_templates/searchbox.html +++ b/docs/_templates/searchbox.html @@ -1,8 +1,13 @@ {%- if builder != "singlehtml" %}