Fixed footnote backref target offsets regression

This commit is contained in:
squidfunk 2017-10-11 18:31:46 +02:00 committed by Martin Donath
parent 872a953ee0
commit 0ff0b46c7a
5 changed files with 17 additions and 6 deletions

View File

@ -35,7 +35,7 @@ declare module "js-cookie" {
/* Type: Cookie */
declare type Cookie = {
getJSON(json: string): Object,
set(key: string, value: string, options?: Options): string
set(key: string, value: Array<string>, options?: Options): string
}
/* Exports */

View File

@ -39,7 +39,7 @@
<script src="{{ base_url }}/assets/javascripts/modernizr-e826f8942a.js"></script>
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-408828a02a.css">
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-1fd0ca4de2.css">
{% if config.extra.palette %}
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-23f75ab9c7.palette.css">
{% endif %}
@ -88,6 +88,9 @@
{% endblock %}
<div class="md-container">
{% set feature = config.extra.get("feature", {}) %}
{% if feature.hero %}
{% include "partials/hero.html" %}
{% endif %}
{% if feature.tabs %}
{% include "partials/tabs.html" %}
{% endif %}

View File

@ -27,8 +27,9 @@
// Scoped in typesetted content to match specificity of regular content
.md-typeset {
// All superscripts with a footnote reference or back reference
sup[id^="fnref:"] {
// All footnote references or back references
[id^="fn:"],
[id^="fnref:"] {
// Add spacing to anchor for offset
&::before {
@ -105,7 +106,7 @@
vertical-align: -0.5rem;
}
// Footnote back-reference
// Footnote back reference
.footnote-backref {
@extend %md-icon;

View File

@ -181,6 +181,13 @@
<!-- Container, necessary for web-application context -->
<div class="md-container">
{% set feature = config.extra.get("feature", {}) %}
<!-- Hero banner -->
{% if feature.hero %}
{% include "partials/hero.html" %}
{% endif %}
<!-- Tabs with outline -->
{% if feature.tabs %}
{% include "partials/tabs.html" %}
{% endif %}