Dark Mode Toggle: The default styeld primevue in v4 is unable to auto detect dark mode #5666
Labels
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Describe the bug
The default styeld primevue in v4 is unable to auto detect dark mode.
The dark mode will be worked when the settings is:
At this time, dark style is enabled if the system prefres theme is
dark
, but when i setdarkModeSelector
to other values likedark-mode
, the dark classeswhich startswith
dark:
are worked, but the default dark style is not enabled when label<html>
or<body>
has a classdark-mode
.Reproducer
https://stackblitz.com/edit/primevue-create-vue-typescript-issue-template
PrimeVue version
4.0.0-beta.1
Vue version
3.x
Language
TypeScript
Build / Runtime
Vite
Browser(s)
Chrome 124.0.6367.91
Steps to reproduce the behavior
Expected behavior
The primevue dark style should work when
dark-mode
class is set to<html>
or<body>
.The text was updated successfully, but these errors were encountered: