knazarov.com/content/posts/enjoying_internet_with_prefers_reduced_motion/note.md

30 lines
1.1 KiB
Markdown
Raw Permalink Normal View History

X-Date: 2023-08-17T23:00:00Z
X-Note-Id: cc2f05b8-6a95-452a-875b-887fde269c35
2023-08-17 22:59:22 +00:00
Subject: Enjoying internet with prefers-reduced-motion
X-Slug: enjoying_internet_with_prefers_reduced_motion
I didn't know this before, but you can actually set a special toggle in your operating system
that would remove most of the animations on the web by default. It means that you will no longer
see some of the distracting auto-playing things. They would be just static pictures. Many well-behaved
sites would also disable some of the CSS and JavaScript-based animations as well.
In effect, it sets the [prefer-reduced-motion](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion)
CSS flag. Exactly how to set this depends on your operating system. Just follow the link and there are recommendations
for most of the popular ones.
This is how I do it in NixOS:
```
gtk = {
enable = true;
gtk3.extraConfig = {
gtk-enable-animations = "0";
};
gtk4.extraConfig = {
gtk-enable-animations = "0";
};
};
```
Setting this option would oftentimes also save battery life on your laptop as well.