
JTZL’s Dark Mode automatically applies dark mode styling to your WordPress site based on your visitors’ operating system preferences. No configuration required – it just works.
Interactive demo:
https://playground.wordpress.net/?blueprint-url=https://wordpress.org/plugins/wp-json/plugins/v1/plugin/jtzls-dark-mode/blueprint.json
Key Features:
prefers-color-scheme: dark media queryHow It Works:
The plugin uses the CSS prefers-color-scheme media query to detect when a visitor’s operating system is set to dark mode. When detected, dark mode styles are automatically applied without any JavaScript or server-side processing.
Technical Features:
Developer Hooks:
Customize the plugin behavior using these filter hooks:
jtzl_dark_mode_enabled – Enable/disable dark mode on specific pagesjtzl_dark_mode_css_variables – Customize dark mode colorsjtzl_dark_mode_custom_css – Add custom CSS rules