Fixed wrong offset of targeted footnote backrefs

This commit is contained in:
squidfunk 2017-06-01 22:43:50 +02:00 committed by Martin Donath
parent 95d014032f
commit 6abed20acb
3 changed files with 18 additions and 2 deletions

View File

@ -38,7 +38,7 @@
<script src="{{ base_url }}/assets/javascripts/modernizr-1df76c4e58.js"></script> <script src="{{ base_url }}/assets/javascripts/modernizr-1df76c4e58.js"></script>
{% endblock %} {% endblock %}
{% block styles %} {% block styles %}
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-78278d826e.css"> <link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-f98ca285f9.css">
{% if config.extra.palette %} {% if config.extra.palette %}
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-8817cfa535.palette.css"> <link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-8817cfa535.palette.css">
{% endif %} {% endif %}

View File

@ -27,6 +27,22 @@
// Scoped in typesetted content to match specificity of regular content // Scoped in typesetted content to match specificity of regular content
.md-typeset { .md-typeset {
// All superscripts with a footnote reference or back reference
sup[id^="fnref:"] {
// Add spacing to anchor for offset
&::before {
display: inline-block;
content: "";
}
// Targeted anchor
&:target::before {
margin-top: -(5.6rem + 2.4rem + 1.8rem);
padding-top: (5.6rem + 2.4rem + 1.8rem);
}
}
// Footnotes extension // Footnotes extension
.footnote { .footnote {
color: $md-color-black--light; color: $md-color-black--light;