Skip to content

Commit

Permalink
Cover Block: Respect prefers-reduced-motion for fixed backgrounds (#1…
Browse files Browse the repository at this point in the history
…4848)

* Respect prefers-reduced-motion for parallax images

* Default to `scroll` value, which is the correct initial state
  • Loading branch information
ryelle authored and kjellr committed Apr 11, 2019
1 parent 8722f49 commit 4ebd906
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/block-library/src/cover/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
@supports (-webkit-overflow-scrolling: touch) {
background-attachment: scroll;
}

// Remove the appearance of scrolling based on OS-level animation preferences.
@media (prefers-reduced-motion: reduce) {
background-attachment: scroll;
}
}

&.has-background-dim::before {
Expand Down

0 comments on commit 4ebd906

Please sign in to comment.