Skip to content

Commit

Permalink
rustdoc: consolidate prefers-reduced-motion-gated rulesets
Browse files Browse the repository at this point in the history
  • Loading branch information
zopsicle committed Sep 26, 2024
1 parent cdd3371 commit 5b58481
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -1689,12 +1689,6 @@ instead, we check that it's not a "finger" cursor.
border-right: 3px solid var(--target-border-color);
}

@media not (prefers-reduced-motion) {
:target {
animation: 0.65s cubic-bezier(0, 0, 0.1, 1.0) 0.1s targetfadein;
}
}

.code-header a.tooltip {
color: inherit;
margin-right: 15px;
Expand All @@ -1718,6 +1712,10 @@ a.tooltip:hover::after {
}

@media not (prefers-reduced-motion) {
:target {
animation: 0.65s cubic-bezier(0, 0, 0.1, 1.0) 0.1s targetfadein;
}

/* This animation is layered onto the mistake-proofing delay for dismissing
a hovered tooltip, to ensure it feels responsive even with the delay.
*/
Expand Down

0 comments on commit 5b58481

Please sign in to comment.