Skip to content

Commit

Permalink
Honor prefers-reduced-motion for + sign animation
Browse files Browse the repository at this point in the history
  • Loading branch information
squidfunk committed Dec 9, 2021
1 parent 1ddf872 commit d447324
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
1 change: 0 additions & 1 deletion material/assets/stylesheets/main.2d264350.min.css.map

This file was deleted.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions material/assets/stylesheets/main.82f3c0b9.min.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion material/base.html
Expand Up @@ -34,7 +34,7 @@
{% endif %}
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.2d264350.min.css' | url }}">
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.82f3c0b9.min.css' | url }}">
{% if config.theme.palette %}
{% set palette = config.theme.palette %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.9204c3b2.min.css' | url }}">
Expand Down
5 changes: 5 additions & 0 deletions src/assets/stylesheets/main/layout/_tooltip.scss
Expand Up @@ -220,6 +220,11 @@
transition: transform 400ms cubic-bezier(0.1, 0.7, 0.1, 1);
content: attr(data-md-annotation-id);

// [reduced-motion]: Disable animation
@media (prefers-reduced-motion) {
transition: none;
}

// [not print]: if we're not in print mode, show a `+` sign instead of
// the original numbers, as context is already given by the position.
@media not print {
Expand Down

0 comments on commit d447324

Please sign in to comment.