Home >Web Front-end >CSS Tutorial >Auto Dark Theme
Websites implement dark mode by preparing specific styles and applying them based on user preference (manual selection or system settings). Currently, if a site lacks a dark mode, it remains light.
However, Chrome is experimenting with a feature that enforces dark mode on light-themed sites if the user's operating system is set to dark mode. As André Cipriani Bandarra explains: "This feature automatically applies a dark theme to light-themed websites when the user has enabled dark themes in their operating system. Users can disable this via OS settings or a specific Chrome setting."
This raises concerns. While users should control their browsing experience, and this could be viewed as an accessibility enhancement, it might inadvertently create accessibility issues (e.g., poor contrast, as seen in the initial screenshot).
This is currently an Origin Trial, allowing time for refinement before a full release. The sheer scale of the web suggests numerous unforeseen complications. It remains unclear if this applies only to Chrome on Android, or more broadly, and whether it overrides existing custom dark modes. Until specifics are clarified, opting out might be the safest approach.
The above is the detailed content of Auto Dark Theme. For more information, please follow other related articles on the PHP Chinese website!