File tree 2 files changed +9
-4
lines changed
src/pydata_sphinx_theme/theme/pydata_sphinx_theme
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 67
67
< div class ="search-button__search-container "> {% include "../components/search-field.html" %}</ div >
68
68
</ div >
69
69
70
- < header >
71
70
{%- if theme_announcement -%}
72
71
{% include "sections/announcement.html" %}
73
72
{%- endif %}
74
73
{% block docs_navbar %}
75
- < div class ="bd-header navbar navbar-expand-lg bd-navbar ">
74
+ < header class ="bd-header navbar navbar-expand-lg bd-navbar ">
76
75
{%- include "sections/header.html" %}
77
- </ div >
76
+ </ header >
78
77
{% endblock docs_navbar %}
79
- </ header >
80
78
81
79
< div class ="bd-container ">
82
80
< div class ="bd-container__inner bd-page-width ">
Original file line number Diff line number Diff line change @@ -307,6 +307,13 @@ def test_logo_template_rejected(sphinx_build_factory) -> None:
307
307
sphinx_build_factory ("base" , confoverrides = confoverrides ).build ()
308
308
309
309
310
+ def test_sticky_header (sphinx_build_factory ):
311
+ """Regression test, see #1630. Sticky header should be direct descendant of body."""
312
+ sphinx_build = sphinx_build_factory ("test_navbar_no_in_page_headers" ).build ()
313
+ index_html = sphinx_build .html_tree ("index.html" )
314
+ assert index_html .select_one ("body > .bd-header" )
315
+
316
+
310
317
@pytest .mark .parametrize (
311
318
"align,klass" ,
312
319
[
You can’t perform that action at this time.
0 commit comments