Skip to content

Commit f70ea82

Browse files
zopsiclezopsicle
authored and
zopsicle
committed
rustdoc: do not animate :target when user prefers reduced motion
This gates #129284 behind an inverted prefers-reduced-motion media query.
1 parent 0399709 commit f70ea82

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/librustdoc/html/static/css/rustdoc.css

+6-1
Original file line numberDiff line numberDiff line change
@@ -1687,7 +1687,12 @@ instead, we check that it's not a "finger" cursor.
16871687
padding-right: 3px;
16881688
background-color: var(--target-background-color);
16891689
border-right: 3px solid var(--target-border-color);
1690-
animation: 0.65s cubic-bezier(0, 0, 0.1, 1.0) 0.1s targetfadein;
1690+
}
1691+
1692+
@media not (prefers-reduced-motion) {
1693+
:target {
1694+
animation: 0.65s cubic-bezier(0, 0, 0.1, 1.0) 0.1s targetfadein;
1695+
}
16911696
}
16921697

16931698
.code-header a.tooltip {

0 commit comments

Comments
 (0)