1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-14 19:07:41 +01:00

Improved footnote accessibility and removed unnecessary code annotation CSS

This commit is contained in:
squidfunk 2021-11-14 09:32:02 +01:00
parent a147864796
commit ad1b964aaa
6 changed files with 12 additions and 30 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -34,7 +34,7 @@
{% endif %}
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.d5e8cd35.min.css' | url }}">
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.b5f74394.min.css' | url }}">
{% if config.theme.palette %}
{% set palette = config.theme.palette %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.9204c3b2.min.css' | url }}">

View File

@ -53,7 +53,14 @@
color: var(--md-default-fg-color);
}
// Show backreferences on footnote hover
// Show backreferences on footnote focus without transition
&:focus-within .footnote-backref {
transform: translateX(0);
opacity: 1;
transition: none;
}
// Show backreferences on footnote hover/target
&:hover .footnote-backref,
&:target .footnote-backref {
transform: translateX(0);

View File

@ -104,32 +104,12 @@
@media (prefers-reduced-motion) {
transition: none;
}
// Modifier for end alignment
&--end {
transform: translate(-100%, 0);
}
// Modifier for center alignment
&--center {
transform: translate(-50%, 0);
}
}
// Show outline for keyboard devices
.focus-visible > & {
outline: var(--md-accent-fg-color) auto;
}
// Modifier for end alignment
&--end {
transform: translate(-100%, px2rem(8px));
}
// Modifier for center alignment
&--center {
transform: translate(-50%, px2rem(8px));
}
}
// ----------------------------------------------------------------------------
@ -202,10 +182,5 @@
max-width: 60%;
margin: px2em(-16px, 13.6px) px2em(10px, 13.6px) 0;
font-family: var(--md-text-font-family);
// Modifier for center alignment
&--center {
margin-top: px2em(10px, 13.6px);
}
}
}