diff --git a/apps/showcase/doc/theming/styled/DarkModeToggleDoc.vue b/apps/showcase/doc/theming/styled/DarkModeToggleDoc.vue index ccd33988b..e12a46c6a 100644 --- a/apps/showcase/doc/theming/styled/DarkModeToggleDoc.vue +++ b/apps/showcase/doc/theming/styled/DarkModeToggleDoc.vue @@ -44,7 +44,8 @@ app.use(PrimeVue, { code3: { basic: ` const toggleColorScheme() { - document.body.classList.toggle("my-app-dark"); + const element = document.querySelector('html'); + element.classList.toggle('my-app-dark'); } ` }