Skip to content

Commit e987558

Browse files
authored
FIX: Add anchor offset for <dt> anchor links (#280)
1 parent edc2a0b commit e987558

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

pydata_sphinx_theme/static/css/index.c78d4f2b1f8277c2fa0830b4506d5cfe.css renamed to pydata_sphinx_theme/static/css/index.b3fa5b9aeac04ae33e0073fadc1130d8.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.c78d4f2b1f8277c2fa0830b4506d5cfe.css', 1) }}" rel="stylesheet" />
20+
<link href="{{ pathto('_static/css/index.b3fa5b9aeac04ae33e0073fadc1130d8.css', 1) }}" rel="stylesheet" />
2121
{% endmacro %}
2222

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

2727
{% macro body_post() %}
28-
<script src="{{ pathto('_static/js/index.8636327e669f6dcffc22.js', 1) }}"></script>
28+
<script src="{{ pathto('_static/js/index.2e394030c035d5864108.js', 1) }}"></script>
2929
{% endmacro %}

src/scss/_base.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,14 @@ pre {
116116
border: 1px solid rgb(201, 201, 201);
117117
box-shadow: 1px 1px 1px #d8d8d8;
118118
}
119+
120+
dt[id]:not([id='']) {
121+
&::before {
122+
// offsetting html anchor titles to adjust for fixed header
123+
display: block;
124+
content: '';
125+
height: 80px;
126+
margin: -80px 0 0;
127+
background-color: white;
128+
}
129+
}

0 commit comments

Comments
 (0)