Skip to content

Commit

Permalink
FIX: Add anchor offset for <dt> anchor links (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoetmaaiers authored Nov 5, 2020
1 parent edc2a0b commit e987558
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions pydata_sphinx_theme/static/webpack-macros.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

{% macro head_pre_bootstrap() %}
<link href="{{ pathto('_static/css/theme.css', 1) }}" rel="stylesheet" />
<link href="{{ pathto('_static/css/index.c78d4f2b1f8277c2fa0830b4506d5cfe.css', 1) }}" rel="stylesheet" />
<link href="{{ pathto('_static/css/index.b3fa5b9aeac04ae33e0073fadc1130d8.css', 1) }}" rel="stylesheet" />
{% endmacro %}

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

{% macro body_post() %}
<script src="{{ pathto('_static/js/index.8636327e669f6dcffc22.js', 1) }}"></script>
<script src="{{ pathto('_static/js/index.2e394030c035d5864108.js', 1) }}"></script>
{% endmacro %}
11 changes: 11 additions & 0 deletions src/scss/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,14 @@ pre {
border: 1px solid rgb(201, 201, 201);
box-shadow: 1px 1px 1px #d8d8d8;
}

dt[id]:not([id='']) {
&::before {
// offsetting html anchor titles to adjust for fixed header
display: block;
content: '';
height: 80px;
margin: -80px 0 0;
background-color: white;
}
}

0 comments on commit e987558

Please sign in to comment.