mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03: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 %}
|
||||
{% endblock %}
|
||||
{% 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 %}
|
||||
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-palette.fbd935c7.css">
|
||||
{% endif %}
|
||||
|
@ -27,20 +27,34 @@
|
||||
// Scoped in typesetted content to match specificity of regular content
|
||||
.md-typeset {
|
||||
|
||||
// All footnote references or back references
|
||||
[id^="fn:"],
|
||||
// All footnote references
|
||||
[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
|
||||
&::before {
|
||||
display: inline-block;
|
||||
display: none;
|
||||
height: 0;
|
||||
content: "";
|
||||
}
|
||||
|
||||
// Targeted anchor
|
||||
&:target::before {
|
||||
margin-top: -(4.8rem + 2.4rem + 1.8rem);
|
||||
padding-top: (4.8rem + 2.4rem + 1.8rem);
|
||||
display: block;
|
||||
margin-top: -(4.8rem + 2.4rem + 1rem);
|
||||
padding-top: (4.8rem + 2.4rem + 1rem);
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,24 +72,11 @@
|
||||
li {
|
||||
transition: color 0.25s;
|
||||
|
||||
// Un-targeted footnote
|
||||
&::before {
|
||||
display: block;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
// Darken color for targeted footnote
|
||||
&:target {
|
||||
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
|
||||
:first-child {
|
||||
margin-top: 0;
|
||||
@ -96,8 +97,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Footnote reference
|
||||
.footnote-ref {
|
||||
display: inline-block;
|
||||
pointer-events: initial;
|
||||
|
||||
// Render a thin line before footnote
|
||||
.footnote-ref::before {
|
||||
&::before {
|
||||
display: inline;
|
||||
margin: 0 0.2em;
|
||||
border-left: 0.1rem solid $md-color-black--lighter;
|
||||
@ -105,6 +111,7 @@
|
||||
content: "";
|
||||
vertical-align: -0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
// Footnote back reference
|
||||
.footnote-backref {
|
||||
|
Loading…
Reference in New Issue
Block a user