 July 2026
Nominee
Vote |
|
| Detect dark mode, contrast and motion preferences |
|
This package detects a visitor's web browser user interface preferences, like the use of dark mode, contrast, reduced motion, and reduced transparency, on the server side before any HTML is sent.
It provides a class that can get HTTP headers from the user's browser to detect preferences like the use of the dark mode, page contrast level, minimization of animations on the page, and reduction of transparent elements on the pages.
The class also supports using a cookie with information stored using the JSON format for browsers that do not yet support browser hints about the users' preferences on the use of the page's dark mode, contrast, animation, and transparency usage.
It also provides functions to let applications know what the current user preferences are on the server side. |
|