Skip to content

Commit 93b5115

Browse files
authored
FIX: new CSS approach to navbar-covers-target-anchor problem (#318)
1 parent e807487 commit 93b5115

File tree

4 files changed

+5
-16
lines changed

4 files changed

+5
-16
lines changed

pydata_sphinx_theme/static/css/index.361b90cc13c3b373e3e2df043d87d1bd.css renamed to pydata_sphinx_theme/static/css/index.0e366ba14472447708f75ccb7d8f24a3.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pydata_sphinx_theme/static/webpack-macros.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717

1818
{% macro head_pre_bootstrap() %}
1919
<link href="{{ pathto('_static/css/theme.css', 1) }}" rel="stylesheet" />
20-
<link href="{{ pathto('_static/css/index.361b90cc13c3b373e3e2df043d87d1bd.css', 1) }}" rel="stylesheet" />
20+
<link href="{{ pathto('_static/css/index.0e366ba14472447708f75ccb7d8f24a3.css', 1) }}" rel="stylesheet" />
2121
{% endmacro %}
2222

2323
{% macro head_js_preload() %}
24-
<link rel="preload" as="script" href="{{ pathto('_static/js/index.4bc14ce28f4cf826ca84.js', 1) }}">
24+
<link rel="preload" as="script" href="{{ pathto('_static/js/index.9ab83e9ee01d4093105a.js', 1) }}">
2525
{% endmacro %}
2626

2727
{% macro body_post() %}
28-
<script src="{{ pathto('_static/js/index.4bc14ce28f4cf826ca84.js', 1) }}"></script>
28+
<script src="{{ pathto('_static/js/index.9ab83e9ee01d4093105a.js', 1) }}"></script>
2929
{% endmacro %}

src/scss/_base.scss

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
html {
22
font-size: var(--font-size-base);
3+
scroll-padding-top: calc(var(--header-height) + 12px);
34
}
45

56
body {
@@ -108,15 +109,3 @@ pre {
108109
border: 1px solid rgb(201, 201, 201);
109110
box-shadow: 1px 1px 1px #d8d8d8;
110111
}
111-
112-
// offsetting html elements with anchor attached to adjust for fixed header
113-
:target {
114-
&::before {
115-
// offsetting html anchor titles to adjust for fixed header
116-
display: block;
117-
content: '';
118-
height: var(--header-height);
119-
margin: calc(-1 * var(--header-height)) 0 0;
120-
background-color: white;
121-
}
122-
}

0 commit comments

Comments
 (0)