mirror of
https://github.com/picocss/pico.git
synced 2025-04-26 11:16:15 -04:00
parent
d0730c8b6e
commit
a2404b19b5
27 changed files with 1141 additions and 185 deletions
29
scss/content/_reduce-motion.scss
Normal file
29
scss/content/_reduce-motion.scss
Normal file
|
@ -0,0 +1,29 @@
|
|||
@if $enable-transitions {
|
||||
|
||||
/**
|
||||
* Reduce Motion Features
|
||||
*/
|
||||
|
||||
|
||||
// Based on :
|
||||
// - sanitize.css v12.0.1 | CC0 1.0 Universal | github.com/csstools/sanitize.css
|
||||
// ––––––––––––––––––––
|
||||
|
||||
// 1. Remove animations when motion is reduced (opinionated)
|
||||
// 2. Remove fixed background attachments when motion is reduced (opinionated)
|
||||
// 3. Remove timed scrolling behaviors when motion is reduced (opinionated)
|
||||
// 4. Remove transitions when motion is reduced (opinionated)
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*,
|
||||
::before,
|
||||
::after {
|
||||
background-attachment: initial; // 2
|
||||
animation-duration: 1ms; // 1
|
||||
animation-delay: -1ms; // 1
|
||||
animation-iteration-count: 1; // 1
|
||||
scroll-behavior: auto; // 3
|
||||
transition-delay: 0s; // 4
|
||||
transition-duration: 0s; // 4
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue