Add a post about prefers-reduced-motion

This commit is contained in:
Konstantin Nazarov 2023-08-17 23:13:42 +01:00
parent 7d41626e4b
commit 2d6270262b
Signed by: knazarov
GPG key ID: 4CFE0A42FA409C22

View file

@ -0,0 +1,29 @@
X-Date: 2023-08-17T23:00:00Z
X-Note-Id: cc2f05b8-6a95-452a-875b-887fde269c35
Subject: Enjoing 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.