mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2025-01-29 19:07:30 +01:00
Fixed footnote backref target offsets regression
This commit is contained in:
parent
f6c0ea670e
commit
6cabf6d457
File diff suppressed because one or more lines are too long
@ -46,7 +46,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block styles %}
|
{% block styles %}
|
||||||
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application.fc485aed.css">
|
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application.5d3fffba.css">
|
||||||
{% if palette.primary or palette.accent %}
|
{% if palette.primary or palette.accent %}
|
||||||
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-palette.fbd935c7.css">
|
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-palette.fbd935c7.css">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -27,20 +27,34 @@
|
|||||||
// 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 footnote references or back references
|
// All footnote references
|
||||||
[id^="fn:"],
|
|
||||||
[id^="fnref:"] {
|
[id^="fnref:"] {
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
// Targeted anchor
|
||||||
|
&:target {
|
||||||
|
margin-top: -(4.8rem + 2.4rem + 1.6rem);
|
||||||
|
padding-top: (4.8rem + 2.4rem + 1.6rem);
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// All footnote back references
|
||||||
|
[id^="fn:"] {
|
||||||
|
|
||||||
// Add spacing to anchor for offset
|
// Add spacing to anchor for offset
|
||||||
&::before {
|
&::before {
|
||||||
display: inline-block;
|
display: none;
|
||||||
|
height: 0;
|
||||||
content: "";
|
content: "";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Targeted anchor
|
// Targeted anchor
|
||||||
&:target::before {
|
&:target::before {
|
||||||
margin-top: -(4.8rem + 2.4rem + 1.8rem);
|
display: block;
|
||||||
padding-top: (4.8rem + 2.4rem + 1.8rem);
|
margin-top: -(4.8rem + 2.4rem + 1rem);
|
||||||
|
padding-top: (4.8rem + 2.4rem + 1rem);
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,24 +72,11 @@
|
|||||||
li {
|
li {
|
||||||
transition: color 0.25s;
|
transition: color 0.25s;
|
||||||
|
|
||||||
// Un-targeted footnote
|
|
||||||
&::before {
|
|
||||||
display: block;
|
|
||||||
height: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Darken color for targeted footnote
|
// Darken color for targeted footnote
|
||||||
&:target {
|
&:target {
|
||||||
color: $md-color-black;
|
color: $md-color-black;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Targeted footnote
|
|
||||||
&:target::before {
|
|
||||||
margin-top: -(4.8rem + 2.4rem + 1rem);
|
|
||||||
padding-top: (4.8rem + 2.4rem + 1rem);
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove spacing on first element
|
// Remove spacing on first element
|
||||||
:first-child {
|
:first-child {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
@ -96,14 +97,20 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Render a thin line before footnote
|
// Footnote reference
|
||||||
.footnote-ref::before {
|
.footnote-ref {
|
||||||
display: inline;
|
display: inline-block;
|
||||||
margin: 0 0.2em;
|
pointer-events: initial;
|
||||||
border-left: 0.1rem solid $md-color-black--lighter;
|
|
||||||
font-size: 1.25em;
|
// Render a thin line before footnote
|
||||||
content: "";
|
&::before {
|
||||||
vertical-align: -0.5rem;
|
display: inline;
|
||||||
|
margin: 0 0.2em;
|
||||||
|
border-left: 0.1rem solid $md-color-black--lighter;
|
||||||
|
font-size: 1.25em;
|
||||||
|
content: "";
|
||||||
|
vertical-align: -0.5rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Footnote back reference
|
// Footnote back reference
|
||||||
|
Loading…
x
Reference in New Issue
Block a user