From 2d6270262b61a32c16fbed620bc4e6d23ac71b09 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Thu, 17 Aug 2023 23:13:42 +0100 Subject: [PATCH] Add a post about prefers-reduced-motion --- .../note.md | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 content/posts/enjoying_internet_with_prefers_reduced_motion/note.md diff --git a/content/posts/enjoying_internet_with_prefers_reduced_motion/note.md b/content/posts/enjoying_internet_with_prefers_reduced_motion/note.md new file mode 100644 index 0000000..7b00d78 --- /dev/null +++ b/content/posts/enjoying_internet_with_prefers_reduced_motion/note.md @@ -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.